Book a consultation

Education

PLC Programming: A Complete Guide to Languages, Vendors, Software and Instructions

How a PLC runs a program, the five languages, the major vendors and their software, addressing, and a glossary of every common ladder instruction.

Vladimir Romanov ·


Table of contents12 sections

PLC programming is how most of the world’s machines and production lines are told what to do. A programmable logic controller reads its inputs, runs a program, and sets its outputs, thousands of times a minute, for years. The program is the part people write, and the part that decides whether a line runs well or spends its shift in a fault.

This page is the starting point for Joltek’s PLC Programming guide. It covers how a controller runs a program, the five standard languages, the vendors and the software each one uses, how addressing differs between platforms, and a glossary of every common ladder instruction. Each instruction in the glossary links to its own page as we publish it. The whole bit family is live: XIC, XIO, OTE, OTL and OTU.

I spent years writing and fixing these programs before I started Joltek, and this is the overview I would hand a new engineer on their first day. It is written to be useful to someone who has never opened a PLC project, and accurate enough that an experienced controls engineer can send it to their team.

The short version. A PLC repeats one loop: read the inputs, run the program, write the outputs. The program is usually ladder logic, a drawing of contacts and coils that tests bits and sets bits. Learn the bit instructions, then timers and counters, then data and compare instructions, and you can read most machine programs on any vendor's platform.

What is PLC programming?

PLC programming is writing the logic a programmable logic controller runs to control a machine or process. The program reads inputs such as push buttons and sensors, decides what should happen, and sets outputs such as motor starters, valves and lights. It is usually written in one of the IEC 61131-3 languages, most often ladder diagram, using the PLC vendor’s programming software.

A PLC is an industrial computer built for one job: running control logic reliably on a factory floor. It is designed to survive heat, vibration and electrical noise, to run without a keyboard or screen, and to keep running the same program for years. The hardware is a controller (the CPU), input and output modules wired to the field devices, a power supply, and a network connection to the programming laptop, the operator screens and the other controllers on the line.

What makes it a programmable controller is that the behaviour lives in software. Before PLCs, the same logic was built from relays wired in a panel, and changing it meant rewiring. Now it means editing a program, testing it, and downloading it. That is a gain in speed and a risk in discipline, which is why the habits section near the end of this page matters as much as the instructions.

How does a PLC run a program?

A PLC runs its program in a repeating loop called the scan. In the classic model it reads every input into memory, executes the program from the first rung to the last, writes the results to the outputs, handles communications and diagnostics, and starts again. On a modern controller one pass usually takes milliseconds.

How a PLC works: inputs, the scan, outputsA diagram. On the left, three field inputs (a push button, a proximity sensor and a level switch) are wired to an input module. In the middle, the controller repeats a scan: read the inputs into memory, execute the program top to bottom, write the results to the outputs, then handle communications and diagnostics, and start again. On the right, an output module drives a motor starter, a solenoid valve and a stack light. Below, a programming laptop downloads and monitors the program, an HMI or SCADA system reads and writes tags, and other controllers exchange data over the network. A note says that some platforms, such as Logix, update I/O asynchronously to the scan.FIELD INPUTSPush buttonoperator commandProx sensorpart presentLevel switchtank highInputmodule24 V DCCONTROLLER (CPU)1234THE SCANrepeats1 Read the inputs2 Run the program3 Write the outputs4 Comms, diagnosticsOutputmoduleFIELD OUTPUTSMotor starterconveyor runsSolenoid valvefill opensStack lightalarm onON THE NETWORKProgramming laptopdownload, monitor, editHMI or SCADAreads and writes tagsOther controllersexchange dataThis is the classic synchronous scan.Some platforms, Rockwell Logix among them, update I/O on their own schedule, asynchronously to the program.
A PLC sits between the field inputs and the field outputs. The scan reads the inputs, runs the program and writes the outputs, over and over. The programming laptop, the HMI and other controllers reach it over the network.

Three ideas follow from the scan, and most beginner confusion comes from missing one of them.

  1. The program reads memory, not wires. An instruction that examines a push button reads a bit the I/O system copied into memory, not the terminal itself. The XIC page walks through this in detail, because it explains why a normally closed stop button shows a 1 when nobody is touching it.
  2. Order matters. Rungs execute top to bottom, and each rung left to right. A bit written on rung 10 is already changed when rung 11 reads it, but rung 9 will not see the new value until the next scan.
  3. Not every platform scans the same way. The classic model updates inputs and outputs once per scan. Rockwell Automation Logix controllers update I/O on their own schedule, asynchronously to the program, so an input can change between two rungs. Siemens S7-1500 controllers read a process image of the inputs at the start of each cycle. Know which model your platform uses before you debug a timing problem.

If you come to PLCs from the SCADA or IT side, our explainer on the PLC scan cycle and how SCADA polls it covers the same loop from the other end of the network cable.

