Direct answer
IEC 61131-3 is the international standard that defines programming languages for PLCs. It specifies five languages: Ladder Diagram, Function Block Diagram, Structured Text, Instruction List and Sequential Function Chart. You choose by task: Ladder for discrete logic, FBD for signal flow, ST for calculations, SFC for sequences.
Institutional content: Authomathika
Published:
IEC 61131-3 gives PLC programmers a common set of languages, data types and program structure, so a program written by one team can be read and maintained by another. It does not tell you what to automate. It tells you how the logic is expressed. This guide explains the standard in general terms and gives practical criteria for choosing a language for each part of a program.
What is IEC 61131-3?
IEC 61131-3 is the part of the IEC 61131 series that defines the programming languages and software model for programmable controllers. It covers the syntax and semantics of the languages, the data types, and the way a program is divided into organizational units.
A PLC is a rugged industrial computer that reads inputs, runs a program in a repeating scan and writes outputs. If you need a refresher, see What Is a PLC and How It Works in Industry. The standard matters because it reduces dependence on a single programming style. Each vendor's software still implements it differently, and some features are optional or extended, so always check which parts a given controller supports.
What are the five languages (Ladder, FBD, ST, IL, SFC)?
The standard defines two graphical languages, two textual languages and one structuring language. SFC is often grouped with the others, although it organizes the order of execution rather than the detailed logic of each step.
| Language | Type | What it is |
|---|---|---|
| Ladder Diagram (LD) | Graphical | Ladder Diagram is a language that represents logic as contacts and coils between two power rails, inspired by relay schematics. |
| Function Block Diagram (FBD) | Graphical | FBD is a language that connects blocks with lines to show how signals flow from inputs through functions to outputs. |
| Structured Text (ST) | Textual | ST is a high-level, Pascal-like language with assignments, conditions, loops and expressions. |
| Instruction List (IL) | Textual | IL is a low-level, assembly-like language of simple instructions. It is deprecated in recent editions of the standard, so confirm its status in the edition you use. |
| Sequential Function Chart (SFC) | Graphical | SFC is a language that describes a process as steps, transitions and actions, suited to sequential operation. |
Most modern projects rely on Ladder, FBD, ST and SFC. IL appears mostly in legacy programs you may need to maintain.
When should you use each language?
Choose the language that makes the logic easiest to read for the people who will troubleshoot it. A single project can mix languages, and the standard is designed for that.
- Ladder: interlocks, permissives, motor start and stop logic, and discrete control. Electricians and technicians usually read it quickly, which helps at the plant floor.
- FBD: continuous control, signal conditioning, scaling, PID loops and analog flow, where the path of the signal is the main thing to see.
- ST: calculations, arrays, loops, string handling, data manipulation and complex conditions that would sprawl across many rungs.
- SFC: batch steps, start-up and shutdown sequences, and any process with clear states and transitions. Each step's action can be written in Ladder, FBD or ST.
- IL: only to maintain existing code. Avoid it in new work.
A useful test: if you cannot explain a section of logic to a maintenance technician looking at it online, the language is probably the wrong choice for that section.
How do you organize blocks, tags and naming standards?
Organize the program into reusable units, give every tag a predictable name, and document the convention before programming starts. The standard defines program organization units: programs, function blocks and functions.
- A function is a unit with no memory that returns a result from its inputs, such as a scaling calculation.
- A function block is a unit that keeps internal state between scans, such as a timer, a counter or a motor control block with its own status and faults.
- A program is the top-level unit that calls functions and function blocks and is assigned to a task.
A structure that works well in practice:
- Create one function block per equipment type (motor, valve, analog input) and instantiate it for each device.
- Define user data types that group the command, status, alarm and configuration of a device.
- Separate the program into areas that mirror the plant: one unit per process area or machine.
- Define a naming rule that encodes area, equipment type and instance, and apply it to tags, blocks and I/O descriptions.
- Keep global variables to a minimum and use clear scopes for the rest.
For the full path from design to commissioning, see How to Program a PLC: From Design to First Test.
What good practices make the program easier to maintain?
A maintainable program is readable by someone who did not write it, behaves predictably after a change, and can be restored if something goes wrong. These practices help most:
- Comment the intent, not the obvious. Explain why an interlock exists, not that a contact is closed.
- Keep each routine focused on one function and avoid very long sections.
- Reuse tested function blocks instead of copying logic.
- Handle faults and states explicitly, including startup, manual mode and communication loss.
- Test the sequence offline or in simulation before commissioning, and record the results.
- Keep backups and a change history for every controller project.
A review checklist helps catch problems early. Use PLC Programming Best Practices: A Review Checklist, and set up backups with PLC and SCADA Backup and Version Control: Practical Guide.
At Authomathika, an engineering integrator, PLC and DCS programming is part of its automation work, delivered together with the electrical and field disciplines. Whoever does the work, the criteria above apply.
