How a PLC works
A PLC, or programmable logic controller, is an industrial computer built to control machines and processes reliably for years. It is wired to field devices: inputs such as push buttons, limit switches, proximity sensors and transmitters, and outputs such as contactors, solenoid valves, motor drives and indicator lamps. A program decides which outputs to switch based on the state of the inputs.
The PLC runs that program in a repeating scan cycle. First it reads every input and stores a snapshot in memory. Then it runs the program from top to bottom against that snapshot. Next it writes the results to the outputs. Finally it handles communications and self-diagnostics, then starts again. A full scan typically takes a few milliseconds to a few tens of milliseconds, depending on program size and the processor. Because each scan follows the same order, a PLC responds in a predictable time, which is what machine control needs.
The idea came from the US car industry. In 1968, General Motors’ Hydra-Matic division asked for a programmable replacement for the banks of relays that controlled its production lines, and Modicon delivered the first such controller, the 084, in 1969. Changing a process then meant editing a program rather than rewiring a cabinet.
The parts of a PLC
Whatever the size, a PLC has the same building blocks. On larger systems each one is a separate module on a backplane or a DIN rail; on small controllers they share one housing.
-
//
CPU. The processor and memory that hold and run the control program, store data and manage the scan cycle.
-
//
Digital I/O. On/off signals, most often at 24 V DC in a factory, with relay or transistor outputs to switch loads.
-
//
Analog I/O. Continuous signals such as 4–20 mA and 0–10 V from pressure, flow, level and temperature transmitters, and to valve positioners and drives.
-
//
Communications. Ethernet ports for industrial protocols such as PROFINET, EtherNet/IP and Modbus TCP, and often serial ports for RS-485 devices.
-
//
Power supply. Usually 24 V DC from the panel, with protected supplies feeding the I/O.
Types of PLC
PLCs range from palm-sized controllers for a single machine to rack systems with thousands of I/O points. They fall into four broad groups, and many sites use more than one.
| Type | I/O and expansion | Processing | Typical use |
|---|---|---|---|
| Compact (fixed) PLC | Built-in I/O, typically 10 to 100 points, with a few add-on modules | Modest; logic, timers, counters and simple loops | Single machines, pumps, gates, small skids |
| Modular (rack) PLC | CPU, power and I/O as separate modules; hundreds to thousands of points, including remote I/O | Higher; motion control, redundancy options, many networks | Production lines, process plants, utilities |
| Safety PLC | Dual-channel safety I/O for emergency stops, guards and light curtains | Redundant processors with self-checking | Machine and process safety functions rated to IEC 61508 SIL or ISO 13849 PL |
| Soft PLC on an industrial PC | Fieldbus or remote I/O over Ethernet, plus local I/O cards | PC-class CPU running a real-time control runtime alongside other software | Machines that also need vision, data logging, HMI or analytics on one computer |
Some vendors also sell programmable automation controllers (PACs), which sit between a modular PLC and an industrial PC, with more memory and networking than a classic PLC.
How PLCs are programmed
Most PLCs are programmed in one or more of the languages defined in IEC 61131-3, the international standard for PLC programming. Engineers write the program on a laptop in the vendor’s software, test it and download it to the controller.
-
//
Ladder Diagram (LD). Often called ladder logic: the graphical language drawn like a relay wiring diagram, with contacts and coils between two vertical power rails. It is the most widely taught, because electricians can read it.
-
//
Function block diagram (FBD). Logic built from connected blocks such as timers, counters and PID controllers. Common in process control.
-
//
Structured text (ST). A Pascal-like text language for maths, loops and data handling.
-
//
Sequential function chart (SFC). Steps and transitions for sequences such as batch recipes and machine cycles.
How ladder logic works
Ladder logic is still the most common way to program a PLC for discrete machine control in industrial automation, and it is the PLC language most maintenance electricians learn first. A ladder logic program is drawn as a stack of horizontal lines between two vertical rails. The left rail stands for power, each line reads like a small circuit, and when a path of true contacts reaches the coil at the right-hand end, the coil turns on.
The PLC solves the lines in order, left to right and top to bottom, once per scan, against the input snapshot taken at the start of the scan. The new coil states are written to the outputs at the end of the scan, which is why the order of the lines can matter.
The classic first example is a motor start and stop circuit. The start button is placed in parallel with a contact from the motor’s own output, and both sit in series with the stop button and an overload contact, driving the motor coil. Pressing start turns the coil on, and the parallel contact then keeps the line true after the button is released, a pattern called a seal-in or latch, until stop or an overload breaks the path.
Ladder logic is easy to read and to fault-find while the machine runs, because the programming software highlights which contacts are true in real time. It becomes unwieldy for maths, loops, text handling and data structures, so most projects mix languages: ladder logic for interlocks and sequences, and structured text or function blocks for calculations and PID loops. Soft PLC runtimes on industrial PCs offer the same IEC 61131-3 ladder diagram editors as hardware PLCs.
-
//
Normally open contact. True when its bit is on, such as a pressed start button or an active proximity sensor input.
-
//
Normally closed contact. True when its bit is off. Used for conditions such as “not faulted” or “guard not open”.
-
//
Coil. Sets an output or internal bit while the line is true. Set and reset coils hold their state until cleared.
-
//
Timers and counters. Function blocks placed on the line, such as the on-delay timer (TON) and up-counter (CTU) defined in IEC 61131-3.
-
//
Compare and maths blocks. Test or calculate values, for example to stop a pump when a 4–20 mA level reading passes a setpoint.
Industrial PC vs PLC
A PLC and an industrial PC both read inputs and drive outputs, but each suits a different job. A PLC is purpose-built for deterministic control: it boots in seconds, runs one program for years and is easy for maintenance staff to diagnose. An industrial PC brings more processing, storage and interfaces, so it suits data logging, machine vision, databases, HMI screens and AI models next to the machine.
| Aspect | PLC | Industrial PC |
|---|---|---|
| Main job | Deterministic control of one machine or process | Data, vision, HMI, databases and AI beside the machine |
| Software | Vendor firmware running one control program | Windows or Linux, with several applications or a soft PLC runtime |
| Timing | Fixed scan cycle, typically a few milliseconds | Depends on the operating system; real-time only with a real-time runtime |
| Programming | IEC 61131-3 languages in the vendor’s tool | Any language, plus IEC 61131-3 through a soft PLC |
| I/O | Plug-in digital and analog modules at 24 V DC | USB, Ethernet and serial ports, with I/O cards or remote I/O added |
| Start-up and upkeep | Boots in seconds; easy for maintenance staff to diagnose | Longer boot; needs operating system updates and IT security |
In practice the two usually work together. The PLC keeps control of the machine, and fanless industrial PCs or DIN rail PCs beside it collect its data over Modbus TCP, OPC UA or the vendor protocol, run the HMI or forward the data to SCADA. Where a project needs extra I/O on the PC itself, digital I/O modules add isolated inputs and relay outputs. Our guide to the differences between DIO and GPIO explains which suits field wiring.
Vendor choice often follows region. Siemens SIMATIC controllers are widely used in the USA and Europe, and Rockwell Automation’s Allen-Bradley range is common in North America, so integrators on both sides of the Atlantic usually support both families.
Quick answers on PLCs
PLCs: common questions
What does PLC stand for?
Programmable logic controller. In USA business usage PLC also means public limited company, so “PLC controller” is often used in engineering to make the meaning clear.
What is PLC programming?
Writing the control program a PLC runs. Engineers use the vendor’s software and the IEC 61131-3 languages to define how outputs respond to inputs, then test and download the program to the controller.
Is a PLC a computer?
Yes, a specialized one. It has a processor, memory and an operating system, but it is built to run one control program deterministically, with industrial I/O instead of a keyboard and screen.
What is the difference between a PLC and SCADA?
A PLC controls; SCADA supervises. The PLC runs the logic for one machine or process. SCADA gathers data from many PLCs, shows it to operators, raises alarms and logs history.
Can an industrial PC replace a PLC?
Sometimes. A soft PLC runtime on an industrial PC can control a machine, which suits projects that also need vision or data handling. Where certified safety functions or simple long-term maintenance matter most, a dedicated PLC is usually kept.
What is ladder logic?
A graphical PLC language drawn like relay wiring. Contacts and coils placed between two vertical rails describe the control logic. It is one of the IEC 61131-3 languages, where it is called Ladder Diagram, and the most widely taught.
We supply and integrate the industrial PCs, I/O and networking that sit alongside PLCs as standard, prepared with the operating system and drivers the control project needs.