Why does ladder logic look like a wiring diagram?

Ladder logic looks like a relay schematic because it was designed to replace one. In 1968 General Motors’ Hydra-Matic division asked suppliers for an electronic replacement for the hard-wired relay systems that controlled its machines. Bedford Associates, where Dick Morley worked, won the job, and the result, the Modicon 084, built in 1968 and 1969, was the first production PLC. The name Modicon stood for modular digital controller, and 084 was simply Bedford’s 84th project. Allen-Bradley later popularised the name programmable logic controller and the acronym PLC. Ladder logic became the usual way to program these controllers because it was a format people already used for electromechanical control panels.

The relay heritage is why ladder has two vertical rails like the power supply rails of a control panel, why its basic instructions are called contacts and coils, and why instructions such as Examine If Closed are named after the state of a relay contact. The names outlived the hardware: in a modern controller there is no contact to examine, only a bit that is 1 or 0. Reading ladder well starts with translating every “closed” in your head to “the bit is 1”.

What are the five PLC programming languages?

IEC 61131-3 is the international standard for PLC programming languages. It was first published in 1993, and the current edition, the fourth, was published in May 2025. Most training material, and most engineers, talk about five languages: ladder diagram, function block diagram, structured text, instruction list and sequential function chart. The 2025 edition is more precise. It defines three languages, structured text (ST), ladder diagram (LD) and function block diagram (FBD), plus a set of sequential function chart (SFC) elements for organising programs into steps. Instruction list (IL) was deprecated in the 2013 edition and is not in the 2025 one. You will still meet all five in real plants, because programs outlive standards.

One motor start and stop circuit in the five PLC programming languagesA diagram showing the same three-wire motor control in five languages. Ladder Diagram: XIC Stop_OK in series with a parallel branch of XIC Start_PB and XIC Motor_Run, driving the coil Motor_Run. Function Block Diagram: Start_PB and Motor_Run feed an OR block, whose output and Stop_OK feed an AND block that writes Motor_Run. Structured Text: Motor_Run := (Start_PB OR Motor_Run) AND Stop_OK;. Instruction List: LD Start_PB, OR Motor_Run, AND Stop_OK, ST Motor_Run. Sequential Function Chart: a Stopped step, a transition on Start_PB AND Stop_OK, a Running step whose action sets Motor_Run, and a transition on NOT Stop_OK back to Stopped. Stop_OK is the bit from a normally closed stop button, 1 when the button is not pressed.Ladder Diagram (LD)reads like a relay schematicStop_OKXIC= 1Start_PBXIC= 0Motor_RunXIC= 1Motor_RunOTE0Function Block Diagram (FBD)signals flow through blocksORStart_PBMotor_RunANDStop_OKMotor_RunCommon in process control and safety logicStructured Text (ST)Pascal-like textMotor_Run := (Start_PBOR Motor_Run)AND Stop_OK;Best for maths, loops, strings and data handlingInstruction List (IL)assembler-like textLD Start_PBOR Motor_RunAND Stop_OKST Motor_RunDeprecated in 2013; not in the 2025 editionSequential Function Chart (SFC)steps and transitionsStoppedStart_PB AND Stop_OKRunningN Motor_RunNOT Stop_OKOrganises machine sequences and batch phases
The same three-wire motor circuit in all five languages, including instruction list, which the 2025 edition of the standard no longer contains. Stop_OK is the bit from a normally closed stop button, so it is 1 until someone presses Stop.
LanguageLooks likeBest atWhere you will meet it
Ladder Diagram (LD)A relay schematic: rails, rungs, contacts, coilsDiscrete on/off logic, interlocks, permissives; easy for maintenance to troubleshoot onlineMost machine and line control in discrete manufacturing
Function Block Diagram (FBD)Blocks wired together, signals flowing left to rightContinuous control, analog signal chains, PID loops, safety logicProcess industries, safety programs, drives
Structured Text (ST)A programming language in the Pascal familyMaths, loops, arrays, strings, data handling, state machinesData-heavy routines, recipe handling, anything awkward in ladder
Instruction List (IL)Assembly language: one operator per lineCompact code on old or small controllersLegacy programs; deprecated in 2013 and not in the 2025 edition of the standard
Sequential Function Chart (SFC)A flowchart of steps and transitionsMachine sequences, batch phases, anything with clear statesBatch and packaging sequences; often with LD or ST inside each step

Two practical notes. First, vendors implement the standard to different degrees and often add their own instructions, so “IEC 61131-3 compliant” does not mean a program moves between platforms unchanged. Second, the choice of language is often about who will maintain the program at three in the morning. A maintenance technician can follow ladder online and see which contact is holding a machine off; a clever structured text routine may be shorter and harder for them to debug. Many good programs use ladder for the machine’s permissives and outputs and structured text for the calculations behind them.

How do you read a ladder rung?

