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.

12/29/2011


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, www.controleng.com .

www.controlengpolska.com 

www.zut.edu.pl 

www.controleng.com/new-products/PLCs-and-PACs.html 

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.



No comments
The Top Plant program honors outstanding manufacturing facilities in North America. View the 2013 Top Plant.
The Product of the Year program recognizes products newly released in the manufacturing industries.
The Leaders Under 40 program features outstanding young people who are making a difference in manufacturing. View the 2013 Leaders here.
The new control room: It's got all the bells and whistles - and alarms, too; Remote maintenance; Specifying VFDs
2014 forecast issue: To serve and to manufacture - Veterans will bring skill and discipline to the plant floor if we can find a way to get them there.
2013 Top Plant: Lincoln Electric Company, Cleveland, Ohio
Case Study Database

Case Study Database

Get more exposure for your case study by uploading it to the Plant Engineering case study database, where end-users can identify relevant solutions and explore what the experts are doing to effectively implement a variety of technology and productivity related projects.

These case studies provide examples of how knowledgeable solution providers have used technology, processes and people to create effective and successful implementations in real-world situations. Case studies can be completed by filling out a simple online form where you can outline the project title, abstract, and full story in 1500 words or less; upload photos, videos and a logo.

Click here to visit the Case Study Database and upload your case study.

Bring focus to PLC programming: 5 things to avoid in putting your system together; Managing the DCS upgrade; PLM upgrade: a step-by-step approach
Balancing the bagging triangle; PID tuning improves process efficiency; Standardizing control room HMIs
Commissioning electrical systems in mission critical facilities; Anticipating the Smart Grid; Mitigating arc flash hazards in medium-voltage switchgear; Comparing generator sizing software

Annual Salary Survey

Participate in the 2013 Salary Survey

In a year when manufacturing continued to lead the economic rebound, it makes sense that plant manager bonuses rebounded. Plant Engineering’s annual Salary Survey shows both wages and bonuses rose in 2012 after a retreat the year before.

Average salary across all job titles for plant floor management rose 3.5% to $95,446, and bonus compensation jumped to $15,162, a 4.2% increase from the 2010 level and double the 2011 total, which showed a sharp drop in bonus.

2012 Salary Survey Analysis

2012 Salary Survey Results

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.