+1-800-724-4209
What Is a PLC? How Programmable Logic Controllers Work
A PLC (programmable logic controller) is a rugged industrial computer that controls machines and processes. It reads inputs such as sensors and pushbuttons, runs a program written by an engineer, and switches outputs such as motor starters, valves and lights. PLCs run conveyors, packaging lines, pumps, HVAC systems and almost every automated machine.
Where PLCs came from
Before PLCs, machine logic was built from panels of hard-wired relays and timers. Changing how a machine worked meant rewiring. In the late 1960s the auto industry asked for a programmable replacement, and the first PLCs, including the Modicon 084, followed. The ladder logic language many PLCs still use was designed to look like those relay wiring diagrams, so electricians could read it.
What is inside a PLC
| Part | What it does |
|---|---|
| CPU | Runs the program and stores data |
| Inputs | Digital inputs for switches and sensors; analog inputs for signals such as 4–20 mA or 0–10 V |
| Outputs | Relay or transistor outputs to switch devices; analog outputs to set speeds or positions |
| Power supply | Usually 24 V DC for the PLC and its I/O |
| Communication ports | Ethernet, serial or fieldbus to talk to HMIs, drives and other PLCs |
The scan cycle
A PLC repeats the same loop continuously, typically every few milliseconds:
- Read inputs: take a snapshot of every input.
- Execute the program: solve the logic from top to bottom using that snapshot.
- Update outputs: turn outputs on or off based on the result.
- Housekeeping: communications and self-diagnostics.
This predictable, repeatable cycle is what makes PLCs reliable for real-time control.
How PLCs are programmed
The IEC 61131-3 standard defines the common PLC languages:
- Ladder diagram (LD): graphical, relay-style logic. The most widely used in North America. See ladder logic basics.
- Function block diagram (FBD): blocks wired together; common in process control.
- Structured text (ST): a text language similar to Pascal, good for math and data handling.
- Sequential function chart (SFC): steps and transitions for sequences.
Each brand has its own software. Unitronics' VisiLogic and UniLogic are free downloads.
Types of PLC
- Compact (brick): CPU, power and a fixed amount of I/O in one unit. Low cost for small machines.
- Modular: CPU and separate I/O modules on a rail or rack, scaled to the job. Remote I/O such as Allen-Bradley POINT I/O puts modules out near the machine over a network.
- All-in-one PLC + HMI: controller and operator touchscreen in one unit, such as Unitronics Vision, Samba and UniStream. Screenless controllers like the UniStream USC-B5-TR22 are also available. See PLC vs. HMI.
PLC vs. a regular computer
A PLC is built for electrical noise, vibration, dust and temperature extremes, runs a deterministic scan, starts in seconds, and keeps running for years without updates. A PC is more flexible for data and graphics but is not designed for direct, real-time machine control.
How to choose a PLC
- Count the I/O: digital and analog inputs and outputs, plus spares.
- List the devices it must talk to: HMI, drives, other PLCs, and the protocols they use.
- Decide whether you need a built-in operator screen.
- Consider what your team already knows and what spares the plant stocks.
Frequently asked questions
Do PLCs need a computer to run?
No. You need a PC only to write and download the program.
Is learning PLC programming hard?
Ladder logic is approachable for anyone who reads electrical diagrams, and free software makes it easy to practice.
Get the right PLC
Read our Unitronics comparison, browse Unitronics PLCs, call 1-800-724-4209, or request a quote with your I/O count.