PLC Basics
PLCs (Programmable Logic Controllers) are the workhorses of industrial automation. Learn what they do, how they're programmed, and how they differ from SCADA.
What is a PLC?
A PLC (Programmable Logic Controller) is a ruggedised industrial computer designed to control manufacturing processes, machinery, and equipment in real time. Unlike a desktop computer, a PLC is built for harsh industrial environments: vibration, temperature, dust, and electrical noise.
PLCs read inputs (from sensors and switches), execute the control program (ladder logic or structured text), and write outputs (to motors, valves, indicators). They do this cyclically, typically every 10 to 100 milliseconds, providing fast, deterministic control.
PLC vs SCADA
| Feature | PLC | SCADA |
|---|---|---|
| Role | Real-time control | Supervisory monitoring and data acquisition |
| Speed | Fast (10 to 100 ms cycle) | Slower (1 to 10 second polling) |
| Location | On the plant floor, near equipment | In a control room or server room |
| Programming | Ladder logic, structured text | Configuration, graphics, databases |
| Failure consequence | Process stops (fail-safe) | Visibility lost, but PLC keeps running |
| Redundancy | Optional (critical applications) | Often redundant (hot standby) |
PLC Components
- CPU: The processor that executes the control program. Contains memory for the program and data.
- Input modules: Interface to field devices. Digital inputs (on/off: switches, proximity sensors) and analog inputs (variable: temperature, pressure transmitters).
- Output modules: Interface to controlled devices. Digital outputs (on/off: motor starters, solenoid valves) and analog outputs (variable: control valve positioners, VFD speed references).
- Communication modules: Ethernet, serial, or fieldbus ports for communicating with other PLCs, SCADA, and instruments.
- Power supply: Converts mains voltage to the DC voltages used by the PLC internals.
- Rack or backplane: The physical framework that holds the modules and provides the data bus between them.
Programming
PLCs are most commonly programmed in ladder logic, a graphical language that resembles electrical relay circuit diagrams. Electricians and technicians find ladder logic intuitive because it looks like the wiring diagrams they already know.
Other programming languages defined by IEC 61131-3 include: structured text (high-level, text-based), function block diagram (graphical, function-based), sequential function chart (state machine), and instruction list (assembly-like). Most PLCs support multiple languages.
PLC fails safe
When a PLC loses power or detects a fault, it should fail in a safe state: outputs off, equipment stopped. This is a critical design principle. The control program should be written so that loss of the PLC does not create a dangerous condition. For example, a normally-closed solenoid valve de-energises to close, stopping flow when the PLC fails.
Tip: Keep a backup of every PLC program. When a PLC fails and is replaced, the program must be downloaded. Without a backup, you may have to reverse-engineer the control logic from scratch, which can take days. Store backups in multiple locations and verify they are current. PlantLogica can store PLC program files with asset records.