PLC Sim Lab
PLC software

PLC programming languages (IEC 61131-3)

The international standard IEC 61131-3 defines the programming languages that almost every PLC supports. Each brand names and draws them a little differently, but if you know the five languages, you can read a program in any software.

2 min read · Updated 2026-10-02

1. Ladder Diagram (LD / LAD)

The most popular language, drawn like a relay circuit: contacts on the left, coils on the right. Easy for electricians to read and ideal for discrete on/off logic and interlocks. See ladder logic basics.

2. Function Block Diagram (FBD)

Logic drawn as boxes (AND, OR, timers, PID) connected by lines, like a signal flow diagram. Popular in process control and in Siemens and Schneider plants. Good for analog signals and reusable blocks.

I0.0 ──┐
       │ AND ├──┐
I0.1 ──┘        │ OR ├── Q0.0
Q0.0 ───────────┘

3. Structured Text (ST / SCL)

A high-level text language similar to Pascal. Best for maths, loops, arrays, recipes and data handling. Siemens calls it SCL.

IF Start OR Motor THEN
    Motor := Stop_OK AND OL_OK;
END_IF;
Level_m := INT_TO_REAL(Raw) / 27648.0 * 2.0;

4. Sequential Function Chart (SFC / GRAPH)

A program drawn as steps and transitions, perfect for machine sequences: step 1 extend cylinder, transition "extended sensor", step 2 start conveyor, and so on. Only one (or a defined set of) steps is active at a time, which makes sequences easy to follow and debug. Siemens calls it GRAPH.

5. Instruction List (IL / STL)

An assembly-like text language: LD I0.0, OR Q0.0, AND I0.1, ST Q0.0. It was common on older PLCs (Siemens STL, Mitsubishi instruction list), but it was marked as deprecated in the 2013 edition of IEC 61131-3. You will still meet it on older machines.

Which language for what?

TaskBest language
Interlocks, motor control, simple on/off logicLadder
Machine sequencesSFC, or ladder with step bits
Calculations, data, recipes, communicationStructured Text
Process control, analog loopsFBD

Most modern projects mix languages: ladder for the I/O logic that maintenance staff troubleshoot, ST inside function blocks for the maths.

Same idea, different names

IEC nameSiemensMitsubishiRockwell
LDLADLadderLadder (RLL)
FBDFBDFBD/LDFunction Block
STSCLSTStructured Text
SFCGRAPHSFCSFC
ILSTLInstruction list(not in Logix)

Program organisation units

IEC 61131-3 also defines how a program is structured: programs (called by tasks), function blocks (with their own memory, like a timer or a motor block you reuse 20 times) and functions (no memory, like a scaling calculation). Siemens calls them OB/FB/FC with data blocks (DB); Rockwell uses programs, routines and Add-On Instructions (AOI).

Try it yourself. Wire sensors, contactors and a PLC, write ladder logic and press RUN in the free PLC Sim Lab Playground. Nothing to install.

Open the Playground →Guided lessons →