PLC Training

IEC 61131-3 Explained: The Standard Behind Every PLC Language You Will Ever Use

EDWartens Engineering Team
4 min read
IEC 61131-3 Explained: The Standard Behind Every PLC Language You Will Ever Use

One standard, many dialects

Every PLC you will program in India, whether it is a Siemens S7-1500, an Allen-Bradley CompactLogix, a Mitsubishi iQ-R, a Beckhoff CX or a CODESYS-based controller from a hundred smaller vendors, claims compliance with IEC 61131-3. The standard defines the programming languages, the data types, the program organisation units and the execution model. Learn it once and every vendor's tool becomes a dialect rather than a new language.

The most popular PLC programming languages, by RealPars

The five languages

LanguageStyleWhere it shines
Ladder Diagram (LD)Graphical relay logicInterlocks, discrete control, anything a technician must read at 2 a.m.
Function Block Diagram (FBD)Graphical blocks and wiresSignal flow, analog processing, reusable blocks
Structured Text (ST)Pascal-like textCalculations, loops, string handling, complex data
Sequential Function Chart (SFC)Steps and transitionsBatch and machine sequences
Instruction List (IL)Assembler-likeDeprecated in the 2013 edition; legacy only

The choice is covered in structured text vs ladder; the point here is that they are views of the same model and can be mixed in one project.

The five IEC 61131-3 languages
The five IEC 61131-3 languages

Program organisation units

The standard organises code into three kinds of unit:

  • Program (PRG): the top level, assigned to a task.
  • Function block (FB): has internal state (memory) and is instantiated. A timer, a valve controller, a PID.
  • Function (FC): no memory; same inputs give the same output. A scaling calculation.

Siemens maps these to OB, FB and FC; Rockwell to tasks, programs, routines and Add-On Instructions; CODESYS uses the standard's names directly. Our guide to program structure across brands goes through the mapping.

Data types

The standard defines BOOL, the integer family (SINT, INT, DINT, LINT and their unsigned versions), REAL and LREAL, TIME, DATE, STRING, and structured types: arrays, structures (STRUCT), and enumerations. It also defines standard function blocks: TON, TOF, TP timers; CTU, CTD, CTUD counters; R_TRIG and F_TRIG edge detectors; SR and RS latches. Every vendor implements them, with small differences in naming, which PLC data types across brands lists.

The execution model

Tasks run programs cyclically, periodically or on events. The scan cycle (read inputs, execute, write outputs) is the same everywhere, and the consequences for rung order and edge detection are explained in the PLC scan cycle.

Program organisation units across vendors
Program organisation units across vendors

The 2013 edition and object orientation

The third edition added classes, methods, interfaces and inheritance to structured text. CODESYS and Beckhoff TwinCAT 3 implement them fully; Siemens supports methods on FBs from TIA V20; Rockwell does not. It matters if you build libraries or work for machine builders, and the TwinCAT 3 course and CODESYS course teach it.

Why vendors still differ

The standard leaves out hardware configuration, I/O addressing, networking and the engineering tool itself. That is where TIA Portal, Studio 5000 and GX Works3 are different products. Compliance means the languages and types behave the same; it does not mean a project moves between them without work.

What is IEC 61131, by Panasonic Industry Europe

Learning it properly

The CODESYS and IEC 61131-3 course is the cleanest way to learn the standard as written, because CODESYS is the reference implementation used by dozens of brands. Then the Siemens TIA Portal and Studio 5000 courses show the two big dialects.

Frequently asked questions

Is ladder going away? No. It remains the language technicians read fastest, and every standard keeps it.

Which language should a fresher learn first? Ladder for logic, structured text for everything else, and the ability to read FBD and SFC.

Does IEC 61131-3 cover safety PLCs? No. Safety programming follows the vendor's certified subset and IEC 61508 or ISO 13849.

Start Your Engineering Career at EDWartens

Join as a Junior Engineer at Wartens Automation Pvt Ltd. Get hands-on PLC SCADA training, industry certifications, and a 100% Job Guarantee backed by a 100% refund policy.