What a PLC is, for people arriving from software
An industrial computer with an unusual execution model, and the constraints that explain every design decision in it.
Short answer
A programmable logic controller is an industrial computer that runs one program in an endless loop, reading inputs and writing outputs on a fixed cycle, with no operating system scheduling in the way. It is built for determinism and for twenty years of uninterrupted operation, which explains almost every difference from a general-purpose computer.
If you arrive from software, the strange part is not the languages. It is the execution model.
One program, forever
There is no process list. One program runs, in a loop, from the moment the controller is switched to RUN until it is switched out. Read inputs, solve, write outputs, repeat.
No scheduler decides when it runs. Nothing preempts it. The loop is the whole system.
Why determinism is the point
A general-purpose computer optimises for average throughput. A controller optimises for predictable worst case, because a machine that is usually fast enough is a machine that occasionally is not, and occasionally is where the injuries are.
Twenty years, not three
A controller specified today may still be running in 2046. That shapes everything: available spares, backward compatibility, conservative firmware, and a strong preference for boring technology.
This is also why the industry moves slowly, which looks like inertia from outside and is mostly a rational response to the cost of being wrong.
What surprises software engineers most
There are no threads, memory is often statically allocated, recursion is frequently prohibited, and dynamic allocation is avoided entirely. All of these are deliberate: each one removes a source of non-determinism.
Common questions
- What makes a PLC different from a normal computer?
- Determinism and lifespan. A PLC runs one program on a fixed cycle with no operating system deciding when it gets CPU time, so the timing is predictable. It is also built to run for decades in heat, vibration and electrical noise, with I/O rated for industrial voltages.
- Do PLCs have an operating system?
- They have firmware that manages the scan cycle, I/O and communications, but not a general-purpose operating system with a scheduler competing for CPU. That absence is the point: nothing preempts the control program, so its timing can be relied on.
Keep reading
- Safety
SIL or PL: which one does your machine need?
Two standards, two scales, and one machine. Which one applies, how they map to each other, and why the answer is usually ISO 13849.
- Safety
Categories B, 1, 2, 3 and 4, in plain terms
Five architectures, what a single fault does to each, and the practical wiring that goes with them.
- Safety
Safety relay or safety PLC: how to decide
One is a wiring decision, the other is a programming one. The count of safety functions, not the size of the machine, is what settles it.