Control programming software strategies for industrial systems

Control programming strategies for industrial systems are changing because of the desire to reuse and adapt programming for a variety of controllers: PLCs, PACs, IPCs, and embedded controls. Control Engineering Poland provides answers.


What are the options when preparing industrial control system applications? Does the user have to choose between robustness and functionality of the control solution? Are there solutions for rapid prototyping of industrial control systems?

X20CP1485 controller from Bernecker+Rainer serves in a didactic test-stand. Courtesy: Control Engineering Poland

Most of the off-the-shelf programmable logic controllers (PLCs) can be programmed in at least one of the languages described in IEC 61131-3:

  • IL – Instruction List – low-level programming language similar to Assembler
  • LD – Ladder Diagram – graphical language based on rules of the electrical circuits with wires, relays, etc.
  • FBD – Function Block Diagram – graphical language with the possibilities to implement complex control and numerical functions in a simple way. User can use provided function blocks grouped in libraries and create custom blocks (written in any of the IEC 61131-3 compliant languages) to build a control algorithm.
  • ST – Structured Text – text language similar in its syntax to Pascal and Basic; effective solution for every complex control algorithm
  • SFC – Sequential Function Chart – graphical language describing operation of the process and machine. This is the only language in the IEC 61131-3 standard that depends on usage of at least one other language from the list. SFC is used to create a state machine of the process; each state is created with another language, such as ST or IL.

What’s most commonly used now? In a poll of Control Engineering U.S. and Control Engineering Poland readers, the most popular programming language is Ladder Diagram.

Survey shows programming languages usage in Poland 2011. Courtesy: Control Engineering Poland

Function block diagram language, similar to circuit with logic elements, is in second place among PLC programming languages.

In third place is Instruction List language. Advanced accumulator management engines help with the most complex numerical dependencies within a control system algorithm.

A Control Engineering online poll showed overwhelming preference for ladder logic, a trend that’s continued for decades, despite many good reasons for using other control programming options.

Structured Text language can be used to implement any control algorithms. Advanced users can easily create their own regulator function blocks controlling both Single-Input Single-Output (SISO) and Multiple-Input Multiple-Output (MIMO) processes. This language takes fourth place on the most popular PLC programming languages list. It’s becoming more popular with the increasing computing power of the newest PLCs.

National Instruments Compact RIO can be used in a multi-channel sound and vibration measurement system. Courtesy: Control Engineering Poland

Structured Text language is the perfect tool to create user libraries, which add value to every PLC. Function block usage is the first step in creating object-oriented tasks for PLC. The number of people declaring knowledge of ST is increasing each year. Many young engineers prefer ST to LD, so it will be gaining popularity in the industry in coming years.

With SFC language, known as “language of the technologist,” users can create flowcharts of the whole machine or process.

Simple PID controller in ST language Courtesy: Control Engineering Poland

Certain PLCs now accept programming using ANSI C language, compliant with the Kernighan and Ritchie standard. Some advanced models can be even programmed with C++.

Industrial control systems manufacturers often offer additional, platform-dependent, dedicated programming languages. They are prepared by manufacturers to easily integrate with hardware-specific functions, such as access to BIOS, unique serial numbers, etc.

Digital servodrives from Bernecker&Rainer and Bosch Rexroth are mounted in a didactic test-stands. Courtesy: Control Engineering Poland

Industrial PCs (IPC) are equipped with traditional operating systems, usually Microsoft Windows, and real-time systems running on the same PC. The advantage of such a connection is the use of “real-time” languages from the IEC 61131-3 list and Microsoft Windows-based high-level languages like C++ or C#. During recent years many traditional PLCs have evolved, and sometimes it’s hard to distinguish PLCs from IPCs. When the device has much more functionality than PLC, computing power similar to IPC, but the robust enclosure of a PLC, it is a programmable automation controller (PAC). PACs have gained distributed control system (DCS) manufacturers’ attention; some are using PACs in their DCS offerings. PACs allow the use of a larger number of textual high-level programming languages (C, C++, C#) as well as graphical ones (see below).

To program complex control systems, a new programming language has been introduced, Continuous Function Chart (CFC). CFC is high-level graphical language similar to FBD, but it has the additional functionality of being able to create multi-thread algorithms that can be computed in parallel from a programmer’s point of view.

Graphical programming

Graphical programming (such as Mathworks Matlab/Simulink, National Instruments LabVIEW, and others) is gaining more attention since these tools usually integrate programming and simulation functionality. Users can check or even look for correct regulator gains and prototype control algorithm of the machine/process in the software-in-the-loop mode.

Measurement and control system for diagnostics in CNC machining is based on National Instruments PXI architecture, from left, in : 1) image signal acquisition, 2) sound and vibration, 3) FPGA-based prototyping sub-system, 4) temperature analysis module, a

Graphical integrated development environment (IDE) interfaces, if properly designed, can be very helpful during system setup and debugging. Many new IDEs let users specify system configuration with drag-and-drop methods instead of hard-coding every parameter.

Control system design, simulation

