What does a revision control program do? Revision control programs are used to monitor program changes, create a log over changes, who made them, when and why they where made. There are also functions to coordinate when many developers are to make changes in the same code.
Why revision control system?
To know which is the latest status Sometimes a program may be changed for example during a night shift in order to get a plant running when a sensor is broken. It is important that such changes are recorded, so that a more thought-trough change can be made or so that the original program can be restored when the reason for the change no longer is there.
To know when changes has been made If a new fault has been detected after a change has been made, you can go back to the status before the change. You also know when the change was made and why. It might also be important to know who made the change.
Continuously changing programs Machine builders and others continuously develop their programs and deliver the latest version to the latest customer. The program exists in different versions by different customers. It is important to know what differs in the version which has been delivered to a certain customer from the latest version to know whether it is necessary to upgrade the program.
Many developers are working simultaneously on the same project. Some projects are so big that many programmers has to work on the project at the same time. In other cases one version of the program is being commissioned while program development contentious for the next project. You then get parallel versions of the program which has to be matched to a final version.
Demands from authorities In some industries like food and pharmaceuticals there might be requirements from the authorities on documentation and of which program changes which has been made.
How does a revision control program work?
Revision number Every time that you check in a new version of the program it will get a new revision number. You will also get at possibility to enter a description of that revision. You can then document why the change was made and how it was made.
Logging When the new version is checked in it is registered who is checking in the program and time and date when it is done.
Locking One problem when several developers are working on a project at the same time is to prevent two people to make changes in the same module at the same time. There are two solutions on this problem. One is that the archive is locked when some one checks out a document. Until the same person checks in the document again only a write protected version can be checked out. The other solution is that many people can check out a document. When they are to check in the document again a comparison is made to see if a change has been made in the mean time. If it has, the revision control program tries to do a merge of the changes. This may work if the two developers has made changes at different places in the document. If a merge can´t be made, a manual decision has to be made which version should be saved.
Problems with revision management programs The biggest problem using revision management programs aimed at document management or high level programming languages, with PLC or SCADA programming is that they works best with pure text documents. Binary files can be checked in or out from the archive, but comparisons between different versions or merge will not work. At ISIS we use to save the PLC program both as a text file and as a binary file. Simatic S7 can export the STEP7 code to a source file which is a pure text file which the revision control program can handle. Siemens also sells an Excel script which automates this. Simatic STEP5 does not have this function, but for example the second-source program S5 for Windows has.
Central or distributed archiving Most revision control programs use a central server where you check in or out your files. This solution is useful for work within one company where there is a central server and where there are routines for regularly backing up the server on tape. A few revision control programs use a decentralized system where a file which is checked in is not stored on a central server, but instead sent to all participants in the project. This solution is useful when several independent company's are participating in the same project.
Backup If you use a system with a central server it is of cause important that there is a functioning back-up routine for the server. Data should regularly be backed up on tape. To avoid losing information which has not yet been saved on tape you can continuously mirror the archive to another server.
A special backup situation arise during commissioning. There is of cause an advantage if you can access your revision control system remotely. It is not always possible. You should at least make sure that you always have a current backup on a separate storage medium in case your computer crashes or gets stolen. USB memories have large storage capacity and can be carried in your pocket.
Special demands There are applications with special demands, in the pharmaceutical industries, where it is required that the revision control system should have direct contact with the PCs and regularly control that the program in the PLC is the same as the version checked in to the archive. Such revision control systems are considerably more expensive than conventional. They must also have communication drivers for the different PLC's they controlling. Examples of these are VersionWorks and AutoSave.
Examples of programs for revision control CVS Open source classic for all operating systems. ISIS uses CVS with a user interface called CS-RCS.
Visual Sourcesafe Microsoft's own revision control system. Visual Source safe is part of the large version of Visual Studio
Surround By the same supplier as the bug tracking system TestTrack
Code Co-op A decentralized revision control system without a dedicated server. Files and documents which are checked in are sent to all participant.
Perforce PVCS
Special VersionWorks Autosave
|