A ladder rung is read from left to right. Power starts at the left rail, passes through each input instruction that is true, and reaches the output instruction at the right if every instruction in its path is true. Instructions in series form a logical AND; parallel branches form a logical OR.

The three instructions you meet first are the normally open contact, the normally closed contact and the output coil. In Rockwell Automation software they are XIC (Examine If Closed, true when its bit is 1), XIO (Examine If Open, true when its bit is 0) and OTE (Output Energize, which sets its bit to 1 when the rung is true and to 0 when it is false). With those three you can build the most common circuit in industry, the motor start and stop with a seal-in, which is the ladder diagram at the top of the figure above:

  • Stop_OK is the bit from a normally closed stop button. It is 1 until someone presses Stop, so the XIC on it is true.
  • Start_PB is the start button. Pressing it makes the upper branch true and energises the coil Motor_Run.
  • On the next scan the XIC on Motor_Run in the lower branch is true, so the rung stays true after Start is released. That is the seal-in.
  • Pressing Stop makes Stop_OK 0, the rung goes false, and the motor stops until Start is pressed again.

That one rung contains series logic, parallel logic, a coil, and a bit that depends on its own previous value. Once you can explain why the motor keeps running after Start is released, you have the core of ladder logic. The XIC instruction page animates this rung and works through eight real scenarios built from the same few instructions.

Which PLC brands are most widely used?

No free, current and reliable market share table exists for PLCs, so this page does not print percentages. Every figure we found online was either secondhand, undated or contradicted by another. What does exist is rank-order evidence: a North American readers’ survey and a global analyst ranking of PLC vendors. Together they put the same handful of vendors at the top.

VendorMain PLC familiesWhere they are strongest
Rockwell Automation (Allen-Bradley)ControlLogix, CompactLogix, Micro800; legacy SLC 500, MicroLogix, PLC-5First in the 2023 Control Design readers’ choice for PLCs (North America); a leader in ABI Research’s 2023 global ranking
SiemensSIMATIC S7-1500, S7-1200; legacy S7-300, S7-400; LOGO!Second in Control Design 2023; a leader in ABI Research 2023; leads the Chinese market (IDC, 2024)
OmronNX/NJ (Sysmac), CJ, CPThird in Control Design 2023; ABI Research “mainstream”
AutomationDirectCLICK, Productivity, Do-more, BRXFourth equal in Control Design 2023; low-cost controllers with free software
Schneider ElectricModicon M580, M340, M221, M241/M251/M262Fourth equal in Control Design 2023; owns the Modicon brand, the maker of the first PLC
Mitsubishi ElectricMELSEC iQ-R, iQ-F, Q, L, FXSeventh in Control Design 2023; ABI Research “mainstream”
Beckhoff, Phoenix Contact, Bosch Rexroth, ABB, B&R, Emerson, KEYENCE, Delta, InovancePC-based and CODESYS-based controllers, among othersABI Research ranks Bosch Rexroth and ABB among the leaders and Beckhoff, Phoenix Contact and Emerson as mainstream

One more name matters even though it is not a hardware vendor: CODESYS. It is a development environment and runtime that many manufacturers build into their controllers, so the same editor programs hardware from more than 500 manufacturers, by CODESYS’s own count. If you learn CODESYS, you can read programs for a large share of the controllers that are not Rockwell Automation or Siemens.

Which software programs which PLC?

Every vendor has its own programming software, and some have several, one per controller generation. This matters more than the brand: an engineer who knows Studio 5000 Logix Designer will open a ControlLogix project on day one, but may need a week to get comfortable in TIA Portal, even though both run ladder logic.

VendorSoftwareProgramsCost to start
Rockwell AutomationStudio 5000 Logix Designer (called RSLogix 5000 before version 21)ControlLogix, CompactLogix, GuardLogixPaid licence
Rockwell AutomationRSLogix 500SLC 500, MicroLogixPaid; a free Micro Starter Lite edition was offered for MicroLogix 1000 and 1100
Rockwell AutomationConnected Components WorkbenchMicro800Standard Edition free. FactoryTalk Design Workbench is a newer free option (Micro810 and Micro800 Lx0E) that imports CCW projects
SiemensTIA Portal with STEP 7 Basic or ProfessionalS7-1200 (Basic); S7-1500 and earlier SIMATIC generations (Professional)Paid licence
SiemensSTEP 7 V5.xS7-300, S7-400Paid licence
SiemensLOGO!Soft ComfortLOGO! logic modulesPaid; demo available
OmronSysmac StudioNJ, NXPaid; free trial
OmronCX-Programmer (in CX-One)CJ, CPPaid licence
Mitsubishi ElectricGX Works3MELSEC iQ-R, iQ-FPaid licence
Mitsubishi ElectricGX Works2MELSEC FX3 and earlier seriesPaid licence
Schneider ElectricEcoStruxure Control Expert (formerly Unity Pro)Modicon M340, M580Paid licence
Schneider ElectricEcoStruxure Machine Expert (CODESYS-based)Modicon M241, M251, M262Paid licence
Schneider ElectricEcoStruxure Machine Expert - BasicModicon M221Free
AutomationDirectCLICK Programming Software, Productivity Suite, Do-more DesignerCLICK, Productivity, Do-more and BRXFree
CODESYS GroupCODESYS Development SystemControllers from more than 500 manufacturers, by CODESYS’s countFree to download; each device maker licenses the runtime
BeckhoffTwinCAT 3Beckhoff industrial and embedded PCsEngineering free; runtime licensed; 7-day trial licences can be renewed
Phoenix ContactPLCnext EngineerPLCnext ControlFree basic version; paid add-ins
ABBAutomation BuilderAC500Free Basic edition
EmersonPAC Machine EditionPACSystemsContact Emerson
Bosch RexrothctrlX PLC Engineering (CODESYS-based, in ctrlX WORKS)ctrlX CORECheck with Bosch Rexroth
KEYENCEKV STUDIOKV seriesTrial available
B&RAutomation StudioB&R controllersFree for testing; licence for commercial use

