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.
Table of contents
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.
Three ideas follow from the scan, and most beginner confusion comes from missing one of them.
- 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.
- 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.
- 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.
| Language | Looks like | Best at | Where you will meet it |
|---|---|---|---|
| Ladder Diagram (LD) | A relay schematic: rails, rungs, contacts, coils | Discrete on/off logic, interlocks, permissives; easy for maintenance to troubleshoot online | Most machine and line control in discrete manufacturing |
| Function Block Diagram (FBD) | Blocks wired together, signals flowing left to right | Continuous control, analog signal chains, PID loops, safety logic | Process industries, safety programs, drives |
| Structured Text (ST) | A programming language in the Pascal family | Maths, loops, arrays, strings, data handling, state machines | Data-heavy routines, recipe handling, anything awkward in ladder |
| Instruction List (IL) | Assembly language: one operator per line | Compact code on old or small controllers | Legacy programs; deprecated in 2013 and not in the 2025 edition of the standard |
| Sequential Function Chart (SFC) | A flowchart of steps and transitions | Machine sequences, batch phases, anything with clear states | Batch 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_OKis the bit from a normally closed stop button. It is 1 until someone presses Stop, so the XIC on it is true.Start_PBis the start button. Pressing it makes the upper branch true and energises the coilMotor_Run.- On the next scan the XIC on
Motor_Runin the lower branch is true, so the rung stays true after Start is released. That is the seal-in. - Pressing Stop makes
Stop_OK0, 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.
| Vendor | Main PLC families | Where they are strongest |
|---|---|---|
| Rockwell Automation (Allen-Bradley) | ControlLogix, CompactLogix, Micro800; legacy SLC 500, MicroLogix, PLC-5 | First in the 2023 Control Design readers’ choice for PLCs (North America); a leader in ABI Research’s 2023 global ranking |
| Siemens | SIMATIC 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) |
| Omron | NX/NJ (Sysmac), CJ, CP | Third in Control Design 2023; ABI Research “mainstream” |
| AutomationDirect | CLICK, Productivity, Do-more, BRX | Fourth equal in Control Design 2023; low-cost controllers with free software |
| Schneider Electric | Modicon M580, M340, M221, M241/M251/M262 | Fourth equal in Control Design 2023; owns the Modicon brand, the maker of the first PLC |
| Mitsubishi Electric | MELSEC iQ-R, iQ-F, Q, L, FX | Seventh in Control Design 2023; ABI Research “mainstream” |
| Beckhoff, Phoenix Contact, Bosch Rexroth, ABB, B&R, Emerson, KEYENCE, Delta, Inovance | PC-based and CODESYS-based controllers, among others | ABI 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.
| Vendor | Software | Programs | Cost to start |
|---|---|---|---|
| Rockwell Automation | Studio 5000 Logix Designer (called RSLogix 5000 before version 21) | ControlLogix, CompactLogix, GuardLogix | Paid licence |
| Rockwell Automation | RSLogix 500 | SLC 500, MicroLogix | Paid; a free Micro Starter Lite edition was offered for MicroLogix 1000 and 1100 |
| Rockwell Automation | Connected Components Workbench | Micro800 | Standard Edition free. FactoryTalk Design Workbench is a newer free option (Micro810 and Micro800 Lx0E) that imports CCW projects |
| Siemens | TIA Portal with STEP 7 Basic or Professional | S7-1200 (Basic); S7-1500 and earlier SIMATIC generations (Professional) | Paid licence |
| Siemens | STEP 7 V5.x | S7-300, S7-400 | Paid licence |
| Siemens | LOGO!Soft Comfort | LOGO! logic modules | Paid; demo available |
| Omron | Sysmac Studio | NJ, NX | Paid; free trial |
| Omron | CX-Programmer (in CX-One) | CJ, CP | Paid licence |
| Mitsubishi Electric | GX Works3 | MELSEC iQ-R, iQ-F | Paid licence |
| Mitsubishi Electric | GX Works2 | MELSEC FX3 and earlier series | Paid licence |
| Schneider Electric | EcoStruxure Control Expert (formerly Unity Pro) | Modicon M340, M580 | Paid licence |
| Schneider Electric | EcoStruxure Machine Expert (CODESYS-based) | Modicon M241, M251, M262 | Paid licence |
| Schneider Electric | EcoStruxure Machine Expert - Basic | Modicon M221 | Free |
| AutomationDirect | CLICK Programming Software, Productivity Suite, Do-more Designer | CLICK, Productivity, Do-more and BRX | Free |
| CODESYS Group | CODESYS Development System | Controllers from more than 500 manufacturers, by CODESYS’s count | Free to download; each device maker licenses the runtime |
| Beckhoff | TwinCAT 3 | Beckhoff industrial and embedded PCs | Engineering free; runtime licensed; 7-day trial licences can be renewed |
| Phoenix Contact | PLCnext Engineer | PLCnext Control | Free basic version; paid add-ins |
| ABB | Automation Builder | AC500 | Free Basic edition |
| Emerson | PAC Machine Edition | PACSystems | Contact Emerson |
| Bosch Rexroth | ctrlX PLC Engineering (CODESYS-based, in ctrlX WORKS) | ctrlX CORE | Check with Bosch Rexroth |
| KEYENCE | KV STUDIO | KV series | Trial available |
| B&R | Automation Studio | B&R controllers | Free 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.

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.
| Platform | Addressing style | A bit | A word |
|---|---|---|---|
| Rockwell Automation Logix (Studio 5000) | Named tags; I/O appears as module tags | Local:1:I.Data.0, usually aliased to a name such as Start_PB | Line_Speed (a DINT tag) |
| Rockwell Automation SLC 500, MicroLogix (RSLogix 500) | Data files by number and type | I:1/0 (input slot 1, bit 0), B3:0/0 | N7: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 MELSEC | Device letter and number | X0, 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 bit | CIO 0.00 | D0 |
| Omron NJ, NX (Sysmac Studio) | Named variables only, mapped to I/O | Start_PB | Line_Speed |
| IEC 61131-3, CODESYS | Directly 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.
96 instructions
Bit instructions
Test a bit or set a bit. Most rungs are built from these alone.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
XICExamine If Closed | True when its bit is 1. The normally open contact, and the most common instruction in ladder. Full XIC guide | Normally open contact -| |- |
XIOExamine 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 guide | Normally closed contact -|/|- |
OTEOutput 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 guide | Coil -( )- |
OTLOutput 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 guide | Set coil -(S)- |
OTUOutput Unlatch | Clears its bit to 0 when the rung is true. The partner of OTL. Full OTU guide | Reset coil -(R)- |
ONSOne 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 |
OSROne 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 |
OSFOne 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.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
TONTimer 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 |
TOFTimer 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 |
RTORetentive 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 |
CTUCount Up | Adds one each time the rung goes from false to true; sets .DN when the count reaches the preset. Guide coming. | CTU |
CTDCount 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 |
RESReset | 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) |
TONRTimer 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) |
TOFRTimer 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) |
RTORRetentive 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 |
CTUDCount 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.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
EQUEqual To | True when two values are equal. Avoid it on REAL values, which are rarely exactly equal. Guide coming. | EQ |
NEQNot Equal To | True when two values are not equal. Guide coming. | NE |
GRTGreater Than | True when the first value is greater than the second. Guide coming. | GT |
GEQGreater Than or Equal To | True when the first value is greater than or equal to the second. Guide coming. | GE |
LESLess Than | True when the first value is less than the second. Guide coming. | LT |
LEQLess Than or Equal To | True when the first value is less than or equal to the second. Guide coming. | LE |
LIMLimit | 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) |
MEQMask Equal To | Compares two values through a mask, so only the selected bits are tested. Guide coming. | None (AND, then EQ) |
CMPCompare | 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.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
ADDAdd | Adds two values and stores the result. Guide coming. | ADD |
SUBSubtract | Subtracts one value from another. Guide coming. | SUB |
MULMultiply | Multiplies two values. Guide coming. | MUL |
DIVDivide | Divides one value by another. Dividing by zero sets a fault or overflow flag, so guard the divisor. Guide coming. | DIV |
MODModulo | Stores the remainder of a division. Useful for every-nth-part logic. | MOD |
SQRSquare Root | Takes the square root of a value. The structured text function is named SQRT. | SQRT |
NEGNegate | Reverses the sign of a value. | None (unary minus) |
ABSAbsolute Value | Stores the value without its sign. | ABS |
CPTCompute | 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.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
MOVMove | Copies a value to a destination; the source is unchanged. Despite the name, nothing is moved. Guide coming. | MOVE |
MVMMasked Move | Copies only the bits selected by a mask. | None (MOVE with AND and OR) |
BTDBit 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) |
CLRClear | Sets a value to zero. | None (assign 0) |
SWPBSwap 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 |
ANDBitwise AND | ANDs two values bit by bit. Used to pick bits out of a status word. | AND |
ORBitwise OR | ORs two values bit by bit. | OR |
XORBitwise Exclusive OR | XORs two values bit by bit. Shows which bits differ between two words. | XOR |
NOTBitwise 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.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
COPCopy File | Copies data from one array or structure into another, byte for byte. Guide coming. | None in the standard |
CPSSynchronous 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 |
FLLFile Fill | Fills an array with one value, for example to clear a recipe table. | None in the standard |
FALFile 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 |
FSCFile Search and Compare | Searches an array for an element that meets a condition. Guide coming. | None in the standard |
AVEFile Average | Averages the values in an array. | None in the standard |
SRTFile Sort | Sorts an array into ascending order. | None in the standard |
STDFile Standard Deviation | Calculates the standard deviation of an array. In RSLogix 500, STD is a different instruction (Selectable Timed Disable). | None in the standard |
SIZESize 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.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
BSLBit 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) |
BSRBit Shift Right | The same, shifting the other way. Guide coming. | None (SHR shifts one word) |
FFLFIFO Load | Adds a value to a first-in, first-out queue. Guide coming. | None in the standard |
FFUFIFO Unload | Takes the oldest value out of the queue. Guide coming. | None in the standard |
LFLLIFO Load | Adds a value to a last-in, first-out stack. Guide coming. | None in the standard |
LFULIFO 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.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
SQOSequencer Output | Writes the next step's output pattern from a table, through a mask. Guide coming. | None (SFC is a different mechanism) |
SQISequencer Input | Checks whether the inputs match the pattern expected for the current step. Guide coming. | None in the standard |
SQLSequencer 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.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
JSRJump to Subroutine | Runs another routine, optionally passing parameters, then comes back. The backbone of a structured program. Guide coming. | CAL (call) |
SBRSubroutine | Optional first instruction of a called routine; receives the parameters passed by JSR. Guide coming. | None in the standard |
RETReturn | Optional; ends a subroutine and passes values back to the JSR. Guide coming. | RETURN |
JMPJump to Label | Skips forward or back to a label in the same routine. Rungs jumped over keep their last outputs. | Jump to a label |
LBLLabel | The target of a JMP. Must be the first instruction on its rung. | Label |
MCRMaster 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 |
AFIAlways False Instruction | Forces the rung false. Used to disable a rung temporarily while testing; remove it afterwards. | None in the standard |
NOPNo Operation | Does nothing. A placeholder. | None in the standard |
TNDTemporary End | Stops the current routine at that point for this scan. A debugging tool. | None in the standard |
UIDUser Interrupt Disable | Stops other tasks from interrupting the current task until a UIE. | None in the standard |
UIEUser Interrupt Enable | Lets other tasks interrupt the current task again. | None in the standard |
EVENTTrigger 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.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
MSGMessage | 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 |
GSVGet System Value | Reads controller status into a tag: fault codes, scan times, the clock, module status. | None in the standard |
SSVSet System Value | Writes controller settings from a tag, such as the clock. | None in the standard |
IOTImmediate 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.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
TODConvert To BCD | Converts an integer to binary-coded decimal, for older displays and thumbwheels. | IEC BCD conversion functions |
FRDConvert To Integer | Converts binary-coded decimal to an integer. | IEC BCD conversion functions |
DEGDegrees | Converts radians to degrees. | None in the standard |
RADRadians | Converts degrees to radians. | None in the standard |
Process control
Closed-loop control of flow, pressure, temperature and level.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
PIDProportional 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) |
PIDEEnhanced 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.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
CONCATString Concatenate | Joins two strings. | CONCAT |
MIDMiddle String | Extracts characters from the middle of a string. | MID |
FINDFind String | Finds where one string starts inside another. | FIND |
INSERTInsert String | Inserts characters into a string. | INSERT |
DELETEString Delete | Removes characters from a string. | DELETE |
DTOSDINT to String | Converts an integer to text. | Type conversion (DINT_TO_STRING) |
STODString To DINT | Converts text to an integer. | Type conversion (STRING_TO_DINT) |
RTOSREAL to String | Converts a real number to text. | Type conversion (REAL_TO_STRING) |
STORString To REAL | Converts text to a real number. | Type conversion (STRING_TO_REAL) |
Alarms
Built-in alarm instructions with acknowledge, enable and disable handling.
| Instruction | What it does | IEC 61131-3 nearest |
|---|---|---|
ALMDDigital Alarm | Raises an alarm from a true or false condition, with acknowledge, reset and an optional minimum duration. | None in the standard |
ALMAAnalog 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.
- 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.
- Timers and counters. TON, TOF and RTO, then CTU and CTD. Most machine sequences are bits plus timers.
- Data. Compare (EQU, GRT, LIM), move (MOV, COP) and maths (ADD, CPT). This is where integers, reals and data types start to matter.
- 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.
- 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_RunandLSH_101_Tank_HighbeatBit_23andTemp5. 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
- 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.
- PLCopen standards · PLCopenVendor-independent work built on IEC 61131-3: XML exchange, motion control function blocks.
- The dawn of the programmable logic controller (PLC) · Automation.comGM Hydra-Matic's 1968 request, Bedford Associates and the Modicon 084.
- 2023 Readers' Choice Awards · Control DesignPLC vendor ranking used for the vendor table (rank only; no shares).
- Siemens, Rockwell Automation, Bosch Rexroth and ABB named market leaders in ABI Research's PLC solutions competitive ranking · ABI Research
- Logix Designer version 21 release note · Rockwell AutomationVersion 21 re-brands RSLogix 5000 as the Logix Designer application in Studio 5000.
- ControlLogix 5590 Controllers User Manual: Determine When I/O Data Is Updated (1756-UM900) · Rockwell AutomationI/O data is refreshed asynchronously to logic execution.
- SIMATIC S7-1500 Cycle and Response Times, Function Manual · SiemensThe process image of the inputs is read at the start of each cycle.
- TwinCAT 3 licensing · Beckhoff
- EcoStruxure Machine Expert - Basic, free licence, for M221 controllers · Schneider Electric
- Free CLICK PLC programming software · AutomationDirect
- Mitsubishi Electric FA FAQ: X and Y device numbering on the MELSEC-F series · Mitsubishi Electric