IEC 61131-3, along with PLCopen extensions and support, provides software standards essential for efficiently achieving competitive manufacturing—including implementing Industry 4.0, Industrial Internet of Things, and Internet of Things systems. The standards enable engineers to create industrial automation applications using structured modern software techniques that have been proven in the computer industry over many years to increase productivity, quality, and functionality of industrial automation systems. Another major benefit is a common base of understanding and training for application engineers and service people.
The IEC 61131-3 standard is supported by two groups: the International Electrotechnical Commission (IEC) and PLCopen.
International Electrotechnical Commission
IEC 61131 is an International Electrotechnical Commission (www.iec.ch) standard for industrial controllers that has seven parts. IEC 61131-3 defines programming languages. Since 1906, the IEC has been a nonprofit, nongovernmental international standards organization that prepares and publishes international standards for all electrical, electronic, and related technologies collectively known as “electrotechnology.” Eighty two countries are IEC members, and another 82 participate in the affiliate country program. The IEC is headquartered in Geneva, Switzerland, with regional centers in Asia-Pacific (Singapore), Latin America (São Paulo, Brazil), and North America (Boston).
The PLCopen (PLCopen.org) organization was founded in 1992 as a not-for-profit industry association of member companies committed to developing open industrial automation software standards to increase functionality while reducing engineering, training, operations, and maintenance costs. PLCopen has a vendor certification program, and certified products are listed on the organization website. PLCopen is headquartered in The Netherlands, with regional representatives in North America, Japan, and China. The website describes certifications of IEC 61131-3 compliant programming systems.
Internet of Things
Internet of Things (IoT) concepts are driving computing into edge devices, such as sensors and powerful single-chip computers, and IEC 61131-3 is suited for these embedded applications. It provides the programming standard to support implementations of IoT technology for industrial controls in automation.
Software intensive systems
Industrial automation systems are becoming software intensive, making them more flexible and feature-rich and creating the need for more efficient programming based on an integrated modular programming software standard. IEC 61131-3’s logical high-level modular programming environment increases productivity and quality. This is consistent with the evolution in the computer industry from low-level programming to higher-level modular programming. The IEC 61131-3 software programming environment is inherently self-documenting, so it is easier to perform additions and add new functions to existing systems. PLCopen functions added within the framework of the IEC 61131-3 standard continually bring new capabilities. Improving the efficiency of software development and ongoing support is important, since typically software enhancements and maintenance costs are at least twice the initial development investment of applications.
Integrated development environment
The IEC 61131-3 development platform for building applications is an integrated design environment (IDE) for creating, simulating, and debugging applications. Using IDE applications, people build control and automation logic, define alarms, and create human-machine interface screens in one software platform. IEC 61131-3 programs developed in an IDE are downloaded into target processors where they control processes in real time. When applications are downloaded to a target controller, the IDE engineering tools include online debugging, break points, watch windows, and forcing variable functions.
IEC 61131-3 defines a task-oriented environment that has the flexibility to meet the control requirements for any application. At the highest level, all the software required to solve a particular control problem can be formulated as a “configuration.” A configuration is specific to a particular type of control system, including the arrangement of the hardware (processing resources, memory addresses for I/O channels, and system capabilities). Within a configuration, users define one or more resources. One can look at a resource as a processing facility that can execute IEC programs. Within a resource, one or more tasks can be defined. Tasks control the execution of a set of programs or function blocks. These can be executed either periodically or upon the occurrence of a specified trigger, such as the change of a variable. Programs are built from a number of different software elements written in any of the IEC-defined languages. Typically, a program consists of a network of functions and function blocks, which can exchange data. Function and function blocks are the basic building blocks, containing a data structure and an algorithm.
IEC 61131-3 defines strong data typing to prevent programming errors (e.g., dividing a date by an integer). Common data types are Boolean, integer, real and byte and word, date, array, time of day, and string. Based on these, users can define specific data types for an application, known as derived data types. Variables are only assigned to explicit hardware addresses (e.g., input and outputs) in configurations, resources, or programs, so there is a high level of hardware independence that supports the reusability of the software. The scopes of the variables are normally limited to the organizational unit in which they are declared (e.g., local). This means that their names can be reused in other parts without any conflict, eliminating another source of error. If the variables have global scope, they have to be declared as global. Parameters can be assigned an initial value at start up and cold restart to ensure proper operation.
The IEC 61131-3 standard defines five languages that all can be used together and share common data types.
Instruction List (IL) is textual language that resembles low-level assembler programming.
Ladder Diagram (LD) has its roots in the U.S. and is based on the graphical presentation of Relay Ladder Logic. Relay Ladder Logic is acknowledged to be the first graphical industrial automation programming method that significantly improved productivity.
Function Block Diagram
Function Block Diagram (FB) has been very common in the process industry and is now used in all applications. It expresses the behavior of functions, function blocks, and programs as a set of interconnected graphical blocks, like in electronic circuit diagrams. It looks at a system in terms of the flow of signals between processing elements. Function blocks contain algorithms and may contain data if required. The inputs and outputs of function blocks have defined data types to prevent errors in programming.
A temperature control loop, or proportional, integral, derivative (PID), is an excellent example of a function block. Once defined, it can be used over and over again, in the same program, different programs, or even different projects. This makes it highly reusable.
Function blocks can be written in any of the IEC languages. In addition, for many implementations, users can create functions with the “C” programming language. These capabilities let users create new function blocks for projects and applications to promote reuse of proven code.
IEC has defined standard functions, such as ADD(ition), ABS (absolute), SQRT, SINus, and COSinus. These functions are available to use in IL, LD, ST, and FB programming.
Structured Text (ST) is a very powerful high-level language with its roots in Ada, Pascal, and “C.” It contains all the essential elements of a modern programming language, including selection branches (IF-THEN-ELSE and CASE OF) and iteration loops (FOR, WHILE, and REPEAT). All standard IEC 61131-3 functions can be used in Structured Text programming, and users can create their own function blocks for applications and projects.
Sequential Function Chart
Sequential Function Chart (SFC) describes graphically the sequential behavior of control programs and helps to decompose a control problem into manageable parts, while maintaining an overview of the execution flow. SFC consists of steps, linked with action blocks and transitions. Each step represents a particular state of the systems being controlled. A transition is associated with a condition, which, when true, causes the step before the transition to be deactivated, and the next step to be activated. Steps are linked to action blocks performing a certain control action. Each element can be programmed in any of the IEC languages, including SFC itself. One can use alternative sequences and even parallel sequences, such as those commonly required in batch applications. For instance, one sequence is used for the primary process, and the second for monitoring the overall operating constraints. Because of its general structure, SFC also provides a communication tool, combining people of different backgrounds, departments, or countries. SFC can be used to define both serial and parallel processes. Application examples include startup sequences, shutdown sequences, batch process control, and machine cycle operations.
Two major new developments are the addition of the PLCopen XML interchange standard and the PLCopen OPC UA standard.
The PLCopen XML standard provides an open, nonproprietary, software interface for the interchange of industrial and process control programs between controls, product life-cycle management, machine and process simulation, computer-aided design, documentation software, and other systems. The PLCopen XML schemas, documentation, and an introduction are available free at www.control-xml.com. The files include an explanation of the PLCopen XMLSchema, a document on XML formats for IEC 61131-3, and XML schema files. The PLCopen standard has gained acceptance by the AutomationML organization (www.AutomationML.org).
PLCopen jointly developed the PLC open OPC UA standard with the OPC Foundation. It includes data models to simplify the interface between controllers, control software, and business enterprise systems. The integration of data with real-time control and business information systems is done using these function blocks.
The function blocks are also defined for direct machine-to-machine communications between multiple vendor controllers to coordinate automation. These are important functions for achieving the goals of Industry 4.0, the Industrial Internet of Things, and smart factory applications to improve manufacturing efficiency and productivity. These function blocks simplify the integration of production, process control, packaging, and other machines into efficient new system architectures.
Design philosophy fundamentals
IEC 61131-3 and PLCopen standards lower the life-cycle cost of automation and control implementations with a design philosophy enabled by the standards. Engineers that leverage the standards have a great advantage when programming applications that make all aspects of the control and automation life cycle more efficient.
How to View ISA Standards
You can access all standards and technical reports with your ISA membership. Click this link to go to ISA Standards page at the ISA website.
A version of this article also was published at InTech magazine.