Breaking the binary barrier: version-controlling Siemens TIA Portal with VCI
Why .ap21 files defeat Git, and how 2ot's VCI integration extracts SimaticSD and SimaticML so PLC teams finally get pull requests, blame and diffs.
Every automation team that has tried to put a TIA Portal project under Git eventually hits the same wall: the .ap21 file is a binary, vendor-controlled container. Two engineers editing the same FB on different branches do not get a three-way merge — they get a corrupted project and a four-hour recovery.
The Version Control Interface (VCI) shipped by Siemens exposes a programmatic surface that lets external tools serialize and deserialize project content as text. 2ot drives that surface from a Rust process via the Openness Add-In bridge, turning a binary blob into a directory tree your CI system can actually reason about.
What VCI actually gives you
VCI exposes the project as a graph of IEngineeringObject instances — code blocks, data types, tag tables, libraries. 2ot walks the graph and emits each node as either SimaticSD (.s7dcl) or SimaticML (.xml), preserving every comment byte and every attribute the runtime cares about. The result is a directory layout that mirrors the TIA project tree, where every file is human-readable text.
- Code blocks → SimaticSD (.s7dcl) — the same text you see in the SCL editor.
- Data types and tag tables → SimaticML (.xml) — schema-validated, lossless.
- Library references → text manifests with stable identifiers, so library updates show up as ordinary diffs.
Bidirectional sync without drift
Export is the easy half. The hard half is keeping a binary project and a text repository in step when both sides can mutate. 2ot runs a drift detection pass on every push: it walks the live project, compares each node against the source tree, and computes a minimal set of operations — create, replace, DeleteEngineeringObject for orphans. The team's preferred Git workflow produces the source changes; automation invokes the bridge to apply the delta and bring the binary project up to date.
What changes for your workflow
- Pull requests on PLC code, with line-level review on FBs and DBs.
- git blame on a malfunctioning interlock — instead of opening change logs in TIA.
- Branch-per-feature with CI that compiles the project headlessly before merge.
- Cherry-picking a fix from production back to a development branch in seconds.
2ot does not require the engineer to adopt a separate front end. The TIA Add-In can be the harness for teams that prefer to stay inside Portal, while scripts and LLM agents can invoke the same routed operations from other workflows. What changes is the execution layer underneath, not the interface the engineer prefers.