PLC Version Control: 7 Smart Steps for Safe Code Changes

Share:
PLC
PLC Version Control: 7 Smart Steps for Safe Code Changes

A night shift edit, a forgotten laptop copy and an old backup are all it takes to lose a working program and hours of production. A disciplined version history tells you exactly what changed, who changed it, why, and how to roll back safely.

Git and L5X Export TIA Portal VCI FactoryTalk AssetCentre Management of Change

Folders named final, final2 and really final are not a version history. Proper PLC version control records every edit with an author and a reason, compares it with the running controller and lets you restore a known good program in minutes.

Hello everyone, today we are going to learn what PLC version control is, how Git, Siemens VCI and Rockwell AssetCentre handle program changes, and how to set up safe change management in a plant.
PLC version control

What Is PLC Version Control?

PLC version control is the practice of storing every saved revision of a controller program in a managed archive, together with the author, the date and a short reason for the change, so that any two versions can be compared and any earlier one restored. It applies to every programmable logic controller, HMI project and drive configuration that keeps a plant running.

Without it, engineers keep copies on laptops, USB drives and shared folders with names like Line2_final_new. When a fault appears after a change made by online programming, nobody can say with confidence which program is running or what was edited last night.

Advertisement

Why Plants Need a Version History for Controller Code

In a Control Engineering article, Matt Lee and Vaughn Varma of Copia Automation list eight common problems that Git based tools can address. They include losing code or using a backup that was too old, working off an outdated version and not knowing who changed what, when and why.

8Common code problems listed by Copia
40%Onboarding cut cited from Forrester
85%Say Git helps write better code
V16TIA Portal release that added VCI

The same article cites a Forrester report that Git cuts onboarding and training by 40 percent, and a survey in which 85 percent of respondents said Git helps them deploy better code. These figures come from general software teams, not plants.

For maintenance teams in India, the practical gain is simpler. When a packing line stops at 2 a.m., the technician must know that the copy on the engineering station matches the controller, which is also the first question in any PLC fault recovery effort.

Do You Know?

A controller can run a program that exists nowhere else if someone edited it online and never saved the project. If that controller fails, the only true copy of the logic is lost with it.

Backups Versus Versions: Not the Same Thing

A backup is a snapshot that lets you recover after a hardware failure or a corrupted memory card. A version is a backup plus context: who saved it, which earlier version it came from, what changed and why.

What a Plain Backup Gives You
  • A copy you can download after a failure.
  • Protection against lost memory cards.
  • Simple to set up on a file server.
  • Useful for disaster recovery drills.
What It Does Not Give You
  • No record of who changed what or why.
  • No easy compare between two copies.
  • Old copies get overwritten or mislabelled.
  • No approval step before a download.

Good PLC version control keeps both, with scheduled backups pulling the running program and the archive explaining how it evolved. This idea sits alongside wider cybersecurity standards for PLCs, which expect plants to know and protect their configured state.

Main Tools for PLC Version Control

Git With Text Export

Programs exported as XML or structured text and committed to a Git repository.

Best for: teams comfortable with software tools
Free core
Siemens TIA Portal VCI

The Version Control Interface exports project elements to a workspace that Git can track.

Best for: Siemens S7 1200 and S7 1500 projects
Built in
Rockwell FactoryTalk AssetCentre

Central archive with check out, check in, audit trail and scheduled backups.

Best for: large Rockwell plants, many vendors
Enterprise
Copia and Similar Platforms

Git based service that renders ladder and other vendor formats for review.

Best for: multi vendor teams wanting visual diffs
Subscription

DMC, a Siemens integrator, explains that Siemens released the Version Control Interface in TIA Portal V16. VCI imports and exports elements of a project as XML files in a workspace, which is just a folder on the PC that can sit inside a Git repository.

Rockwell Automation describes FactoryTalk AssetCentre as a system that manages versions of programs, files and folders and controls who can access them. Its ordering guide also says it periodically queries Logix controllers for critical changes and reports any differences, which suits plants with many Allen Bradley PLCs.

VCI only keeps the project and workspace in step, while Git commands do the commit. Studio 5000 projects can similarly be exported as L5X, which is XML text that Git can track, and platforms such as Copia render ladder rungs visually for review.

Quick Tip

Commit the exported text files and also the native project archive in the same commit. The text gives readable differences, while the archive is what you actually open and download in an emergency.