Most control equipment IDEs—where control, visualization, and motion are designed—can simulate the final project before it is compiled and uploaded to the hardware. The newest advanced IDEs are complex IT systems supporting pure OPC technology (OLE for Process Control) and OPC Data Access protocol. (For instance, Mathworks Matlab/Simulink can be an OPC DA client and get data from an industrial control system supporting OPC.)

Mechatronic parallel design

Mechatronic design techniques help create proper machine control systems. To rapidly prototype the software-hardware design of a new control algorithm (with a scientific approach), the following steps must be taken:

1. Preparing of simulation model

2. Compilation of the project and testing in hardware prototyping platform

3. Designing of the dedicated hardware platform based on microcontrollers, FPGAs, etc.

A new approach for industrial control systems prototyping eliminates the necessity of using a dedicated interface card (such as dSpace DS1104 or others). It enables the possibility for final target system programming from the level of simulation software. It also assures a short time to market for new, complex products.

For more, see the January North American print and digital edition cover story on control programming and design and related Online Extras.

- Krzysztof Pietrusewicz and Łukasz Urbański teach at West Pomeranian University of Technology, Szczecin, and contribute to Control Engineering Poland. Edited by Mark T. Hoske, Control Engineering, . 

More about the authors

- Krzysztof Pietrusewicz, PhD, is an assistant professor at the Control Engineering and Robotics chair, Faculty of Electrical Engineering at the West Pomeranian University of Technology, Szczecin, Poland (formerly Szczecin University of Technology), and contributor to Control Engineering Poland. His current research is in control engineering, computer controlled systems, hybrid control systems, real-time systems, artificial intelligence, and mechatronics. He has introduced simplified engineering design methods of fuzzy-logic PI/PD, PID, and PIDD controllers. He is also coauthor of two books: “Two-Degrees of Freedom Robust PID Control in Practice,” Polish, in 2006, and “Programmable Automation Controllers PAC,” in Polish, in 2007. He teaches courses in embedded control systems, hybrid control systems, and programmable automation controllers, as well as PLCs and digital control of intelligent servodrives (digital motion control). Reach him at krzysztof.pietrusewicz(at)

- Łukasz Urbański, MSc, is a PhD student at the Faculty of Electrical Engineering, West Pomeranian University of Technology. His specialty is the digital control of machines, such as computer numerically controlled milling machines. He also is a contributor to Control Engineering Poland.

No comments
The Top Plant program honors outstanding manufacturing facilities in North America. View the 2015 Top Plant.
The Product of the Year program recognizes products newly released in the manufacturing industries.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
Safer human-robot collaboration; 2017 Maintenance Survey; Digital Training; Converting your lighting system
IIoT grows up; Six ways to lower IIoT costs; Six mobile safety strategies; 2017 Salary Survey
2016 Top Plant; 2016 Best Practices on manufacturing progress, efficiency, safety
Mobility as the means to offshore innovation; Preventing another Deepwater Horizon; ROVs as subsea robots; SCADA and the radio spectrum
Future of oil and gas projects; Reservoir models; The importance of SCADA to oil and gas
Big Data and bigger solutions; Tablet technologies; SCADA developments
Automation modernization; Predictive analytics enable open connectivity; System integration success; Automation turns home brewer into brew house
Commissioning electrical systems; Designing emergency and standby generator systems; Paralleling switchgear generator systems
Natural gas for tomorrow's fleets; Colleges and universities moving to CHP; Power and steam and frozen foods

Annual Salary Survey

Before the calendar turned, 2016 already had the makings of a pivotal year for manufacturing, and for the world.

There were the big events for the year, including the United States as Partner Country at Hannover Messe in April and the 2016 International Manufacturing Technology Show in Chicago in September. There's also the matter of the U.S. presidential elections in November, which promise to shape policy in manufacturing for years to come.

But the year started with global economic turmoil, as a slowdown in Chinese manufacturing triggered a worldwide stock hiccup that sent values plummeting. The continued plunge in world oil prices has resulted in a slowdown in exploration and, by extension, the manufacture of exploration equipment.

Read more: 2015 Salary Survey

Maintenance and reliability tips and best practices from the maintenance and reliability coaches at Allied Reliability Group.
The One Voice for Manufacturing blog reports on federal public policy issues impacting the manufacturing sector. One Voice is a joint effort by the National Tooling and Machining...
The Society for Maintenance and Reliability Professionals an organization devoted...
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
Maintenance is not optional in manufacturing. It’s a profit center, driving productivity and uptime while reducing overall repair costs.
The Lachance on CMMS blog is about current maintenance topics. Blogger Paul Lachance is president and chief technology officer for Smartware Group.
This digital report will explore several aspects of how IIoT will transform manufacturing in the coming years.
Motion control advances and solutions can help with machine control, automated control on assembly lines, integration of robotics and automation, and machine safety.
Compressed air plays a vital role in most manufacturing plants, and availability of compressed air is crucial to a wide variety of operations.
Maintenance Manager; California Oils Corp.
Associate, Electrical Engineering; Wood Harbinger
Control Systems Engineer; Robert Bosch Corp.
click me