The IEC 61131-3 languages are the standard programming languages for PLCs: Ladder Diagram (LD), Function Block Diagram (FBD) and Structured Text (ST), with Sequential Function Chart (SFC) used to structure programs and function blocks. No single language is best. Ladder suits discrete interlocks that electricians must read, Structured Text suits calculations and data handling, FBD suits continuous control, and SFC suits sequences.

The fourth edition, IEC 61131-3:2025, was published in May 2025. Its abstract lists Structured Text as the textual language and Ladder Diagram and Function Block Diagram as the graphical ones, with SFC for structuring. It adds UTF-8 strings and documents which features were added, removed or deprecated compared with the 2013 edition. Instruction List, which appeared in earlier editions, is no longer among the listed languages.

IEC 61131-3 languages compared

LanguageLooks likeBest forWatch out for
Ladder Diagram (LD)Relay circuitsDiscrete logic, interlocks, maintenance fault-findingMaths, loops and data handling get messy
Function Block Diagram (FBD)Signal flow diagramsPID loops, analogue processing, safety logicLarge diagrams become hard to follow
Structured Text (ST)Pascal-like textCalculations, arrays, recipes, string and data handlingLess readable for site electricians
Sequential Function Chart (SFC)Flowchart of steps and transitionsMachine and batch sequencesOveruse for simple logic; tool support varies

What are PLC Programming Languages?

Inductive Automation

This video is hosted on YouTube. Playing it loads content from Google, which may set cookies.

Watch on YouTube
A short overview of the IEC 61131-3 languages and where they are used.

When to use each language

Ladder Diagram

Use ladder where the people who will maintain the machine at 2 a.m. are electricians. Motor starters, permissives and safety-gate interlocks read naturally as rungs, and online monitoring shows power flow at a glance. Ladder remains dominant in North American plants and in Allen-Bradley Studio 5000 projects.

Structured Text

Use ST for anything that looks like computation: scaling, unit conversions, recipe tables, array processing, communication message parsing. It is compact, versions cleanly in Git, and it is also the language AI coding assistants handle best, as discussed in AI for PLC programming.

Function Block Diagram

FBD is the natural fit for continuous control and signal processing: PID blocks, filters, selectors, totalisers. Many safety PLC environments also favour FBD with certified function blocks, because data flow is easy to verify visually.

Sequential Function Chart

SFC shines for sequences with clear steps: a filling cycle, a clean-in-place routine, a batch phase. It makes the current step visible on screen, which shortens fault-finding. Where SFC is not available or not liked, a step-based state machine in ST or ladder achieves the same structure.

Compact PLC module wired to a training board of switches on a workbench
Training rigs like this are where most engineers learn ladder first, then add Structured Text.

Mixing languages in one project

Modern platforms such as Siemens TIA Portal, Beckhoff TwinCAT and CODESYS let you choose the language per program organisation unit. A sensible split for a packaging machine might be:

  • SFC or an ST state machine for the main machine sequence
  • Ladder for interlocks, permissives and simple device control
  • ST for recipe management, data logging and communication
  • FBD for any analogue control loops
  • Certified safety function blocks in the safety program, kept separate

Set the rules in your coding standard, so every engineer makes the same choice. PLCopen, the independent organisation that promotes IEC 61131-3, publishes guidelines and libraries that help with consistency across vendors.

Example: the same motor interlock in three languages

Take a conveyor motor that may run only when the guard is closed, there is no drive fault, the downstream conveyor is running and the operator has pressed start. In ladder, that is one rung: four contacts in series feeding a seal-in coil, with the stop button and fault contacts breaking the seal. An electrician reads it in seconds and can watch which contact is open when the motor refuses to start.

In Structured Text, it is a single assignment combining the same conditions with AND and OR. Shorter, easy to diff in version control, but harder to diagnose online for someone not used to text. In FBD, it is an AND block feeding an RS flip-flop, which reads well if your team thinks in signal flow. All three are correct. The right choice depends on who maintains the machine, which is why this decision belongs in the coding standard, not in each engineer's habits. Control Engineering makes the same point: use the strengths of each language rather than forcing one to do everything.

Portability: how standard is the standard?

Less than the name suggests. Each vendor implements a subset with its own extensions and data types, so code rarely moves between platforms without changes. Structured Text is the most portable, ladder the least. PLCopen XML can exchange some project content, but plan for rework whenever you change platform, as covered in our PLC migration checklist.

One more practical rule: whichever language you choose, keep the structure flat enough that a maintenance engineer can find the logic behind a fault message in under a minute. Deeply nested calls and clever generic code may please the original author but cost hours on night shift.

What to learn first

For technicians, ladder first, then enough ST to read calculations. For new controls engineers, both from the start, plus SFC concepts for sequences. Our edWartens courses cover multiple platforms, and our engineering training service can tailor a programme for your team. For project work, see automation engineering.