Licence terms change often; these were checked against vendor pages and trade press in November 2026. The XIC page’s vendor gallery shows the same instruction in 26 of these editors side by side.

Close view of illuminated amber, green and orange pushbuttons on a blue industrial machine control panel
The operator sees buttons and lights. Behind every one of them is a bit in the controller, and a program written in one of the tools above.

Software licences are expensive, and versions matter. A Studio 5000 project opens only in the major version of the software that matches its controller firmware, and an old PLC-5 or SLC 500 program needs RSLogix 5 or RSLogix 500 rather than Studio 5000. When you inherit a plant, list every controller, its firmware and the software version it needs before you need to go online in a hurry. If you are setting up a practice environment, I have walked through getting RSLogix 500 for free and installing TIA Portal.

How do PLC addresses and tags differ between vendors?

Older PLCs address memory by location: a bit is “input file 1, word 0, bit 0”. Newer PLCs use named tags: a bit is Start_PB, and the software decides where it lives. Most platforms now support names, but the address style still shows through in older programs, in I/O tags, and in what you type into the editor.

PlatformAddressing styleA bitA word
Rockwell Automation Logix (Studio 5000)Named tags; I/O appears as module tagsLocal:1:I.Data.0, usually aliased to a name such as Start_PBLine_Speed (a DINT tag)
Rockwell Automation SLC 500, MicroLogix (RSLogix 500)Data files by number and typeI:1/0 (input slot 1, bit 0), B3:0/0N7:0
Siemens S7 (TIA Portal, STEP 7)Memory areas I, Q, M, or symbolic names; TIA Portal shows absolute addresses with %%I0.0, %Q0.0, %M0.0%MW10
Mitsubishi Electric MELSECDevice letter and numberX0, Y0, M0 (X and Y count in octal on FX, in hexadecimal on iQ-R)D0
Omron CJ, CP (CX-Programmer)Memory area, word and bitCIO 0.00D0
Omron NJ, NX (Sysmac Studio)Named variables only, mapped to I/OStart_PBLine_Speed
IEC 61131-3, CODESYSDirectly represented variables with %, or names%IX0.0, %QX0.0%MW0

The consequence for anyone reading programs across platforms: the instruction is usually the same idea, and the address tells you which platform and which generation you are in. B3:0/5 says SLC 500 or MicroLogix, %I0.0 says Siemens or an IEC-style platform, X0 says Mitsubishi, and a plain name like Motor_Run says a tag-based controller where you need the tag database to know what the bit really is.

The PLC instruction glossary

The glossary below lists the common ladder instructions by family, in the order most people learn them. The mnemonics are Rockwell Automation Logix names, because that is the vocabulary most North American programs use; the right-hand column gives the nearest element in IEC 61131-3, which is what Siemens, CODESYS and most other platforms are closest to. Every instruction links to its own page once that page is published.

