Overview of
IEC 61131-3
OPEN CONTROL STANDARD FOR AUTOMATION SOFTWARE
What is IEC 61131-3?
IEC 61131 is an international standard series created by the International Electrotechnical Commission (IEC) for programmable logic controllers (PLCs). Part 3 (IEC 61131-3) establishes a vendor-independent standard for a suite of industrial programming languages, providing a familiar PLC programming environment that enables automation professionals to create structured logic consistently across multiple vendor software platforms.
The Engineering Value of IEC 61131-3
While historically driven by European automation manufacturers, IEC 61131-3 has become the global baseline for industrial and process control. Today, North American machine builders and system integrators rely on the standard to simplify cross-platform integration and maintain code portability for global markets.
The adoption of IEC 61131-3 is driven directly by the growing software complexity of modern industrial automation. As control systems expand, the labor required to develop and maintain software has a massive impact on total project costs. Implementing a vendor-independent standard streamlines the entire application lifecycle from initial requirements and design to testing, installation and long-term maintenance.
IEC 61131-3 offers several key advantages for engineers and system integrators:
- Drastic Reduction in Software Lifecycle Costs: Maintenance and system upgrades typically account for two to four times the labor cost of initial programming. Standard logic structures make troubleshooting and modifying legacy code significantly faster.
- Hardware Independence: Logic built on IEC 61131-3 principles is vastly more portable than traditional, proprietary PLC code, offering users and system integrators a level of reusability never before available. Engineers can reuse proven software components across different controller brands without starting from scratch.
- Distributed Control Architecture: Modern embedded processors allow entire IEC-compliant control runtimes to live directly inside edge devices, protocol gateways and drives. Distributing logic to the edge eliminates the need to run tens of thousands of lines of code on a single, centralized controller.
- Faster Onboarding and Development: Because the development framework and syntax remain consistent across vendor platforms, engineering teams spend less time learning proprietary software tools and more time building application logic.
IEC 61131-3 Architecture
The easiest way to view the standard is to split it into two parts, Common Elements and Programming Languages.
Common Elements
Data Typing and Scope Management
Data Typing is a common element of the IEC 61131-3 standard with the purpose of preventing errors early on in development. It defines the type of parameters that will be used and attempts to avoid errors like dividing a date by an integer. The different types of data supported are:
- Boolean
- Integer
- Real
- Byte
- Word
- Date
- Time-of-day
- String
The standard also allows users to define their own variables. These are known as derived data types. In this way, an engineer would be able to define an analog input channel as a data type and re-use it over and over again.
Variables can be declared symbolically for internal use or directly mapped to hardware I/O addresses when needed. An IEC 61131 system is highly independent and able to function with little to no messaging from an external network.
The scope of the variable is limited to the organization unit in which they are declared. The great benefit of this feature is that their names can be reused in other parts without any conflict, eliminating another source of errors. If the variables have global scope, they can be declared as global. Parameters can be assigned their initial value at start up and restart.
Program Organizations Units (POUs)
Within IEC 61131-3, the programs, function blocks and functions are called program organization units (POUs). IEC 61131-3 includes defined standard functions instances, such as ADD, ABS, SQRT, SIN and COS, or the user can create a custom function block and use that function block multiple times.
Function blocks are software objects that represent a level of more detailed control. They can contain data as well as an algorithm. As software objects, they have well-defined interfaces and hidden internals. This creates a clear line between the different levels of the programs. With the characteristics just mentioned, functions and function blocks reflect best practices as embraced by object-oriented programming principles.
In most cases, function blocks can be written in any of the five standard languages. Some platforms also allow integration of external C code as a vendor-specific extension.
Sequential Function Charts (SFCs) are used to control the sequential behavior of a control program and support synchronization and concurrency.
Configuration, Resources and Tasks
At the highest level, the entire 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.
One can define resources within a configuration. A resource can be thought of 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 and/or function blocks. These can either be executed periodically or upon the occurrence of a specified trigger.
For instance, in an IEC 61131-enabled drive, a trigger could be set when RPMs fall below a predefined value. The trigger could start a task to increase speed. These results are instant and come directly from the drive. There is no lag or handshaking by an external PLC. This means that there is virtually no risk of losing a message or miscommunication. Feedback is nearly instantaneous compared to a programmable controller with an I/O and program scan time.
IEC61131-3 Programming Languages
IEC 61131-3 provides multiple language support within a control program. It’s typical for a program to consist of a series of high-level function blocks written in one or more of these languages.
Within IEC 61131-3, the syntax and semantics are defined for five standard programming languages, leaving no room for dialects. Once you have learned them, you can use a wide variety of systems based on this standard.
The control program developer can select the language that is best suited to a particular task, greatly increasing their productivity. Plus, with a standardized programming interface that is completely independent of the hardware platform, users can greatly reduce the cost of program maintenance and training across companywide automation applications.
Supported Languages List
IEC 61131-3 is the international standard for programmable controller programming languages. As such, it specifies the syntax, semantics and display for the following suite of PLC programming languages:
- Ladder Diagram (LD): Graphical representation based on traditional relay ladder logic.
- Function Block Diagram (FBD): Graphical representation where signal flow moves through reusable function blocks.
- Sequential Function Chart (SFC): Graphical language used for structuring complex sequential tasks and state machines.
- Structured Text (ST): High-level textual language (similar to C or Pascal) ideal for complex algorithms and data handling.
- Instruction List (IL): Low-level assembler-like textual language (deprecated in recent standard updates, but historically supported).
IEC 61131-3 Implementation in Practice
The end user can choose a programming language based on their knowledge, the problem at hand, external components, interfaces or simple preference. All languages are linked and provided with a common suite with a link to existing experience. In this way, they also provide a communication tool, combining people of different backgrounds.
Because the IEC 61131 standard’s structure is built on functions and function blocks, users are able to adopt either a top-down or bottom-up strategy to develop their programs.
- Top-Down: Structure the overall application sequence first using SFCs, then build out the individual function blocks to handle specific sub-tasks
- Bottom-Up: Create and test small, reusable POUs for specific field devices or mathematical operations first, then assemble them into complete control programs
Third-Party IEC 61131-3 Engines
To implement the standard, hardware vendors and system integrators often rely on third-party IEC 61131-3 development environments and runtime systems, such as CODESYS.
CODESYS is one of the most powerful IEC 61131-3 programming tools for controllers. It supports all five programming languages of the standard, combining the power of advanced programming languages, such as C or Pascal, with the easy handling and operational functions of PLC programming systems.
Unlike some competitive IEC 61131-3 offerings, CODESYS produces native machine code for many common processors. Native machine code is inherently faster and more efficient than interpreted solutions.
Application Case Study: Banner Engineering and RTA Implementation
A custom-programmed HMI allows access to a Banner SureCross DX80 Gateway Pro with CODESYS software. Using a free, open-source platform, designers can now program the gateways to manipulate data like a PLC.
Real Time Automation created this type of solution for Banner Engineering Corp., in Minneapolis, and their wireless product developer, Seasonix Inc., in Plymouth Minn., using CODESYS 61131-3 open control software. Through a customizable browser-based HMI interface, users can access and manipulate data from multiple wireless sensors.
Placing PLC functionality on the gateway reduces network traffic and can eliminate the need for a PLC in applications like this, reducing the footprint and cost of automating applications. In addition, the browser-based functionality allows users the ability to access data from any internet connection.
IEC 61131-3 FAQs
IEC 61131 is an international standard series created by the International Electrotechnical Commission (IEC) for programmable logic controllers (PLCs). Part 3 (IEC 61131-3) establishes a vendor-independent standard for a suite of industrial programming languages
The standard defines three graphical languages and two textual languages:
- Ladder Diagram (LD)
- Function Block Diagram (FBD)
- Sequential Function Chart (SFC)
- Structured Text (ST)
- Instruction List (IL)
Yes. One of the core strengths of the standard is its interoperability across languages. Because all languages share Common Elements (such as data types and Program Organization Units), you can mix languages within a single application. For instance, you can write a complex math algorithm in Structured Text (ST), encapsulate it in a Function Block, and drop that block directly into a Ladder Diagram (LD) or Function Block Diagram (FBD).
While IEC 61131-3 drastically improves reusability compared to legacy proprietary software, logic is rarely 100% plug-and-play across different hardware platforms. Vendors may implement hardware-specific libraries, custom communications function blocks or unique configuration structures. However, because the syntax, data types and logical structures are standardized, porting logic between compliant platforms (like moving code between Rockwell, Siemens, Beckhoff or CODESYS) requires minimal adjustment compared to rewriting code from scratch.
IEC 61131-3 resources
Certification Blogs
IEC 61131-3 Training
View the courses offered through Industrial Networking University:
- Basics of IEC 61131-3 Course – This course will cover the basics of IEC 61131-3. When you have completed this course, you should have a basic understanding of how IEC 61131-3 works.
