Skip to content

PLC programming languages

From ladder diagrams to structured text — how to write the logic that controls the system

When an automation technician builds a PLC controller competency aim no. 5 in the education is precisely being able to do programming with associated documentation according to applicable standards. The standard almost all PLC manufacturers today build on is called IEC 61131-3. Whether the system is controlled by a Siemens S7 an Allen-Bradley ControlLogix a Beckhoff TwinCAT controller or an Omron PLC the basic principles of programming are the same — it's one of the standard's great strengths.

§From five languages to four

IEC 61131-3 originally defined five programming languages for PLCs: Ladder Diagram (LD), Function Block Diagram (FBD), Structured Text (ST), Sequential Function Chart (SFC) and Instruction List (IL). With the standard's 4th edition, released in May 2025, Instruction List was removed from the standard, so today there are officially four remaining. IL was a low-level text language resembling assembler, and which in practice had been displaced by Structured Text long before it formally withdrew.

  • 01Ladder Diagram (LD) — relay-like logic with contacts and coils, easy to read for people with electrical background
  • 02Function Block Diagram (FBD) — the logic is built from interconnected blocks, suitable for control and signal processing
  • 03Structured Text (ST) — a text-based language with loops and conditions, suitable for calculations and complex algorithms
  • 04Sequential Function Chart (SFC) — structures a programme in steps and transitions suitable for batch and sequence control

§When to use what

In practice, many projects mix the languages depending on the task. Ladder Diagram is still the most common language for ordinary binary logic — start/stop, safety chains and simple sequences — because it resembles the relay diagrams the trade has historically been built on. Function Block Diagram is often used for control loops, where finished blocks (e.g. a PID controller) are connected together. Structured Text is gaining ground when there is a need to calculate, sort data or build more advanced logic that is heavy to express in ladder. Sequential Function Chart is strong for structuring a system's overall operating modes — e.g. start-up, production, cleaning and shutdown — each of which can contain ladder or ST logic.

§Standardization provides security and traceability

The advantage of a common standard is that competencies and programmes can move between manufacturers to a greater extent. A technician trained in one system can much faster familiarise themselves with another because the basic structure — variables function blocks data types — is recognisable. The interest organisation PLCopen works for precisely this consistency and for common library structures across vendors so reuse of logic becomes easier.

LanguageTypical use
Ladder Diagram (LD)Binary logic, safety chains, start/stop
Function Block Diagram (FBD)Regulation, signal processing, counters and timers
Structured Text (ST)Calculations, data handling, advanced logic
Sequential Function Chart (SFC)Operating modes, sequence and batch control

§Documentation is part of the program

A well-written program is not just one that works—it's one the next technician can understand without calling you. It's about consistent variable naming, comments that explain why (not just what), updated diagrams, and clear version control so you always know which version of the program is actually running on the system. Competency goal 9 in the training is precisely about being able to read, use, and modify technical documentation—a skill that is just as important as coding itself.

A programme you cannot understand yourself in a year you have not finished — you have just got it to work today.