The PLC instruction families, in the order to learn themA grid of twelve cards in learning order, left to right and top to bottom: 1 Bit (XIC, XIO, OTE, OTL, OTU), 2 Edge (ONS, OSR, OSF), 3 Timers (TON, TOF, RTO), 4 Counters (CTU, CTD, RES), 5 Compare (EQU, NEQ, GRT, LES, LIM), 6 Math (ADD, SUB, MUL, DIV, CPT), 7 Move and logic (MOV, COP, AND, OR, BTD), 8 Program control (JSR, SBR, RET, JMP, LBL), 9 Arrays and files (FAL, FSC, FLL, COP), 10 Shift and queue (BSL, BSR, FFL, FFU), 11 Sequencers (SQO, SQI, SQL), 12 Comms and process (MSG, GSV, SSV, PID). The first row is marked as the foundation to learn first. Mnemonics are Rockwell Logix names.LEARN IN THIS ORDER · ROCKWELL LOGIX MNEMONICS1BitXIC XIO OTEOTL OTU2EdgeONS OSR OSF3TimersTON TOF RTO4CountersCTU CTD RES5CompareEQU NEQ GRTLES LIM6MathADD SUB MULDIV CPT7Move and logicMOV COP ANDOR BTD8Program controlJSR SBR RETJMP LBL9Arrays and filesFAL FSC FLLCOP10Shift and queueBSL BSR FFLFFU11SequencersSQO SQI SQL12Comms, processMSG GSV SSVPIDGreen row: the foundation. Learn these first; every later family builds on them.
The twelve instruction families in learning order. The first row, bits, edges, timers and counters, is the foundation every later family builds on.

Bit instructions

Test a bit or set a bit. Most rungs are built from these alone.

InstructionWhat it doesIEC 61131-3 nearest
XIC
Examine If Closed
True when its bit is 1. The normally open contact, and the most common instruction in ladder. Full XIC guideNormally open contact -| |-
XIO
Examine If Open
True when its bit is 0. Same bit as XIC, opposite answer; it says nothing about how the device is wired. Full XIO guideNormally closed contact -|/|-
OTE
Output Energize
Sets its bit to 1 while the rung is true and to 0 when it is false. Write each OTE bit once in a program. Full OTE guideCoil -( )-
OTL
Output Latch
Sets its bit to 1 when the rung is true and leaves it at 1 until something clears it, usually an OTU. Full OTL guideSet coil -(S)-
OTU
Output Unlatch
Clears its bit to 0 when the rung is true. The partner of OTL. Full OTU guideReset coil -(R)-
ONS
One Shot
Lets the rest of the rung pass for one scan each time the rung goes from false to true, using a storage bit. Guide coming.Positive transition-sensing contact -|P|-; function block R_TRIG
OSR
One Shot Rising
Sets an output bit for one scan when the rung goes from false to true. In RSLogix 500 the OSR works differently, as a single-bit input instruction. Guide coming.Positive transition-sensing coil -(P)-; R_TRIG
OSF
One Shot Falling
Sets an output bit for one scan when the rung goes from true to false. Guide coming.Negative transition-sensing coil -(N)-; F_TRIG

Timers and counters

Time how long something has been true, or count how often it happened. In Logix ladder these use TIMER and COUNTER tags with .PRE, .ACC and .DN members.

InstructionWhat it doesIEC 61131-3 nearest
TON
Timer On Delay
Times while the rung is true and sets .DN when the accumulated time reaches the preset. Resets when the rung goes false. Guide coming.TON
TOF
Timer Off Delay
Keeps .DN set for the preset time after the rung goes false. Used for run-on delays such as a fan after a heater. Guide coming.TOF
RTO
Retentive Timer On
Accumulates time while the rung is true and holds it when the rung goes false. Needs a RES to clear. Guide coming.None in the standard
CTU
Count Up
Adds one each time the rung goes from false to true; sets .DN when the count reaches the preset. Guide coming.CTU
CTD
Count Down
Subtracts one each time the rung goes from false to true. Often paired with a CTU on the same COUNTER tag. Guide coming.CTD
RES
Reset
Clears the accumulated value and status bits of a TIMER, COUNTER or CONTROL tag. Guide coming.None (IEC counters have reset and load inputs instead)
TONR
Timer On Delay with Reset
An on-delay timer with its own reset input. Function block and structured text only; in ladder use TON with RES.TON (which has no reset input)
TOFR
Timer Off Delay with Reset
An off-delay timer with its own reset input. Function block and structured text only.TOF (which has no reset input)
RTOR
Retentive Timer On with Reset
A retentive timer with a reset input. Function block and structured text only; in ladder use RTO with RES.None in the standard
CTUD
Count Up/Down
One counter block that counts both ways. Function block and structured text only; in ladder use CTU and CTD on one tag.CTUD

Compare

Test numbers and pass the rung when the test is true. They behave like contacts for values instead of bits.

InstructionWhat it doesIEC 61131-3 nearest
EQU
Equal To
True when two values are equal. Avoid it on REAL values, which are rarely exactly equal. Guide coming.EQ
NEQ
Not Equal To
True when two values are not equal. Guide coming.NE
GRT
Greater Than
True when the first value is greater than the second. Guide coming.GT
GEQ
Greater Than or Equal To
True when the first value is greater than or equal to the second. Guide coming.GE
LES
Less Than
True when the first value is less than the second. Guide coming.LT
LEQ
Less Than or Equal To
True when the first value is less than or equal to the second. Guide coming.LE
LIM
Limit
True when a test value lies between a low and a high limit. A range test, not a clamp. Guide coming.None direct (IEC LIMIT clamps a value instead of testing it)
MEQ
Mask Equal To
Compares two values through a mask, so only the selected bits are tested. Guide coming.None (AND, then EQ)
CMP
Compare
Evaluates a comparison expression you type in, such as Level > 80 AND Pump_Run. Guide coming.None (an expression)

