Who is using version control (Git, Subversion, AssetCenter, etc)?

CapinWinky

Member
Join Date
Aug 2011
Location
Virginia
Posts
566
A previous thread touched on something that I'm a little curious about. In my prior job, we used Git for version control (with SourceTree as the front end and BitBucket for central storage). I thought this was standard practice in the world of modern programming, including PLC programming and it was an absolute requirement when working on Pharma machines to comply with CFR21-11.

My current employer doesn't use version control software and I was kind of surprised; reading this forum, I'm realizing that it isn't very common in controls. Anyone else out there using version control software?

I think a big reason it is so rare in controls is that the most popular PLC platforms save the project as one big binary file, which kills a lot of the features of a version control system (viewing/merging code changes and the like). You can kind of get around it with Rockwell by exporting the project as an L5X (or paying them the extortion fees to use AssetCenter), but a lot of other platforms also save the project as a big binary file.

I know Rockwell and I think all Codesys based platforms save as big binary files (.pro or .project for Codesys; ACD, RSS, IAB, etc. for Rockwell). What platforms don't do this? I know B&R saves as a folder tree, and I think Galil and Trio both saved as a collection of text files. What about Omron, Mitsubishi, etc?
 
I do use Subversion on my own volition and find it convenient enough even without the ability to view/merge the source code. I still find this method of storage superior to keeping multiple revision files (with different names) on a shared network drive.

At least I have an ability to enter comments when saving my day's work ("commiting" in SVN parlance) into the Subversion database so I know what I did and which revision is which. There are some things about SVN that could be a bit tricky but overall it is a good thing to use.

Unfortunately so far I have not been able to convince my colleagues to use it as well. It might be a real boon for us, working in a large company in multiple production locations all connected into a single network.
 
I work for myself and use Omron as my standard PLC.
CX-P saves a not so big binary file (full automation of a power station - 10 PLCs and many remote I/O file was less than 500k and that included all comments and symbols) and I just number mine V1, V2 etc with the date after it - eg. **** V1 25_01_2014. Not much else I can do.
 
I use Git for all my HMI and PLC code - and other miscellaneous stuff like installer scripts, database setup SQL files and configuration files etc. It's definitely a challenge to use it for the binary file type stuff, but it's still a HUGE timesaver. You just have to be rigorous about committing meaningful messages.

We use Opto 22 devices - their code is mostly stored as readable text, so it's easy to view file diffs. On the binary stuff, if you need specific code from another branch or version, you just have to load that file and copy the code into notepad to be able to switch back to the other version and compare.

Here are my main pros (we use an online host as well as local):

- Can get most recently committed code from ANY computer, as long as it has internet access. I don't even do on-site work and this is a huge benefit.
- Branches for each customer: for me, most projects are similar with just a handful of changed files. They store the base branch and only the changes for other branches, so storage space is kept to a minimum.
- We can use the Trac plug-in to have a ticket system for feature requests/bugs/tasks. Very handy way to plan things out.
 
use GIT and SVN alot for daily internal C# and WPF/Silverlight,SQL work i have a few Automation people that just don't understand it, so i keep CMD line thing away from them
 
I just looked into Beckhoff's TwinCat 3, which is based on Visual Studio instead of Codesys. It saves projects as standard archive file of type *.tpzip. Not ideal, but a lot of file diff programs have no problem digging into archives. The project files themselves are all plain text or XML (as you would expect from Visual Studio).

I don't actually have TwinCat 3, I just downloaded a sample program to see if it was plain text. If it is comparable to or even better than Codesys 3 based IDEs, the Codesys people better watch out. Visual Studio is a much better tested base to build on and I could see PLC makers jumping ship.
 
- Can get most recently committed code from ANY computer, as long as it has internet access.

I'm curious how this is setup. I'm used to GIT having the local repository for working offline and a central repository everyone pushes changes to. Are you adding the local repository of the other computers as remotes on yours to pull directly? How do you connect, VPN?
 
I work for myself and use Omron as my standard PLC.
CX-P saves a not so big binary file (full automation of a power station - 10 PLCs and many remote I/O file was less than 500k and that included all comments and symbols) and I just number mine V1, V2 etc with the date after it - eg. **** V1 25_01_2014. Not much else I can do.

Same for me except I use R1, R2, etc..
 
Manually saving project versions is better than not doing anything, but just barely. If you aren't saving to a network drive or cloud storage then you are asking for a huge data recovery bill when your drive crashes (or data loss).

