How to Automate Tasks with the Logix Designer SDK

Engineers are generally smart and expensive resources. Because of this, their time should not be wasted doing boring, repetitive tasks.
One of the easiest ways to relieve engineers of boring, repetitive tasks is to automate them. This frees up engineers to work on interesting, complex problems.
In this article, I’ll show you how to use the Logix Designer SDK to write applications that automate common tasks in Studio 5000 Logix Designer.
Studio 5000 Logix Designer is a programming software for Allen-Bradley PLCs. If you want to learn more, check out the course Learn How to Program Allen Bradley PLCs Using Studio 5000.
What is an SDK?
Before I explain how we can use the Logix Designer SDK to automate tasks, I want to explain what an SDK is.
An SDK, or Software Development Kit, is a set of tools that can be used to speed up the development of an application.
The Studio 5000 Logix Designer includes an SDK that lets you automate tasks programmatically. The Studio 5000 Logix Designer SDK contains an API, or Application Programming Interface, and documentation.
The API is a set of software functions that can be used to interact with Studio 5000 Logix Designer, and the documentation is a set of examples that explain how to use the API.
You can use the Logix Designer SDK to create applications that automate repetitive, boring, and low-value work.
Let’s switch over to Visual Studio to see an example of an application built with the Logix Designer SDK.
Example workflow
In Visual Studio, I have created an example application that uses the Logix Designer SDK to automate the process of upgrading a project and performing regression tests on the project to make sure that it still works after the update.
Let’s step through the project to see what’s happening.
In the first region, I am converting an existing Logix Designer project to a newer version using the ConvertAsync method.
In the next region, I am building the converted project using the BuildAsync method. This compiles the project to a binary file and verifies that there are no errors in the project.
In the next region, I set the communication path for the controller using the SetCommunicationPathAsync method.

In the next region, I download the project to the controller using the DownloadAsync method.
After downloading, I put the controller into run mode using the ChangeControllerModeAsync method.

Finally, I test the project by writing values to tags and reading values from tags using the SetTagValueBOOLAsync and GetTagValueBOOLAsync methods. In this case, I am verifying that if the start button is pressed, the motor starts running.

Result
Let’s run the project to see how it works.
We can see that the project has been converted to a newer version.
Then the updated project is built successfully.
Next, the communication path to the controller is set.

Now the project has been downloaded and is in Remote Program mode.
Now the PLC has been put into Remote Run mode and is executing the code.

Finally, the test is executed and the result is displayed. The test has passed, and we do not have a regression in the code.

This is a simple example, but you could imagine that you could scale this up to automate complex testing on a fleet of controllers quite easily.
Wrap-Up
In this article, I have demonstrated how you can use the Logix Designer SDK to automate tasks and free up engineering time to work on interesting, complex projects or to develop their skills using RealPars Business.
Visit realpars.com/business and add your contact information. Our team will quickly get in touch to discuss how we can support your team's development.
Frequently asked questions
The Logix Designer SDK is a software development kit that automates tasks within Studio 5000 Logix Designer. It allows you to create applications that handle repetitive and low-value work.
It allows engineers to automate common tasks like project upgrades and testing. This frees them up to work on more interesting, complex problems.
Yes, you can automate regression testing to ensure your project works correctly by using the Logix Designer SDK.
Yes, some programming knowledge is required, especially with tools like Visual Studio and the API provided in the SDK.
The Logix Designer SDK is available for free, but you need a valid license for Studio 5000 Logix Designer to use it effectively. Be sure to check with Rockwell Automation for any licensing requirements.
Learn from Industry Experts
With a 7-day trial, then €35/month