Big idea
A Programmable Logic Controller (PLC) is a specialized industrial computer designed to monitor inputs, execute control logic, and control outputs in real time. PLCs are the backbone of modern automation, providing reliable, deterministic control of machines, production lines, and infrastructure systems.
Unlike general-purpose computers, PLCs are engineered to operate continuously in electrically noisy, physically harsh environments while interacting directly with sensors and actuators.
What is a PLC?
A Programmable Logic Controller (PLC) is a dedicated digital controller that repeatedly performs a fixed control cycle known as the scan cycle:
- Read inputs
- Execute the control program
- Update outputs
This cycle runs continuously, often in the order of milliseconds, enabling precise control of physical systems.
Core components of a PLC
Central Processing Unit (CPU)
The CPU is the processing unit of the PLC. It executes the control program, performs logical and arithmetic operations, and manages communication with input and output modules.
The CPU operates deterministically, meaning:
- Instructions execute in a predictable order
- Timing behavior is repeatable and bounded
Determinism is essential for real-time control.
Input modules
Input modules allow the PLC to receive signals from the physical world.
Inputs may be:
- Digital inputs
Binary signals with two states (ON/OFF, 1/0)
Examples: push buttons, limit switches, proximity sensors - Analog inputs
Continuous signals representing a range of values
Examples: temperature sensors, pressure sensors, speed sensors
Analog input modules perform analog-to-digital conversion (ADC), converting continuous electrical signals into digital values that the PLC can process.
Output modules
Output modules allow the PLC to control external devices.
Outputs may be:
- Digital outputs
Switch devices fully ON or OFF
Examples: relays, indicator lamps, solenoids - Analog outputs
Produce a variable signal (voltage or current)
Examples: motor speed control, valve positioning
Analog output modules often perform digital-to-analog conversion (DAC), converting digital commands into continuous electrical signals.
Power supply
The power supply provides regulated electrical power to the PLC and its modules. It isolates sensitive control electronics from industrial power fluctuations and electrical noise.
Control logic and programming
Control program
A control program is the set of instructions stored in the PLC that defines how inputs are processed to determine outputs. The program implements the control algorithm.
Ladder logic
Ladder logic is the most common PLC programming language.
It is a graphical programming language that resembles electrical relay circuits:
- Vertical rails represent power
- Horizontal rungs represent logic paths
- Contacts represent input conditions
- Coils represent output actions
Ladder logic is designed to be readable by technicians with electrical backgrounds.
Other PLC programming languages
Modern PLCs may also support:
- Function Block Diagram (FBD) – block-based graphical logic
- Structured Text (ST) – high-level, Pascal-like language
- Instruction List (IL) – low-level mnemonic commands
These languages are standardized under IEC 61131-3, an international PLC programming standard.
The PLC scan cycle (critical concept)
The scan cycle is the repeating sequence of operations performed by the PLC:
- Input scan
All input values are read and stored in memory. - Program execution
The control logic is executed using the stored input values. - Output scan
Output values are updated simultaneously based on program results.
This ensures consistent behavior and prevents mid-cycle input changes from causing unpredictable results.
PLCs in control systems
PLCs are typically used in closed-loop control systems, where feedback is continuously used to adjust outputs.
Example:
- A temperature sensor provides feedback
- The PLC compares the measured temperature to a set-point
- The PLC adjusts a heater or cooling fan accordingly
PLCs may also implement open-loop control, such as timed operations without feedback.
PLCs vs general-purpose computers
| Feature | PLC | General-purpose computer |
|---|---|---|
| Purpose | Industrial control | General computation |
| Timing | Deterministic | Non-deterministic |
| Environment | Harsh, noisy | Office/home |
| I/O | Direct hardware interfaces | Indirect via peripherals |
| Reliability | Designed for 24/7 operation | Not guaranteed |
Why PLCs are still widely used
Despite advances in embedded systems and microcontrollers, PLCs remain dominant because they provide:
- High reliability
- Predictable timing
- Electrical isolation
- Simple maintenance
- Long service lifetimes (often decades)
These properties make PLCs ideal for safety-critical and industrial applications.