The IEC 61131-3 standard is the international benchmark for programmable logic controller (PLC) and distributed control system (DCS) programming. Published by the International Electrotechnical Commission, the current fourth edition (2025) defines the software architecture and programming languages used to develop industrial control applications. Understanding IEC 61131-3 is essential for any automation engineer, as it governs how control logic is structured, executed, and maintained across virtually every major PLC and DCS platform.
Programming Languages Defined
The current edition of IEC 61131-3 defines three graphical and one textual programming language. A fifth language — Instruction List (IL) — was deprecated in the 2013 edition and removed entirely in 2025.
| Language | Type | Abbreviation | Best Suited For |
|---|---|---|---|
| Ladder Diagram | Graphical | LD | Discrete logic, relay-replacement, maintenance-friendly |
| Function Block Diagram | Graphical | FBD | Continuous control, signal flow, complex algorithms |
| Structured Text | Textual | ST | Data processing, loops, conditional logic, calculations |
| Sequential Function Chart | Graphical | SFC | Batch processes, state machines, sequential operations |
| Instruction List (removed) | Textual | IL | Deprecated — low-level assembly-like operations |
Ladder Diagram (LD)
Ladder Diagram is the most widely recognized PLC programming language, originating from relay-based control panels. Programs are represented as rungs on a vertical power rail, with contacts (inputs) on the left and coils (outputs) on the right. LD is intuitive for electricians and maintenance technicians because it visually resembles electrical schematics.
Key elements:
- Normally Open (NO) contact — Passes power when the associated bit is TRUE.
- Normally Closed (NC) contact — Passes power when the associated bit is FALSE.
- Coil (output) — Energized when power flows through the rung from left to right.
- Set/Reset (latch) — Retains state after a momentary input condition.
- Function blocks on rungs — Timers, counters, and comparison operations embedded within ladder logic.
Function Block Diagram (FBD)
Function Block Diagram represents control logic as interconnected blocks where data flows from left to right. Each block performs a specific function (AND, OR, PID, timer, counter, arithmetic). FBD is the preferred language for process control applications because it clearly shows signal flow and is well-suited to continuous control strategies.
IEC 61131-3 defines standard function blocks including:
- Bistable elements — SR (set-dominant) and RS (reset-dominant) flip-flops.
- Edge detection — R_TRIG (rising edge) and F_TRIG (falling edge).
- Counters — CTU (up-counter), CTD (down-counter), CTUD (up/down counter).
- Timers — TON (on-delay), TOF (off-delay), TP (pulse).
- Communication — SEND and RECEIVE blocks for network messaging.
Structured Text (ST)
Structured Text is a high-level textual language with syntax similar to Pascal and BASIC. It is the most powerful of the IEC 61131-3 languages for complex mathematical operations, data manipulation, and algorithmic control. ST excels in applications requiring loops, conditional branching, array operations, and string handling.
Core language constructs:
// Conditional execution
IF temperature > high_alarm THEN
valve := FALSE;
alarm_active := TRUE;
ELSIF temperature > warning_limit THEN
alarm_active := FALSE;
ELSE
valve := TRUE;
END_IF;
// Iteration
FOR i := 0 TO 9 DO
avg_sum := avg_sum + tank_levels[i];
END_FOR;
average_level := avg_sum / 10;
// Function block instantiation
timer_01(IN := start_signal, PT := T#5S);
IF timer_01.Q THEN
motor_running := TRUE;
END_IF;
Sequential Function Chart (S2)
Sequential Function Chart organizes control logic into a series of steps connected by transitions. Each step represents a stable state of the process (with associated actions), and each transition defines the condition that must be met to move to the next step. SFC is the natural choice for batch processes, state machines, and any application with clearly defined operational phases.
SFC supports two divergence types:
- Sequential divergence — Steps execute one after another in order.
- Parallel divergence (AND) — Multiple step sequences execute simultaneously, synchronizing at the join.
- Alternative divergence (OR) — Only one branch executes based on transition conditions.
Program Organization Units (POUs)
IEC 61131-3 structures programs into three types of Program Organization Units:
| POU Type | Description | Execution |
|---|---|---|
| Function | Stateless computation returning a single value. Examples: SQRT, SIN, ADD, custom scaling functions. | Called by other POUs; same inputs always produce same outputs. |
| Function Block (FB) | Reusable block with internal state (memory). Each instantiation maintains its own data. Examples: TON, PID, custom equipment modules. | Instantiated as variables; retains state between calls. |
| Program | Top-level POU that is assigned to a task for execution. Contains the main control logic. | Executed by a task according to its scheduling configuration. |
Data Types
IEC 61131-3 defines a comprehensive type system to ensure portability across vendors:
- Elementary types — BOOL, BYTE, WORD, DWORD, LWORD, SINT, INT, DINT, LINT, USINT, UINT, UDINT, ULINT, REAL, LREAL, TIME, DATE, TIME_OF_DAY, DATE_AND_TIME, STRING, WSTRING.
- User-defined types — Enumerated types, subrange types (e.g., INT(0..100)), arrays, structures, and references.
- Generic types — ANY, ANY_NUM, ANY_REAL, ANY_INT, ANY_ELEMENTARY for interface definitions.
Vendor Implementation Notes
While IEC 61131-3 defines the standard, each automation vendor implements it with platform-specific extensions:
- Siemens (TIA Portal) — Implements all five original languages (still supports IL). SCL is Siemens' version of Structured Text. Graphical languages: LAD, FBD, GRAPH (SFC equivalent).
- ABB (Ability Builder / Control Builder Plus) — Full IEC 61131-3 compliance with five languages plus Continuous Function Chart (CFC). Used in AC 800M and Freelance controllers.
- Rockwell Automation (Studio 5000) — Supports Ladder Logic (LD), Function Block Diagram (FBD), Structured Text (ST), and Sequential Function Chart (SFC).
- Schneider Electric (EcoStruxure Control Expert) — Implements all five languages plus the proprietary Sequential Function Chart variant.
ASP OTOMASYON engineers are certified in IEC 61131-3 programming across ABB, Siemens, and Rockwell platforms. We develop reusable function block libraries that reduce engineering time and ensure consistent control strategies across your facilities.