There is also no way to tell if, for instance V3 from March 2012 is the latest or V2 from June 2012, or if there is a V4 out there somewhere or even if the V3 on the network is the latest or if there was a last second change to V3 that is still sitting on the laptop (that is where?) of the guy that quit 2 years ago. Not to worry though, you can just upload from the PLC; oh, they completely dicked up the project on the PLC and that's why you're hunting it down?

Version control software, it's free and I suggest Git over SVN for people that need to work on site.
 
Manually saving project versions is better than not doing anything, but just barely. If you aren't saving to a network drive or cloud storage then you are asking for a huge data recovery bill when your drive crashes (or data loss).

There is also no way to tell if, for instance V3 from March 2012 is the latest or V2 from June 2012, or if there is a V4 out there somewhere or even if the V3 on the network is the latest or if there was a last second change to V3 that is still sitting on the laptop (that is where?) of the guy that quit 2 years ago. Not to worry though, you can just upload from the PLC; oh, they completely dicked up the project on the PLC and that's why you're hunting it down?

Version control software, it's free and I suggest Git over SVN for people that need to work on site.

I have everything on Dropbox so I automatically have multiple backups. It works pretty well.
 
Manually saving project versions is better than not doing anything, but just barely. If you aren't saving to a network drive or cloud storage then you are asking for a huge data recovery bill when your drive crashes (or data loss).

There is also no way to tell if, for instance V3 from March 2012 is the latest or V2 from June 2012, or if there is a V4 out there somewhere or even if the V3 on the network is the latest or if there was a last second change to V3 that is still sitting on the laptop (that is where?) of the guy that quit 2 years ago. Not to worry though, you can just upload from the PLC; oh, they completely dicked up the project on the PLC and that's why you're hunting it down?

Version control software, it's free and I suggest Git over SVN for people that need to work on site.

I'll take a look at Git - thanks for the suggestion.
 
I'm curious how this is setup. I'm used to GIT having the local repository for working offline and a central repository everyone pushes changes to. Are you adding the local repository of the other computers as remotes on yours to pull directly? How do you connect, VPN?

We use one of the online repository hosting services and set it up to connect to the origin using SSH. The service we use also lets you browse all source from any branch through their website (https) and download files without needing to set up a Git client on every single machine.

So if I'm away from my workstation that has my Git client set up, I can log into the repository's site from any other PC in the building and download a particular file I need with no hassle.
 
It is funny you mention this as our company is currently at a cross with this exact thing. Currently, we use SVN with AHNK as built-in for commits and TortiseSVN for when AHNK doesn't like us. This is with TwinCAT 3. It seems the issue is with merging the explorer part for the tree. So if 2 people add a POU to the tree someone is going to get stomped out. We have been talking to Beckhoff and they claim that TFS is what they use in-house and it works flawlessly with it, we are just at a crossroads atm with where we want to spend the money.
 
I program mostly in function function block with schneider unity. they have the unity diff tool which is OK when I need to compare two PLC programs.

I have thought about periodically exporting the project as XEF format which is text based XML, checking this in to git, and then writing some software to render the program sections that had changed and visually identify additions/deletions based on the diffs from git. It was too big a task to take on as a side project. Here are some resources I found when I was thinking about how to visually diff FBD plc programs so we could better track changes and ease the burden when programmers have to switch out on projects.

This fellow had a pretty good method for comparing images of schematics and identifying changes.
http://www.evilmadscientist.com/2011/improving-open-source-hardware-visual-diffs/

this is (was?) an open source PLC programming IDE which had python code for rendering FBD from XML which I thought might same some wheel-reinventing or at least be a good guide on how to draw FBDs.
http://www.beremiz.org

this fellow has a product that does visual diffs for matlab simulink projects, so he's got a lot of this figured out:
http://www.diffplug.com/
 

Similar Topics

Is it possible converting Omron and Keyence plc's serial communication into Ethernet using serial to RJ45 converter? I need to connect these plcs...
Replies
5
Views
2,270
Hi all, I have used your forum a lot in the past for helpful hints, but I could not find anything on this question. I have a project where I am...
Replies
2
Views
2,862
Hello all, I am trying to convert parameters from an Offline saved project of a VLT5006 to a new online FC302. I try using the conversion wizard...
Replies
3
Views
4,509
does anyone know if it is possible to make edits to a project file that is run on a older version of runtime using a newer version of works and...
Replies
7
Views
7,306
Has anyone run into problems using existing S5 i/o ( specifically the et200u) interface modules with the S7 cpu. I have done this already using...
Replies
5
Views
8,877
Back
Top Bottom