Math

Arithmetic on integers and reals. Watch data types: an integer divide drops the remainder.

InstructionWhat it doesIEC 61131-3 nearest
ADD
Add
Adds two values and stores the result. Guide coming.ADD
SUB
Subtract
Subtracts one value from another. Guide coming.SUB
MUL
Multiply
Multiplies two values. Guide coming.MUL
DIV
Divide
Divides one value by another. Dividing by zero sets a fault or overflow flag, so guard the divisor. Guide coming.DIV
MOD
Modulo
Stores the remainder of a division. Useful for every-nth-part logic.MOD
SQR
Square Root
Takes the square root of a value. The structured text function is named SQRT.SQRT
NEG
Negate
Reverses the sign of a value.None (unary minus)
ABS
Absolute Value
Stores the value without its sign.ABS
CPT
Compute
Evaluates a whole expression, such as a scaling formula, in one instruction. Guide coming.None (an assignment with an expression)

Move and logic

Copy values and work on the individual bits of a word.

InstructionWhat it doesIEC 61131-3 nearest
MOV
Move
Copies a value to a destination; the source is unchanged. Despite the name, nothing is moved. Guide coming.MOVE
MVM
Masked Move
Copies only the bits selected by a mask.None (MOVE with AND and OR)
BTD
Bit Field Distribute
Copies a group of bits from one position in a value to another position in a destination. Guide coming.None (shifts and masks)
CLR
Clear
Sets a value to zero.None (assign 0)
SWPB
Swap Byte
Rearranges the byte order of a value, often needed for data from another vendor's device. RSLogix 500 calls it SWP.None in the standard
AND
Bitwise AND
ANDs two values bit by bit. Used to pick bits out of a status word.AND
OR
Bitwise OR
ORs two values bit by bit.OR
XOR
Bitwise Exclusive OR
XORs two values bit by bit. Shows which bits differ between two words.XOR
NOT
Bitwise NOT
Inverts every bit of a value.NOT

Arrays and files

Work on whole arrays at once. "File" is the older Rockwell word for an array.

InstructionWhat it doesIEC 61131-3 nearest
COP
Copy File
Copies data from one array or structure into another, byte for byte. Guide coming.None in the standard
CPS
Synchronous Copy File
Same as COP, but cannot be interrupted part-way, so the data is never half updated. Use it for I/O and data shared between tasks. Guide coming.None in the standard
FLL
File Fill
Fills an array with one value, for example to clear a recipe table.None in the standard
FAL
File Arithmetic and Logic
Applies an expression to every element of an array, all at once or a few per scan. Guide coming.None in the standard
FSC
File Search and Compare
Searches an array for an element that meets a condition. Guide coming.None in the standard
AVE
File Average
Averages the values in an array.None in the standard
SRT
File Sort
Sorts an array into ascending order.None in the standard
STD
File Standard Deviation
Calculates the standard deviation of an array. In RSLogix 500, STD is a different instruction (Selectable Timed Disable).None in the standard
SIZE
Size In Elements
Returns the number of elements in one dimension of an array, so loops do not hard-code the length.None (SIZEOF returns bytes)

Shift registers and queues

Track parts along a conveyor or hold values in order. Ladder only in Logix.

InstructionWhat it doesIEC 61131-3 nearest
BSL
Bit Shift Left
Shifts a bit array one position each time the rung goes true. The classic way to track good and bad parts down a line. Guide coming.None (SHL shifts one word, not an array)
BSR
Bit Shift Right
The same, shifting the other way. Guide coming.None (SHR shifts one word)
FFL
FIFO Load
Adds a value to a first-in, first-out queue. Guide coming.None in the standard
FFU
FIFO Unload
Takes the oldest value out of the queue. Guide coming.None in the standard
LFL
LIFO Load
Adds a value to a last-in, first-out stack. Guide coming.None in the standard
LFU
LIFO Unload
Takes the newest value off the stack. Guide coming.None in the standard

Sequencers

Step a machine through a table of output patterns. Ladder only in Logix; SFC is the standard's different answer to the same problem.

InstructionWhat it doesIEC 61131-3 nearest
SQO
Sequencer Output
Writes the next step's output pattern from a table, through a mask. Guide coming.None (SFC is a different mechanism)
SQI
Sequencer Input
Checks whether the inputs match the pattern expected for the current step. Guide coming.None in the standard
SQL
Sequencer Load
Records values into a sequencer table, for example to teach a sequence. Guide coming.None in the standard

Program control

Decide which logic runs. Structure a program with these; use jumps sparingly.

