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?
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.
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.
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.
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.
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.
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 (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.
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, www.controleng.com .
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)zut.edu.pl.
- Ł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.
- Events & Awards
- Magazine Archives
- Oil & Gas Engineering
- Salary Survey
- Digital Reports
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