IT invades controller programming

Sept. 8, 2016
Languages and standards borrowed from IT are being used for controller programming and IoT integration
About the author
Dan Hebert is a contributing editor for Controland Control Design. Reach him at [email protected].

Since the invention of the PLC in the 1960s, ladder logic has been the language of choice for programming PLCs. Ladder logic was based on control system diagrams for relay- and timer-based systems and was thus not ideal for solid-state PLCs driven by software programs, but it was first to market among all of the PLC languages and has established a solid foothold.

“From a commercial perspective, ladder logic is still a widely used language and, due to its prevalence, it is easier for machine builders to acquire talent and manage legacy/new controllers using a single set of programming skills,” says Sriram Ramadurai, product marketing manager for the automation portfolio at Omron Automation and Safety.

“From a programming stance, ladder’s graphical approach provides an easy way for users to understand program structure, making code debugging easy to visualize,” continues Ramadurai. “But ladder programming can become cumbersome when trying to program advanced math operations. Most development environment editors do offer advanced function blocks to reduce the complexity of ladder programming. However, with the increase in integrated automation requirements, both developers and maintenance personnel seek more flexibility and ease in programming.”

Matt Newton, director of technical marketing at Opto 22, also sees strengths and weaknesses with ladder and other traditional programming languages. “Ladder logic and function block programming are still great tools for simple repetitive automation applications,” he says. “But, as newly graduated students enter the workforce, the industry is beginning to shift, and that follows a trend we’re seeing as the IoT is adopted in industrial markets.”

One of the potential concerns machine builders face in using traditional languages for control programming is the dwindling pool of control program software developers versed in these legacy programming languages, warns Newton. “Most students coming out of school today haven’t been trained in these languages. Students leaving school today often have more programming experience and exposure to Web-based languages such as Java, Javascript and HTML—the languages of the Internet.”

The trends Newton mentions are the adoption of IT languages and standards for PLC and industrial controller programming. One of the main reasons for this shift, as noted by Newton, is the familiarity of new grads with IT programming languages. Another reason is the power of these languages to perform complex operations with just a few lines of code, as opposed to the many rungs of ladder logic or multiple function blocks required to perform the same operations.

Text-based languages are one example of how IT is penetrating PLC programming and helping machine builders to create code faster. “Structured text is a high-level language being adopted by the next generation of users because its programming structure helps them to meet the increasingly integrated and complex automation requirements of their customers,” notes Ramadurai.

“Many new PLC users have worked in MatLab and programmed projects in C language and then supplemented their skills by learning PLC languages from a community-college manufacturing or automation program or from a supplier of PLCs. Structured text feels more natural to them based on their background in programming. Structured text can be quicker to program in certain instances, especially for users who understand both ladder and structured text.”

Rest easy

Figure 1: Controllers can make use of the RESTful API standard to simplify data exchange between the controller programs and other applications. (Source: Opto 22)

Although easier to program, structured text programming can be hard to troubleshoot since it doesn’t use a graphical programming approach, explains Ramadurai. “This depends on the development environment editor being used, as structured text programs can be easy to debug with properly designed development environments,” points out Ramadurai.

For many, their first exposure to programming in high school or college begins with flowcharts, which become the basis for C language and other programs. “The flowchart interface is ideal for people who don't have a lot of experience programming automation controllers, or who simply prefer a more visual interface,” says Newton. “Developers of any experience level can quickly put together a real-world control system program in a very short amount of time.”

Given enough time and rungs, ladder can be manipulated to do just about anything, including communicating with cloud-based applications, but using IT standards and programming methodologies can greatly simplify and speed these integration tasks. “The application of open standards-based programming, development and communication technologies in industrial automation and manufacturing applications is a trend we’re continuing to see in our markets,” observes Newton.

To further illustrate what is a new concept to many in industrial automation, Newton details the advantages of the RESTful API standard. Representational state transfer (REST) systems communicate primarily over HTTP (Figure 1).

“RESTful APIs are the glue that binds cloud computing and IoT applications,” says Newton. “API stands for application program interface, and an API is what Web and cloud applications use to send and receive data between each other. When we say the API is RESTful, it means the API was developed using the REST architecture, which is a set of constraints that companies build their APIs against to make sure the APIs will work together. That’s a key point: APIs are open methods designed to make it easy for applications to share data with each other.”

Automation professionals don’t need to wait for IoT-enabled sensors or equipment in order to take advantage of valuable data that’s now inaccessible, says Newton. “Data in real-world legacy devices can be utilized by any application that can make RESTful HTTPS requests to read and write data,” he says.

Also read: Use PLC programming, not custom code

About the Author

Dan Hebert | PE

Dan Hebert is a contributing editor for Control and Control Design.

Sponsored Recommendations

Power Distribution Resource Guide

When it comes to selecting the right power supply, there are many key factors and best practices to consider.

Safe Speed and Positioning with Autonomous Mobile Robots

Here are some tips for ensuring safe speed and positioning for AMRs using integrated safety technology – many of these tips also apply to automated guided vehicles (AGVs).

Faster, Accurate and Reliable Motion Control With Advanced Inductive Technology

This white paper describes new technology offering improved position measurement capabilities in reliability, speed, accuracy and more.

The Value of Dual Rated AC/DC Disconnect Switches

Why is it necessary for me to have a disconnect switch installed in my application?