7 Smart Steps to Set Up PLC Version Control

1
Build an Asset List
Record every PLC, HMI, drive and robot with its firmware and software version.
2
Choose the Tool
Pick Git with exports, a vendor tool or a managed platform that fits your vendors.
3
Define the Structure
One repository or folder per line or area, with fixed naming rules.
4
Set Commit Rules
Every save needs an author, a ticket number and a one line reason.
5
Link to MOC
No download to a live controller without an approved change request.
6
Automate Backup and Compare
Schedule uploads from controllers and flag differences from the archive.
7
Train and Test Restores
Teach the team, audit monthly and restore a version in a drill.

Step one is often the hardest, because many plants do not have a full list of their controllers. An OT asset inventory is the natural starting point, since it already lists device types, locations and firmware.

Step four gives the most value later. A message such as fixed pump P101 restart delay, ticket 2318 tells the next engineer far more than updated logic.

Step five ties the tool to your management of change process. The same discipline that governs OT patch management should govern logic changes, because both alter how the plant behaves.

Do You Know?

Rockwell lists disaster recovery add ons for Siemens TIA Portal, Schneider Control Expert and Mitsubishi GX Works as well as its own controllers. A single archive can therefore cover a mixed brand plant.

How a Controlled Change Flows

RequestOperator or engineer raises a change request with the reason
ApproveProcess, safety and maintenance leads review the risk
Check OutEngineer takes the latest approved version from the archive
Edit and TestChanges are made and tested offline or in simulation
CommitNew version saved with author, ticket and comment
DownloadApproved version loaded to the controller in a planned window
VerifyRunning program compared with the archive and the change closed

The tested version is the one carried into a factory acceptance test, so the archive proves exactly what the client accepted.

If the running program does not match the committed version after download, the change is not complete. Good PLC version control makes this final compare a routine step.

Storage Formula for PLC Version Control Archives

Vendor project files are binary, so many archives store a full copy for every version. Estimate the worst case before you size a PLC version control server.

Storage (MB) = project size × versions per month × months kept × number of controllers
Storage (GB) = Storage (MB) ÷ 1024

Example:
Project size = 25 MB, 8 versions per month, 36 months, 40 controllers
Versions = 8 × 36 × 40 = 11520
Storage = 25 × 11520 = 288000 MB
Storage = 288000 ÷ 1024 = 281.25 GB

Git and many archive tools compress files, so real use is usually lower. Treat the result as the ceiling for PLC version control storage.

Archive Storage Calculator

Worst Case Full Copy Archive Size
Result
Full copy storage 281.25 GB for 11520 archived versions
Advertisement

Second Worked Example: A Small Process Plant

A small chemical unit in Gujarat has 12 controllers with project files of about 5 MB each. The team saves about 4 versions a month per controller and wants 5 years, or 60 months, of history.

Versions = 4 × 60 × 12 = 2880, and storage = 5 × 2880 = 14400 MB, which is 14400 ÷ 1024 = 14.06 GB. Even a modest server handles this, so storage is rarely the real barrier to good PLC version control.

Commit Messages and Branches in PLC Version Control

A commit is a saved version with a message. Branches let one engineer develop a new recipe feature while the main branch still holds the version that runs the plant, a pattern that suits modular code written in structured text.

Main Branch
Holds only versions approved for or running on the controller.
Feature Branch
Used for new logic until it is tested and approved.
Tags
Mark exact versions downloaded on a date, such as SAT accepted.
Change Log
Human readable list of changes for operators and auditors.
Pull Request
Peer review of logic before merging into main.

Binary project files cannot be merged line by line, so most teams let only one person edit a given block at a time. Rockwell AssetCentre enforces this with check out and check in, and beginners can practise the workflow with free PLC programming software first.

Quick Tip

Tag the exact version you download during commissioning with the date and the word accepted. Months later, a single compare against that tag shows every change made since handover.

Advertisement

Common Mistakes With Controller Code History

Myth: A nightly backup is the same as version control.
Fact: A backup has no author, reason or easy comparison, so it cannot explain a change.
Myth: Git cannot handle PLC projects.
Fact: Exports such as L5X and TIA Portal VCI XML files work well in Git repositories.
Myth: Version control is only for big plants.
Fact: A plant with three controllers loses just as much production when the only good copy disappears.
Myth: Online edits do not need records.
Fact: Online edits are the changes most likely to be forgotten, so they need the strictest records.

