Version control for ladder logic (LL) programs for programmable logic controllers (PLCs) seems to be virtually non-existent. It may be because LL is a visual language and tends to be stored in binary files, or it may be because source code control hasn't "caught on" in process control engineering circles - or perhaps my Google-Fu is weak tonight.

Do you know of any realistic and useful solutions for version control for such systems?


  • realistic = changes to the programs are tracked by user and subject to reversion and merges
  • useful = the system integrates with visual LL designers, is not limited to LL from a single PLC manufacturer, and does not cost a ridiculous amount of money?

Note: I have heard of people using SVN or Mercurial et al to track the binary files, but I don't think the diff/merge capabilities would display readable differences.


At first we only had to support Allen-Bradley PLCs. Now we also have Siemens and MicroLogix PLCs. Still searching for a viable solution...


4 Answers 4


Unfortunately the answer is going to depend on the PLC vendor you're using. Most of them store their code in proprietary file formats, so it makes it difficult to use regular source control.

Rockwell offers FactoryTalk AssetCenter if you're using Allen-Bradley. I haven't priced it, but it's likely expensive. It does more than source control though.

I have used regular (Mercurial) source control with Beckhoff TwinCAT PLC files. That seems to work OK, but I never had to merge with anyone. Their new version of TwinCAT (3) coming out later this year is supposed to be built on Visual Studio 2010, and I'm assuming will have much better out-of-the-box offerings for version control integration. Fingers crossed.

Start Edit

I just wanted to add that I've now used the new TwinCAT 3 product, and I am using Mercurial (TortoiseHg and the VisualHg add-in for Visual Studio). It is working pretty well. First of all VisualHg makes it feel very integrated into the Visual Studio 2010 IDE that TwinCAT 3 uses. However, the source code for TwinCAT 3 programs are generally stored in XML files. This is a vast improvement over other vendor's proprietary binary formats that I've used, but it still doesn't merge well. Some of the files don't have any line breaks in the XML (I've written to Beckhoff about this) which means a line-by-line source control system doesn't do much. Also, since it's XML, the ordering of the nodes in the XML file seems to change randomly, even when you don't make any changes. Also, I think it sometimes generates new IDs for some nodes when it doesn't have to, which makes for superfluous changes that Hg picks up on. This effectively makes it impossible to make changes to a TwinCAT 3 program by 2 programmers at the same time, and then merge the changes. It's an unfortunate oversight by the TwinCAT 3 developers, who undoubtedly use source control regularly in their own work, and didn't see the advantage for us lowly automation programmers to have access to similarly powerful tools. :(

End Edit

Start Edit #2

I would like to point out that TwinCAT 3.1 now has file formats that are better suited to source control, particularly the structured text language files. In fact, the product is now built to support integration to Team Foundation Server, I believe.

End Edit #2

The other alternative is that most PLC programs can be exported to text files. RSLogix 5000, for instance, exports its projects to an L5K file, which is just text. I've run scripts against those files before - they're fairly easy to parse. They would work well with source control. Of course that means exporting every time, which sucks.

If you do go with any standard version control, I highly suggest a distributed VCS, like Git or Mercurial, because with PLCs, half the time you're onsite and can't connect to your home server, so the ability to do local commits is a real bonus.

The other thing you have to realize is that some PLC programming environments, like RSLogix, already include a diff tool, so you can run diffs against two versions of your projects. This, combined with saving a new file with today's date every day, is what most automation shops seem to get by with.

  • Have you ever used Autosave? wingtipllc.com/products/autosave-plc-version-control/… Commented Aug 20, 2011 at 21:29
  • @blueberryfields: yes I've used the autosave feature on most software that supports it, and yes, it's saved my butt a few times. However, using it as version control isn't a good idea. Version control should have more than just a timestamp, it should have author and a description of the changes. It should also be possible to do a 3-way merge between a parent version and two forks. Commented Aug 22, 2011 at 1:42
  • Beckhoff's TwinCAT projects can be exported and imported to/from text files as well. That's how we put them under version control. Works alright for projects written in ST. Haven't tried with graphical languages like LL though.
    – stmax
    Commented Jun 2, 2012 at 16:31
  • @stmax - I just edited the answer to provide my latest experience with it. As I said, it works, just not as well as it could. Commented Jun 2, 2012 at 17:28
  • I accepted this as 'the answer' because it appears that exporting to text files and using SCC is the only viable solution for multiple PLC vendors. Commented Sep 9, 2012 at 4:44

If you can, look at B&R Automation.

Full Disclosure... I work for a sales partner of B&R Automation.

Modern B&R Automation projects work very well with versioning software. I currently use GIT (which is not integrated), though there is supposed to be integration with SVN in the software. All of the HMI source is saved as XML, and all of their PLC language sources (including ladder) is saved text based instead of binary (mostly XML as well). If you have to do manual merges then you do have to "figure out" the XML to some extent, but I did not find it that difficult. And the automatic merge usually makes that unnecessary anyways.


I only just saw this question, and there is actually a canned solution - from GE-IP of all places. Check out Proficy Change Management. This product does version control from a PLC control systems point of view, rather than a pure version control of files point of view - it works as a layer sitting on top of a VCS (the scary part is that originally this VCS was Visual SourceSafe) and handles rights management, reporting and checkout/checkin.

While the product is from GE-IP, it is designed to support a variety of PLC and HMI systems out of the box.

Full disclosure, I used for work for a company selling and installing PCM (but that was 7 years ago). So if you ask me what it was like back then I'm likely to tell you where it all went wrong!


As horrifying as this sounds, in one case I ended up using the "Print to PDF" feature of the ladder logic software (in this case it was Horner's CScape) and then a free graphical PDF differencing program (e.g. DiffPDF) to compare changes because the source code was only available in a proprietary, binary format.

Not the answer you're looking for? Browse other questions tagged or ask your own question.