The 5 PLC Programming Languages of IEC 61131-3 Compared
LD, FBD, IL, ST and SFC: what IEC 61131-3 actually defines, how the Siemens names map onto it, and which language is right for which task.

Key Takeaways
IEC 61131-3 defines five languages – not six, and SCL is not one of its own. This article maps the standard's names onto the Siemens names and shows which language solves which task best.
- Standard names and Siemens names – the most common mix-up
- The five languages compared – strengths, limits, use cases
- Which language for what – a decision guide
1.What IEC 61131-3 governs
IEC 61131-3 is the international standard for programming programmable logic controllers. It defines not only languages but also data types, block types (function, function block, program) and the execution model.
The practical benefit: programming to the standard produces code another programmer can read and understand on a different controller. That does not make it portable in the copy-paste sense – vendor dialects differ too much. But the concepts are the same, and in practice that is the more important part.
2.Standard names and Siemens names
This is where the most common confusion arises – including in technical articles. The standard defines five languages; Siemens uses its own names for the same languages:
| IEC 61131-3 | Siemens (TIA Portal / STEP 7) | Type |
|---|---|---|
| LD – Ladder Diagram | KOP – Kontaktplan | graphical |
| FBD – Function Block Diagram | FUP – Funktionsplan | graphical |
| IL – Instruction List | AWL – Anweisungsliste | textual |
| ST – Structured Text | SCL – Structured Control Language | textual |
| SFC – Sequential Function Chart | GRAPH | graphical (sequence structure) |
SCL and ST are the same language
You often see lists presenting SCL and ST as two separate languages. That is wrong: SCL is Siemens' implementation of Structured Text. Listing both counts one language twice – and usually drops IL in exchange. The standard defines five languages, not six.
One further subtlety: SFC is strictly speaking not a programming language but a structuring element. Inside the steps and transitions of an SFC, the code is again written in one of the other languages. In practice SFC is nevertheless counted as the fifth language, and the standard covers it in the same part.
3.The five languages compared
| Language | Strength | Limit | Typical use |
|---|---|---|---|
| LD (KOP) | Intuitive for anyone with an electrical background; current-path metaphor | Unwieldy beyond roughly 50 networks; poor for calculations | Interlocks, simple enable logic, emergency stop chains |
| FBD (FUP) | Data flow visible; readable for combinational logic and control | Gets cluttered quickly in large programs | Control loops, analogue processing, signal conditioning |
| IL (AWL) | Very close to the machine, compact | Hard to read, barely maintainable; classified as deprecated in the 3rd edition | Legacy plants; no longer recommended for new development |
| ST (SCL) | Loops, conditions, calculations, library blocks; text-based versioning | Less illustrative than LD for pure interlock logic | Algorithms, recipes, data processing, reusable blocks |
| SFC (GRAPH) | Sequences become a visible state machine instead of hiding in memory bits | Overhead for simple logic | Step sequences, batch processes, operating mode control |
3.1.LD – Ladder Diagram
Ladder mirrors circuit diagram logic: contacts in series form an AND, in parallel an OR. For maintenance staff with an electrical background this is the language with the lowest barrier to entry – an invaluable advantage when someone without programming knowledge has to follow an interlock at night.
The limit shows up with scale and arithmetic. A network with twenty contacts and three parallel branches is wider on paper than the screen, and scaling an analogue value turns into a chain of blocks.
3.2.FBD – Function Block Diagram
FBD shows signals as blocks with inputs and outputs. Where LD emphasises the current path, FBD emphasises the data flow – a better fit for analogue processing, controllers and anything that transforms values rather than switching them.
3.3.IL – Instruction List
IL is the language closest to the machine, essentially an assembler for the PLC. In the third edition of IEC 61131-3 (2013), IL was classified as deprecated; it is no longer recommended for new projects.
It stays relevant for one reason: legacy plants. Anyone taking over an S5 or S7 Classic program regularly meets IL – often without symbols. Being able to read it is not nostalgia during migrations, it is craft.
3.4.ST – Structured Text
ST is the language for everything that becomes cumbersome graphically: loops, case distinctions, calculations, string handling, generic library blocks.
// Example: scale an analogue value with range checking
FUNCTION FC_ScaleAnalog : REAL
VAR_INPUT
iRaw : INT; // raw value 0…27648
rMin, rMax : REAL; // target range in engineering units
END_VAR
IF iRaw < 0 THEN
FC_ScaleAnalog := rMin; // wire break / underflow
ELSIF iRaw > 27648 THEN
FC_ScaleAnalog := rMax; // overflow
ELSE
FC_ScaleAnalog := rMin + (rMax - rMin) * INT_TO_REAL(iRaw) / 27648.0;
END_IF;
The same functionality in LD would be a multi-rung chain of blocks whose intent only becomes clear on close inspection.
A second, often underrated advantage: ST is text. That makes it meaningfully versionable in Git, reviewable line by line, and searchable with ordinary tools. Graphical languages are stored in binary formats – a diff there shows "block changed" at best.
3.5.SFC – Sequential Function Chart
SFC represents sequences as steps and transitions. The big gain is visibility: the plant's current state can be read directly online instead of being reconstructed from a dozen memory bits.
For step sequences – batch processes, cleaning cycles, operating mode changes – that is the decisive advantage during troubleshooting. For a simple interlock it is overhead.
4.Which language for what: a decision guide
No single language is best at everything. In practice this split has proven itself:
| Task | Recommendation |
|---|---|
| Interlocks, enables, emergency stop logic | LD – has to be readable at night without a programmer |
| Analogue processing, control loops | FBD |
| Algorithms, calculations, recipes | ST |
| Reusable library blocks | ST – parameterisable and versionable |
| Step sequences, batch processes | SFC |
| Understanding and migrating legacy code | Be able to read IL – not write it anew |
Field rule of thumb
Most of a modern project sits well in ST – logic, calculations, block library. LD stays for everything a maintenance technician must be able to follow during a fault. That is not a matter of style but of downtime.
5.Mixing is allowed – and sensible
A widespread misconception is that you have to commit to one language. The opposite is true. The standard explicitly provides for each block being written in the language that suits its task.
A typical project then looks like this:
OB1 (Main) → LD, calls only
├── FB_ModeControl → SFC (operating modes as a step chain)
├── FB_ConveyorControl → ST (logic + timing)
│ └── FC_ScaleAnalog → ST (calculation)
├── FC_SafetyInterlocks → LD (must be readable without tools)
└── FB_AlarmHandler → ST (library block)
What matters is only that the choice is justified and stays consistent across the project. Five languages mixed at random are worse than one language applied consistently.
6.Conclusion
- IEC 61131-3 defines five languages: LD, FBD, IL, ST and SFC. SCL is Siemens' name for ST, not a sixth language.
- IL has been deprecated since 2013 – read it yes, write it new no.
- ST carries most of a modern project, because it allows calculations, libraries and versioning.
- LD stays for safety-relevant and maintenance-critical logic, because readability during a fault decides downtime.
- Mixing languages is standard-compliant and sensible – as long as the choice is justified and consistent.
Migrating legacy code
If you want to lift IL legacy code onto a modern structure – or if only an online upload without symbols remains of an old program: that is exactly what I do, from Luxembourg and regularly on site in Saarland and the Trier region. Let's talk.
7.Further reading
- PLC Programming: 8 Best Practices for Clean, Maintainable Code – how the language choice fits an overall structure
- PLC Documentation: What Belongs In It and What Matters at Handover – which language creates which documentation burden
- PLC Troubleshooting: Narrow Down Systematically – why SFC speeds up diagnosis
Questions about your automation project?
As an automation engineer based in Stadtbredimus, Luxembourg, I offer free initial consultations for companies in the Greater Region Saar-Lor-Lux.
David Prybisch · PLC · HMI · Commissioning
Related Articles

PLC Programming Best Practices for Maintainable Code
Write clean, maintainable PLC code in Siemens TIA Portal: proven naming conventions, FB/FC structure, NAMUR alarm handling, Git and faster troubleshooting.
Read more: PLC Programming Best Practices for Maintainable Code
PLC Documentation: What Belongs In It and What Matters at Handover
Practical guide to PLC documentation: the three layers from code to plant file, a handover checklist to work through, and what to do when only an online upload remains.
Read more: PLC Documentation: What Belongs In It and What Matters at Handover
PLC Troubleshooting: Narrow Down Systematically Instead of Guessing
How to troubleshoot PLC programs: rule out hardware first, narrow down with watch tables and cross-references, recognise the common fault classes — and why forcing is rarely the answer.
Read more: PLC Troubleshooting: Narrow Down Systematically Instead of Guessing