← All Posts

PLC Programming Languages: The 5 IEC 61131-3 Languages Explained

If you're starting PLC programming, the first question is which language to learn. The answer is more straightforward than vendors make it seem: the IEC 61131-3 standard defines exactly five languages, and only two of them — Structured Text (ST) and Ladder Diagram (LD) — are what most engineers actually use in 2026.

This guide explains all five, compares them honestly, and helps you pick the right one to start with. Plus how to start writing ST today on your Mac using Voltrus PLC.

What Is IEC 61131-3?

IEC 61131-3 is the international standard (IEC 61131 Part 3) that defines programming languages for programmable logic controllers. Published in 1993 and updated in 2013, it specifies five languages. Every major PLC vendor — Siemens, Rockwell, Beckhoff, CODESYS, B&R, Omron, Mitsubishi — supports at least some of these languages.

The standard matters because it means your ST code is portable. A well-written Structured Text program follows the same syntax whether you're using TIA Portal, CODESYS, TwinCAT, or Voltrus PLC. The logic is yours; the platform shouldn't matter.

The 5 Languages at a Glance

Language
Type
Best For
Usage in 2026
Structured Text (ST)
Text
Complex logic, math, data processing
Growing fast — preferred by new engineers
Ladder Diagram (LD)
Graphical
Simple boolean I/O, maintenance
Still dominant — legacy + maintenance
Function Block Diagram
Graphical
Signal processing, closed-loop control
Niche — process control, drives
Sequential Function Chart
Graphical
State machines, batch processes
Moderate — specialized use
Instruction List (IL)
Text
Nothing — deprecated in 2013
Dead — don't learn this

1. Structured Text (ST)

ST is a high-level, text-based language with syntax similar to Pascal. If you've written any programming language before — Python, JavaScript, C, Java — ST will feel familiar within minutes. It supports:

  • Conditional logic: IF...THEN...ELSIF...ELSE...END_IF, CASE...OF
  • Loops: FOR...DO, WHILE...DO, REPEAT...UNTIL
  • Functions and function blocks: reusable, parameterized logic units
  • Strong typing: BOOL, INT, REAL, TIME, STRING, arrays, structs
  • Expression-based: result := (a + b) * c / 2.0;

Why ST is growing: Software engineers entering industrial automation find ST natural. It's version-control friendly (plain text). It handles complex logic that ladder can't express cleanly. And AI code generators (like those in Voltrus PLC) produce ST more reliably than any graphical language.

2. Ladder Diagram (LD)

LD is the oldest PLC language, dating back to the 1968 Modicon 084. It represents logic as relay circuits — horizontal "rungs" with contacts (inputs) on the left and coils (outputs) on the right. Electricians can read it because it looks like an electrical schematic.

  • Strengths: intuitive for boolean logic, visual tracing of signal flow, universally understood by maintenance electricians
  • Weaknesses: terrible for math, loops, data processing, and complex state machines. A 10-line ST program can become 50 rungs of incomprehensible ladder.

LD remains the most widely used PLC language globally — not because it's the best, but because it's what maintenance teams know how to read. If your code will be maintained by electricians on the factory floor, ladder is the pragmatic choice.

3. Function Block Diagram (FBD)

FBD represents logic as a data-flow graph — boxes connected by lines. Each box is a function (AND, OR, ADD, PID controller) and lines show how data flows between them. Popular in process industries (chemical, oil & gas, water treatment) where engineers think in terms of signal flow and control loops.

  • Strengths: intuitive for signal processing and closed-loop control (PID blocks), good for process engineers
  • Weaknesses: large programs become spaghetti diagrams, harder to version control than text, not all vendors support it equally

4. Sequential Function Chart (SFC)

SFC is a state machine language — a flowchart of steps and transitions. Each step executes actions, and transitions define when to move to the next step. It's the clearest way to express sequential processes: "do step A, wait for condition X, then do step B."

  • Strengths: the clearest language for batch processes, assembly sequences, and any state-based logic. Easier to read than a state machine coded in ST.
  • Weaknesses: not suited for continuous control, limited vendor support compared to ST and LD, and the graphical editors vary significantly between platforms.

5. Instruction List (IL) — Deprecated

IL is an assembly-like language: one instruction per line, accumulator-based operations. It was included in the original 1993 standard for compatibility with older PLCs. It was deprecated in the IEC 61131-3:2013 revision. Don't learn it unless you're maintaining legacy equipment from the 1990s. No modern PLC project should start in IL.

Which Language Should You Learn First?

Simple answer: Learn ST if you have any programming background. Learn LD if you come from an electrical/maintenance background. Learn both eventually.

Here's why ST is the better starting point for most people in 2026:

  1. ST is more powerful. Anything ladder can do, ST can do. The reverse is not true — complex math, string processing, and data manipulation are painful or impossible in ladder.
  2. ST is portable. Standard IEC 61131-3 ST runs on every platform — CODESYS, TIA Portal (SCL), TwinCAT, Voltrus PLC. Ladder logic is less portable because each vendor's graphical editor works differently.
  3. ST is AI-friendly. AI code generators produce text, not graphics. If you want AI-assisted PLC programming, ST is the language that works with it.
  4. ST is version-control friendly. Plain text means git diff, merge, review. Ladder programs are binary or XML blobs that can't be meaningfully diffed.

Learn ladder when you need to — for maintenance, for communicating with electricians, or when working in environments where ladder is the standard. But start with ST.

Can You Mix Languages?

Yes. The IEC 61131-3 standard explicitly supports mixed-language projects. A common pattern: use SFC for the overall sequence orchestration, ST for the complex calculations, and LD for the simple I/O mapping. Each POU (Program Organization Unit) can use a different language. This is how professional PLC projects are structured.

Start Writing ST on Your Mac

Voltrus PLC is a native macOS PLC IDE with full IEC 61131-3 Structured Text support. Write, compile, run, and debug ST programs with a built-in softPLC runtime and real I/O drivers. Free beta, $29.99 at launch.

Try Voltrus PLC — Free Beta

Further Reading