Loading local progress…
PLC Gym
PLC Gym homeLevel 1, 0 XP · your progress
All guides

IEC 61131-3 explained: the PLC languages and why code won't transfer

IEC 61131-3 explained: the languages it defines, what happened to Instruction List, one rule in each, and why code still won't move between makers.

Two differently shaped PLCs side by side on one rail, with a laptop in front showing ladder logic.
One standard, and every maker's software still does it its own way.
In this guide
  1. What IEC 61131-3 actually is
  2. The editions so far
  3. The PLC languages it defines
  4. What happened to Instruction List
  5. The same logic in every language
  6. Which language to use, and when
  7. Why code still doesn't move between makers
  8. Where to practise
  9. Sources

IEC 61131-3 is the international standard that sets out how PLC programming languages should look and behave. You've probably just seen it on a job advert or a software data sheet, and you want to know what it means for you.

Short version: it's why ladder, function block diagram and Structured Text feel familiar whichever maker's software you open. People still talk about five PLC languages, but the 2025 edition changed that count. And it won't let you lift a Siemens program and drop it onto an Allen-Bradley controller.

The full standard is a paid 518 page document, so this guide works from IEC's listing and preview, PLCopen's papers and the makers' manuals, all linked at the bottom.

What IEC 61131-3 actually is

IEC 61131 is a family of standards for programmable controllers, published by the International Electrotechnical Commission. Part 3 is the one about programming languages. It defines the syntax and meaning of each language, plus what they share: data types such as BOOL, INT and REAL, variables, and the building blocks it calls program organisation units, which are programs, function blocks and functions.

It doesn't specify the software's menus and screens, which PLCopen says is where suppliers can differ. And it isn't a qualification you hold. If you came looking for a certificate, see the guide to PLC certification.

PLCopen comes up a lot too. IEC writes the standard. PLCopen is an independent association that promotes it, adds shared libraries such as motion control function blocks, and certifies programming tools against it.

The editions so far

EditionYearWhat it brought
First1993Released as IEC 1131-3, later renumbered
Second2003A revision after ten years of use
Third2013New data types, namespaces and object oriented features. Instruction List marked as deprecated
Fourth2025UTF-8 strings. Instruction List no longer in the scope

That's current as of November 2026, and IEC lists a stability date of 2027, when it reviews the edition. Don't assume your software has caught up. Rockwell's Studio 5000 version 37 help says its FBD functions follow Edition 3, and a Siemens compliance manual from 2015 measures STEP 7 against the third edition.

The PLC languages it defines

Here they are, including the one that's now gone.

  • Ladder Diagram (LD). Contacts and coils between two rails, drawn like a relay circuit. The ladder logic guide starts from zero.
  • Function Block Diagram (FBD). Boxes joined by wires. PLCopen says it's very common in the process industry. There's a glossary entry if it's new to you.
  • Structured Text (ST). Typed code with IF, CASE and loops, with roots in Ada, Pascal and C. The Structured Text programming guide covers the basics.
  • Sequential Function Chart (SFC). Steps joined by transitions, like a flowchart. Strictly, the standard treats it as a way of structuring programs rather than a language in its own right. The sequential function chart guide goes through it.
  • Instruction List (IL). Short lines of text, one operation per line, much like assembler.

Each maker has its own names, which trips people up.

In the standardSiemens TIA PortalRockwell Studio 5000Beckhoff TwinCAT 3
Ladder DiagramLADLadder DiagramLD
Function Block DiagramFBDFunction Block DiagramFBD
Structured TextSCLStructured TextST
Sequential Function ChartGRAPHSequential Function ChartSFC
Instruction ListSTLNot among its editorsIL

Siemens' compliance manual maps SCL to Structured Text and GRAPH to SFC. Version 16 of its programming guideline shows GRAPH and STL on the S7-1500 but not the S7-1200, so check your own controller and version.

What happened to Instruction List

Plenty of pages online are out of date on this, so here's what can be checked.

  1. 2013 edition. IEC's listing still names Instruction List as a textual language, beside Structured Text. But PLCopen's 2016 coding guidelines list it among the features the third edition marks as deprecated, and say not to use them any more.
  2. 2025 edition. IEC's listing names Structured Text as the only textual language, and the chapter on textual languages in the preview's contents only has Structured Text in it.
  3. The exact wording. Annex B of the 2025 edition lists what was removed and deprecated. It's behind the paywall, so this guide can't show you the line itself.

PLCopen's main summary page still listed it against the 2025 edition in November 2026, though its status page doesn't. This guide goes with IEC.

None of that deletes it from the factory floor. Siemens' guideline lists STL on the S7-1500. CODESYS calls IL "now deprecated" and hides it by default, but you can switch it on. Beckhoff said in 2022 that it's rarely used. So you may meet it on older equipment. Learn to read it if that's your job, and don't start anything new in it.

The same logic in every language

Here's one small piece of logic written in each. Press Start and the pump runs, and keeps running after you let go. Press Stop and it stops. Stop always wins. That's a seal in. These are plain text sketches. Each maker's editor draws its own. Stop is TRUE while pressed here. A real stop button is often wired normally closed, which flips the test.

Ladder. The lower branch is the pump's own contact, holding the rung on after Start is released.

    Start         Stop                 PumpOn
----| |----+------|/|-----------------( )----
           |
    PumpOn |
----| |----+

Structured Text. One line. In Siemens SCL it's the same with a # on each tag from the block's own interface.