InstructionWhat it doesIEC 61131-3 nearest
JSR
Jump to Subroutine
Runs another routine, optionally passing parameters, then comes back. The backbone of a structured program. Guide coming.CAL (call)
SBR
Subroutine
Optional first instruction of a called routine; receives the parameters passed by JSR. Guide coming.None in the standard
RET
Return
Optional; ends a subroutine and passes values back to the JSR. Guide coming.RETURN
JMP
Jump to Label
Skips forward or back to a label in the same routine. Rungs jumped over keep their last outputs.Jump to a label
LBL
Label
The target of a JMP. Must be the first instruction on its rung.Label
MCR
Master Control Reset
Used in pairs to mark a zone of rungs that can be turned off as a group. Never a substitute for a hardwired master control relay.None in the standard
AFI
Always False Instruction
Forces the rung false. Used to disable a rung temporarily while testing; remove it afterwards.None in the standard
NOP
No Operation
Does nothing. A placeholder.None in the standard
TND
Temporary End
Stops the current routine at that point for this scan. A debugging tool.None in the standard
UID
User Interrupt Disable
Stops other tasks from interrupting the current task until a UIE.None in the standard
UIE
User Interrupt Enable
Lets other tasks interrupt the current task again.None in the standard
EVENT
Trigger Event Task
Starts an event task from the program.None in the standard

Communication and system

Talk to other devices and to the controller itself.

InstructionWhat it doesIEC 61131-3 nearest
MSG
Message
Reads or writes data in another controller or device over the network. Check its done and error bits every time. Guide coming.None in the standard
GSV
Get System Value
Reads controller status into a tag: fault codes, scan times, the clock, module status.None in the standard
SSV
Set System Value
Writes controller settings from a tag, such as the clock.None in the standard
IOT
Immediate Output
Sends output data to a module straight away instead of waiting for the normal update.None in the standard

Conversion

Change how a number is represented.

InstructionWhat it doesIEC 61131-3 nearest
TOD
Convert To BCD
Converts an integer to binary-coded decimal, for older displays and thumbwheels.IEC BCD conversion functions
FRD
Convert To Integer
Converts binary-coded decimal to an integer.IEC BCD conversion functions
DEG
Degrees
Converts radians to degrees.None in the standard
RAD
Radians
Converts degrees to radians.None in the standard

Process control

Closed-loop control of flow, pressure, temperature and level.

InstructionWhat it doesIEC 61131-3 nearest
PID
Proportional Integral Derivative
Adjusts an output to hold a process variable at its setpoint. Available in ladder and structured text. Guide coming.None (vendor and PLCopen libraries)
PIDE
Enhanced PID
The more capable PID used in function block diagrams. Not available in ladder. Guide coming.None (vendor and PLCopen libraries)

Strings

Build and read text, for barcode data, labels and messages.

InstructionWhat it doesIEC 61131-3 nearest
CONCAT
String Concatenate
Joins two strings.CONCAT
MID
Middle String
Extracts characters from the middle of a string.MID
FIND
Find String
Finds where one string starts inside another.FIND
INSERT
Insert String
Inserts characters into a string.INSERT
DELETE
String Delete
Removes characters from a string.DELETE
DTOS
DINT to String
Converts an integer to text.Type conversion (DINT_TO_STRING)
STOD
String To DINT
Converts text to an integer.Type conversion (STRING_TO_DINT)
RTOS
REAL to String
Converts a real number to text.Type conversion (REAL_TO_STRING)
STOR
String To REAL
Converts text to a real number.Type conversion (STRING_TO_REAL)

Alarms

Built-in alarm instructions with acknowledge, enable and disable handling.

InstructionWhat it doesIEC 61131-3 nearest
ALMD
Digital Alarm
Raises an alarm from a true or false condition, with acknowledge, reset and an optional minimum duration.None in the standard
ALMA
Analog Alarm
Raises alarms when an analog value or its rate of change crosses configured limits.None in the standard

Some families are deliberately left out of this glossary: motion instructions (the M instructions such as MSO and MAM that command servo axes), safety instructions used in safety controllers, and vendor-specific process and drive blocks. Each of those deserves its own guide and is better learned once the families above are familiar.

How do you learn PLC programming?

Learn it in the order the instructions depend on each other, practise on free software with a simulator, and read real programs as early as you can. The glossary order above is the order we are publishing the instruction pages in, and it is a good study plan on its own.

  1. Bits first. XIC, XIO and OTE, then latch and unlatch (OTL, OTU) and one-shots (ONS). Build the start and stop circuit until you can explain every scan of it.
  2. Timers and counters. TON, TOF and RTO, then CTU and CTD. Most machine sequences are bits plus timers.
  3. Data. Compare (EQU, GRT, LIM), move (MOV, COP) and maths (ADD, CPT). This is where integers, reals and data types start to matter.
  4. Structure. Subroutines and program organisation (JSR), user-defined data types and add-on instructions or function blocks. This is the step from writing rungs to writing a program someone else can maintain.
  5. The plant. Communications (MSG and produced/consumed data), PID loops, sequencers and alarms.

