fbpx
Back

Contents

Blog

Version control for tracking and visualizing PLC code changes

23 Nov, 2022

2 min

Leandro Ribeiro

Leandro Ribeiro

Senior Industrial Full Stack Developer

Code versioning is an essential practice in modern software development, but it’s not as common in the industrial automation field. However, with the rise of automation in industrial processes through Programmable Logic Controllers (PLCs), version control for PLC code is becoming increasingly critical to implement. Proper code versioning can help reduce machine commissioning and code modification time, prevent downtime, and simplify machine maintenance.

PLC software development can take up to 12 months for larger projects, and engineers may leave or join the project team during that time. It is crucial to have control and visibility of the code version history to ensure that code development doesn’t become harder due to missing version history.

In an operational machine, providing visibility of recent code changes to the maintenance team is vital. Typical code modifications include bypassing specific logic, modifying instruction blocks to match the settings of new external devices, adjusting internal operating parameters, hardware changes, firmware upgrades, and more. If these modifications are not available to the maintenance team, downloading outdated code could result in unintended operation, which could lead to injuries in the factory.

Version control serves as a machine’s history and is highly beneficial in regulated environments like the manufacturing industry. Depending on the range of implementation, it can tell the technical events made to the code, making it easier to identify which change impacted the system’s performance and why. It can also function as an operational log for the system and dictate which program to use per product run in multi-use, multi-product machines.

What’s the status quo in PLC code development?

Currently, in the industrial automation field, version control is often implemented by copying the same project repeatedly and making changes to the file’s name. Some system integrators or machine builders develop proprietary systems, while manufacturers store the PLC code on their workstations within specific folders with relevant identification to the revision. This approach heavily relies on the discipline of the automation engineer who modifies the code, which doesn’t provide visibility on who made the revision, when and why. Moreover, it’s done offline, which limits co-engineering and co-development.

When and how to implement version control?

Code versioning should start with the first written line of code and run throughout the entire lifecycle of the control code, including post-testing, commissioning, and active plant service. The initial version control responsibility lies with the system integrator or OEM, covering detailed engineering, testing, commissioning, and end-of-warranty contract. After this, the primary responsibility is transferred to the end-user or client managing the entire operational stage of the system. The system integrator or machine builder can sometimes maintain the code during the warranty period and after, if contracted.

SDA Version Pro offers version control for PLC code, allowing backup and version projects in the cloud and co-engineering with other PLC developers. It does not require multiple IDE licenses and allows downloading the PLC code to different workstations while updating every instance of the code via a sync functionality. With SDA Version Pro, every developer can have a local copy of the repository on their respective programming workstations. The software detects, indicates who made the change, and allows adding comments on what was modified. Automation Engineers can select two or more project versions, compare and visualise the changes through diff functionality. 

Increase workplace safety and productivity by visualizing code changes and triggering alarm notifications to Automation Engineers.
Visualization of the PLC Code changes in SDA Version Pro

For system integrators and OEMs, version control can reduce code development time and lower project implementation costs. For manufacturers, version control reduces the dependency on third-party support, which may lower operational and maintenance costs of the process or machine. Ultimately, with an updated code available at any moment in time, downtime may not be prevented; however, it can be effectively shortened due to the availability of the latest code version that functions as a system restore point.

Single source of truth for all PLC project versions
Single source of truth for all project versions

With SDA Version Pro, Automation Engineers can have a single source of truth for all PLC code, eliminate duplicates and overwriting code by having all systems synced (local engineering station, PLC on the shop floor and IDE-as-a-Service). In addition, SDA ensures a single source of truth for PLCs not connected to the internet through the local client that can be downloaded from SDA console.

Watch SDA Version Pro guided tour: https://app.storylane.io/share/usrhlaegj6pw 

Start your free 14-day trial today: https://console.softwaredefinedautomation.io/onboarding 

Stay up to date. Subscribe for our latest news.

subscribe icon