PumpOn := (Start OR PumpOn) AND NOT Stop;
#PumpOn := (#Start OR #PumpOn) AND NOT #Stop;

Function Block Diagram. The OR feeds the AND. The small o means that input is inverted.

           +------+
Start -----| OR   |-----+
PumpOn ----|      |     |     +------+
           +------+     +-----| AND  |----- PumpOn
                              |      |
Stop -------------------------o      |
                              +------+

Instruction List. Load Start, OR in the pump's own state, AND with the opposite of Stop, then store the result.

LD   Start
OR   PumpOn
ANDN Stop
ST   PumpOn

Sequential Function Chart. There's no single rule here, just two steps and the conditions that move between them. N means the output is on only while that step is active.

[ Stopped ]  initial step
     |
     +  Start AND NOT Stop
     |
[ Running ]  N: PumpOn
     |
     +  Stop
     |
  back to Stopped

It does the same job, though a chart moves between steps by its own rules, so don't assume the timing matches a rung scan for scan. It's also overkill for one pump, which is rather the point. SFC earns its place when a machine moves through several phases.

You can write the ladder or text version yourself in Make it stay running.

Which language to use, and when

There's no winner. PLCopen says the choice depends on things like your background, the problem in front of you and who else has to work with it.

The jobReach forWhy
On and off logic, interlocksLadderReads like an electrical drawing, handy at the machine
Signals through calculationsFBDYou can follow the signal from box to box
Maths, arrays, lots of branchesStructured TextIF, CASE and loops stay tidy where rungs get long
Phases, such as fill, mix, drainSFCYou can see each step and its condition
Old code you've inheritedInstruction ListMaintain it, don't start new work in it

You don't have to pick one. Siemens says each block can be written in any of its languages, and Beckhoff describes combining languages in TwinCAT. And if your employer or customer has a programming standard, that beats anything in this guide.

Why code still doesn't move between makers

PLCopen's own introduction says the languages are defined closely enough to leave no room for dialects. The same paper says the standard allows partial implementations. That second point matters more than you'd think.

Makers can implement a subset. Siemens' compliance manual sets out the rule: a maker can support a consistent subset of the features, as long as it declares which. PLCopen adds that this covers how many languages are offered. So "IEC 61131-3 compliant" on a data sheet tells you less than it sounds. Ask which features, in which languages.

The same idea gets spelled differently. Here's a two second on delay timer in each maker's text language.

// Siemens TIA Portal, SCL
#Delay(IN := #Start, PT := T#2s);
#PumpOn := #Delay.Q;
// Rockwell Studio 5000, Structured Text
Delay.PRE := 2000;
Delay.TimerEnable := Start;
TONR(Delay);
PumpOn := Delay.DN;
// Beckhoff TwinCAT 3, Structured Text
Delay(IN := Start, PT := T#2S);
PumpOn := Delay.Q;

TIA Portal and TwinCAT look nearly alike. But Studio 5000 uses a different instruction, takes its preset in milliseconds and calls the done bit DN rather than Q.

Makers add their own instructions. Rockwell describes specialist instructions for process, drive and motion work. PLCopen's certification page warns that supplier specific blocks may have no equivalent on the other system, and then they won't work there.

The hardware doesn't travel. Controllers, I/O addresses, networks and HMI belong to the kit in front of you. PLCopen's coding guidelines say to avoid hard coded physical addresses partly because moving to another maker means editing them.

There are partial fixes. PLCopen's Reusability Level certification lets tools swap functions and function blocks as plain Structured Text, but only for the data types both support and the functions the standard defines. IEC 61131-10, published in 2019, is a shared XML format for exporting and importing projects, and Beckhoff documents a PLCopen XML export for TwinCAT. But a common envelope doesn't mean the other side can read the letter.

So treat moving between makers as a translation job, and allow time for testing. What really carries across is you. Learn the scan, seal ins, timers and sequences once and they'll still make sense in the next tool.

PLC Gym's PLC code converter can help with the translating. It rewrites ladder and Structured Text between Siemens, Rockwell and TwinCAT, including timers, one shots and tag styles. It converts logic only, so no hardware configuration, networks, HMI or vendor library blocks such as PID and motion, and it doesn't take STL, IL, FBD, SFC or GRAPH. A pass means both programs matched in the simulator's tests, which isn't a guarantee. The .scl and .L5X files are made for TIA Portal and Studio 5000, but nobody has yet proved they import there, so you'd still test them in the real software.

Where to practise

The PLC programming course on PLC Gym runs in the browser with nothing to install. You write in the makers' languages on PLC Gym's own simulator, SCL, LAD, FBD and GRAPH for Siemens, Structured Text, ladder, FBD and SFC for Rockwell, and Structured Text for TwinCAT, and a 3D machine reacts to your code. Give the signal meaning is a good one for FBD, and One batch, four phases for SFC and GRAPH. The first few missions are free with a free account, and the rest is on Pro, with details on the pricing page.

It isn't a real controller. It doesn't connect to real I/O, it isn't made by or affiliated with Siemens, Rockwell or Beckhoff, and it has no Instruction List or STL editor. To work on a real machine you need the maker's software and real hardware.

Sources

Questions about this?Ask in the Locker Room

Try it on a machine

Free · Runs in your browser

Try it on a working machine

Write real Siemens or Rockwell code in the free online PLC simulator and watch a 3D pump, tank or filling line do exactly what you told it. Nothing to install.