///// START OF VIDEO SCHEMA ///// ///// END OF VIDEO SCHEMA /////

Version Control in FactoryTalk Design Studio

Learn how the integrated version control system in FactoryTalk Design Studio works.
FactoryTalk Design Studio - thumbnail
Listen to this article

If you have ever worked on a project with multiple engineers before, you know that version control for PLC projects can be very messy.

Although everyone starts out with good intentions, by the end of the project there is typically a shared folder that contains PLC projects with names like PLC2100_310725_KB_V2_Final. To make tracking even harder, these projects rarely include an explanation of what has been changed, by who, when the change was made, and why the change was made.

If you’d prefer watching instead of reading, check out the video below. Otherwise, feel free to skip it and continue with the blog.

FactoryTalk Design Studio, Rockwell Automation’s next generation development environment for Logix 5000 systems, aims to improve the version control workflow for PLCs by integrating Git directly into the interface of FactoryTalk Design Studio.

If you’re not familiar with it, Git is a distributed version control system that has been used in the IT industry for years. Git allows multiple users to collaborate together on a project while tracking changes and storing backups of a project in a well-controlled way.

Git: distributed version control system

In this article, I’ll show you how the integrated version control system in FactoryTalk Design Studio works and how it enables multi-user collaboration.

Let’s start by looking at how it can be used to track changes in a project.

Version control in FactoryTalk Design Studio

In FactoryTalk Design Studio, I create a new project and specify where in the FactoryTalk Vault the project will be backed up to. FactoryTalk Vault is a secure remote repository that Design Studio projects are backed up to.

Then I click Create to create and open the project.

Create a new project in FactoryTalk Design Studio

While you work in the project, FactoryTalk Design Studio constantly checks if there are differences between your local project and the copy of your project that is stored in FactoryTalk Vault. You can see the status of this check in the bottom right corner of Design Studio.

Here, I add a Smart Object and a program to the project, and I can see that there are local changes in the project that are not backed up to FactoryTalk Vault.

Adding a Smart Object in FactoryTalk Design Studio

To get those changes into the vault, I have to do two things:

First, I commit my changes to the local repository. I do that using the Commit button on the version control toolbar.

When you commit a change to your local repository, you are basically creating a snapshot of the project that can be restored later. Each commit has a message explaining what has changed in the project.

After committing the changes to the local repository, I can push the changes to the remote repository using the push button the version control toolbar.

 Back up project to FactoryTalk Vault

The remote repository is the project that is stored in FactoryTalk Vault.

Now my changes have been backed up to the remote repository and, as you can see in the status bar, my local and remote repositories are synchronized again.

At any time, I can click on the Change History button on the version control toolbar to see a list of all of the commits that have been made for this project. This list shows a lot of details about the changes, including who made the change, when they changed it, and what message they included.

If I want to see exactly what has changed in a specific commit, I can do a detailed comparison between two commits. Right now, this comparison view is a textual view but Rockwell Automation are working on a graphical compare that will be included with a future release of Design Studio.

Create a new project in FactoryTalk Design Studio

As you can see, the integrated version control system in FactoryTalk Design Studio makes it very easy to track changes in a project, to manage project backups, and to restore a project to a previous state.

Version control also makes it easy for multiple people to collaborate in a single project. Let’s see how multi-user collaboration works.

Multi-User collaboration

In FactoryTalk Design Studio, multiple people can work together in a single project and share updates using the version control system. Here’s how it works:

When multiple users open the same project, they are actually opening a local copy of the project.

Here, I am opening the same project while signed on as a different user in a different session.

When one user makes a change to the project and pushes the change to the remote repository, the other user is prompted to pull the changes into their local copy of the project. This prompt is visible on the version control toolbar and the status bar.

Multi-User collaboration

After pulling from the remote repository, all of the changes are available in the project and the commit history is updated to show what changes have been pulled.

In case two users change the same line of code, a conflict occurs. When a conflict occurs, the person pulling the change can manually resolve the conflict and push the resolution back to the remote repository.

To resolve a conflict, you can accept the local change, accept the remote change, or keep both changes and resolve the conflict manually.

Manage conflicts in Multi-User collaboration

As you can see, the integrated version control system makes it easy for multiple people to work in a single project and share updates seamlessly.

Now that we have seen the features of the integrated version control system in FactoryTalk Design Studio, let’s talk about some of the limitations.

Limitations

Although the integrated version control system in Design Studio is implemented very well, there are some limitations.

Firstly, not all of the features of Git are currently supported. A key feature of  Git is the ability to create branches and merge them back into the main code. I’m hoping that branching and merging will be added to Design Studio in the future.

Secondly, you can only use FactoryTalk Vault for your remote repository. This is unfortunate because a lot of companies are already using GitHub and BitBucket to store their code repositories and it would make sense to keep their PLC code in the same place.

Wrap-Up

In this video, you saw the key features of FactoryTalk Design Studio’s integrated version control system and learned how it can be used to track changes, backup projects, and enable multi-user collaboration.

Although there are some limitations to this version control system, I think this is a huge step forward for version control in PLC projects and I really enjoy using it.

Let me know what you think about version control in FactoryTalk Design Studio and PLC projects in general in the comments below.

If unplanned downtime slows your production, RealPars Business helps your team gain the skills to fix issues fast. Train your team today at realpars.com/business.

FAQS

Frequently asked questions

What is FactoryTalk Design Studio?
What is FactoryTalk Vault?
What are commits and pushes?
What Git features are not yet supported in FactoryTalk Design Studio?

Learn from Industry Experts

Start Learning for Free