Practise on free tools before you buy anything. CODESYS, AutomationDirect’s software, Schneider Electric’s Machine Expert - Basic and the Standard Edition of Rockwell Automation Connected Components Workbench cost nothing to download, and an entry-level controller costs far less than a single licence for the large platforms. Then read real programs: an hour spent going online with a running machine and following why an output is off teaches more than a day of exercises.

What separates a good PLC program from a bad one?

A good PLC program is one the next person can troubleshoot at three in the morning. The instruction set is the easy part; these habits are what make a program last.

  • One output instruction per bit. Write each coil once. Two OTEs on the same bit means the last rung to execute wins, and the program behaves differently depending on rung order.
  • Name for the field, not the programmer. Infeed_Conveyor_Run and LSH_101_Tank_High beat Bit_23 and Temp5. The tag name is the first documentation a technician reads.
  • Comment the why. “Seal-in so the motor keeps running after Start is released” is useful; “XIC Motor_Run” is not.
  • Structure by machine, not by instruction type. One routine or program per unit of equipment, with the same layout in each: inputs and permissives, then the sequence, then outputs and alarms.
  • Fail-safe wiring and logic. Stops and limit switches are wired normally closed so a broken wire stops the machine, and the program treats a 0 as the safe state.
  • Version control and change management. Every change is backed up, compared and recorded. Our guide to PLC version control in practice covers how plants actually do this.
  • The PLC is not the safety system. Emergency stops, guard interlocks and other safety functions are built with hardwired safety devices or a listed, safety-rated controller, not with standard PLC logic alone. A standard PLC can read the safety system’s status and show it on the HMI; it should not be the thing that makes the machine safe.

Many plants are now replacing the controllers these programs run on. If you are moving an old platform such as SLC 500 or PLC-5 to a current one, the program conversion is only part of the job; our PLC platform migration guide covers the rest.

Where Joltek fits

Joltek is an industrial automation consultancy. We write, review and migrate PLC programs for manufacturers, and we train plant teams to own their control systems rather than call an integrator for every change. If your team needs this foundation taught on your own equipment and programs, that is what our hands-on PLC and SCADA training is for; if you are planning a controller upgrade, start with our PLC migration service.

This guide grows one instruction at a time. The glossary links each new page as it is published; the five bit instructions are done, and the one-shots, timers and counters are next.

References and further reading

  1. IEC 61131-3:2025, Programmable controllers, Part 3: Programming languages (Edition 4.0) · International Electrotechnical CommissionPublished 22 May 2025; replaces the 2013 edition. Scope: ST, LD and FBD, plus SFC elements.
  2. PLCopen standards · PLCopenVendor-independent work built on IEC 61131-3: XML exchange, motion control function blocks.
  3. The dawn of the programmable logic controller (PLC) · Automation.comGM Hydra-Matic's 1968 request, Bedford Associates and the Modicon 084.
  4. 2023 Readers' Choice Awards · Control DesignPLC vendor ranking used for the vendor table (rank only; no shares).
  5. Siemens, Rockwell Automation, Bosch Rexroth and ABB named market leaders in ABI Research's PLC solutions competitive ranking · ABI Research
  6. Logix Designer version 21 release note · Rockwell AutomationVersion 21 re-brands RSLogix 5000 as the Logix Designer application in Studio 5000.
  7. ControlLogix 5590 Controllers User Manual: Determine When I/O Data Is Updated (1756-UM900) · Rockwell AutomationI/O data is refreshed asynchronously to logic execution.
  8. SIMATIC S7-1500 Cycle and Response Times, Function Manual · SiemensThe process image of the inputs is read at the start of each cycle.
  9. TwinCAT 3 licensing · Beckhoff
  10. EcoStruxure Machine Expert - Basic, free licence, for M221 controllers · Schneider Electric
  11. Free CLICK PLC programming software · AutomationDirect
  12. Mitsubishi Electric FA FAQ: X and Y device numbering on the MELSEC-F series · Mitsubishi Electric

Have a project that needs technical ownership?

Send us the situation. If it is not something we should take on, we will say so.

The Plant-Side Brief

The weekly brief for the people who own a plant’s control systems.

One email every Wednesday for engineering and operations leaders responsible for controls, SCADA, MES and OT networks. Skim the top in two minutes; read the Deep Dive when you have fifteen.

  • One modernization problem, worked through to cost, risk and a schedule you can defend. The Deep Dive.
  • End-of-support dates before they reach your plant Windows, servers, controllers and HMI software. Lifecycle Watch.
  • A checklist your engineers can run that week not a framework to admire. Field Kit.
  • Every number sourced, no vendor agenda we are paid by plants, never by vendors.