A common mistake is allowing remote downloads from vendor laptops that bypass the archive. Tight PLC remote access security closes that gap, because every connection then goes through a controlled engineering station.

Another mistake is keeping the archive on the same server as the SCADA, so one failure removes both. Keep a second copy offsite, a principle explained in the Purdue model for ICS cybersecurity, where engineering data sits in a protected zone.

PLC Version Control Audit Checklist

  • Every controller appears in the asset list with firmware version.
  • Each running program matches a committed version in the archive.
  • Every commit has an author, a date, a ticket and a reason.
  • Online edits are uploaded and committed the same day.
  • Downloads happen only after an approved change request.
  • Scheduled compare reports are reviewed by a named person.
  • An offsite copy of the archive exists and is tested.
  • A restore drill has been done in the last 12 months.

Run this checklist every quarter and record the result, archiving PLC diagnostic status bits and fault logs with the program.

FactoryTalk AssetCentre Ordering Guide

PDF
FactoryTalk AssetCentre Software Ordering Guide
Rockwell Automation publication on version control, audit trail and disaster recovery

Automated PLC Backup Demonstration Video

PLC Version Control FAQ

What is PLC version control?

It is the managed storage of every saved revision of a controller program with its author, date and reason. Any two versions can then be compared, and any earlier one can be restored.

It replaces scattered copies on laptops and USB drives with one trusted archive. The team always knows which version is running and what changed last.

Is a nightly backup enough?

A backup lets you recover after a hardware failure or a corrupted memory card, which is valuable on its own. It does not record who changed the logic, why they changed it or what exactly changed.

Version control adds that history and makes comparison easy. Most plants need both, with scheduled backups feeding a properly managed archive.

Can Git store Siemens and Rockwell projects?

Yes, provided the project is exported to text first. Siemens TIA Portal V16 and later can export to XML through the Version Control Interface, and Studio 5000 can export L5X files.

Git then tracks those files like any other source code. Keep the native project archive in the same commit so you can open it quickly.

What does FactoryTalk AssetCentre do?

It is a Rockwell Automation archive that manages versions of programs and files and controls who can access them. It keeps an audit trail of user actions in a central database.

It can also schedule backups and query Logix controllers for changes. An optional add on brings an electronic signature workflow for check out and check in.

How does version control support change management?

The archive shows the approved version before a change and the new version after it. Reviewers in process, safety and maintenance can compare the two and confirm that only the requested logic was altered.

Linking each commit to a change request number closes the loop. Auditors can then trace any edit back to its approval and its test record.

How should online edits be handled?

Upload the program from the controller as soon as the online edit is finished. Commit it the same day with a clear message and the related ticket number.

Online edits are the most likely to be forgotten, so many sites run an automatic compare every night. Any difference is then reported to the engineer on duty.

How much storage does an archive need?

Multiply project size by versions per month, months kept and number of controllers. For 25 MB projects, 8 versions a month, 36 months and 40 controllers, the ceiling is about 281 gigabytes.

Real use is usually lower because many tools compress files and store changes. Still plan for HMI and drive files in the total.

Advertisement

Related Articles

External References

What We Learn Today

  • PLC version control stores every program revision with author, date and reason, so engineers can compare versions, trace edits and restore a known good program quickly.
  • Siemens added the Version Control Interface in TIA Portal V16, and Studio 5000 exports L5X files, so both can be tracked in an ordinary Git repository.
  • Link every commit to an approved change request, automate backups and compares against running controllers, and test a restore at least once a year.
I hope you like above blog. There is no cost associated in sharing the article in your social media. Thanks for reading!! Happy Learning!!
Sunayana Gadepatil, author at Instrumentation Blog
Author · instrumentationblog.in
Ms. Sunayana Gadepatil is an instrumentation professional, technical writer, and the author behind Instrumentation Blog. With a strong interest in industrial instrumentation, process measurement, and automation, she specializes in simplifying complex technical concepts into clear, practical, and easy to understand insights. Through her articles, Ms. Sunayana shares valuable knowledge on flow, pressure, level, temperature, control systems, and industrial automation for engineers, students, technicians, and industry professionals.
Technically reviewed on

Leave a Reply

Your email address will not be published. Required fields are marked *