Open the cabinet of almost any machine and you will see the same arrangement: a power supply, the PLC, rows of terminal blocks, and wires running out to the field. In this lesson we open up the PLC itself.
1. Power supply
Most modern PLCs run from 24 V DC, supplied by a DIN-rail power supply that converts the mains (230 V AC in Kenya and most of the world, 120 V in North America). Some compact PLCs accept mains directly and even provide a small 24 V output for sensors. Check the datasheet: that sensor supply is often limited to a few hundred milliamps.
2. CPU
The CPU runs the operating system and your program. It also manages communication, keeps the clock, and watches itself: if the program takes too long or hardware fails, it stops the outputs safely and shows a fault light. The front of a CPU usually has a RUN/STOP switch and status LEDs (RUN, ERR, BAT) that are the first thing you check when a machine stops.
3. Memory
- Program memory holds the logic you write.
- Data memory holds the current state of every input, output, internal bit, timer and counter.
- Retentive memory keeps chosen values (for example a production count) through a power cut, using flash, a battery or a capacitor.
You will meet the names for these memory areas in lesson 5.
4. Inputs
An input module turns a field voltage into a 1 or a 0 the CPU can read. A digital (discrete) input sees only ON or OFF: a button, a limit switch, a proximity sensor. An analog input measures a range, such as 4–20 mA from a pressure transmitter. Each input has an LED on the module, which is your quickest troubleshooting tool: if the LED is off, the problem is in the wiring or the device, not the program.
Inputs are electrically isolated from the CPU with opto-couplers, so a spike on a field cable cannot reach the processor.
5. Outputs
Digital outputs come in two main kinds, and choosing the wrong one is a classic beginner mistake.
| Relay output | Transistor output | |
|---|---|---|
| Switches | AC or DC | DC only |
| Typical current | About 2 A per point | About 0.5 A per point |
| Switching speed | Slow (around 10 ms) | Fast (microseconds) |
| Life | Limited: contacts wear | Very long |
| Use for | Contactor coils, AC solenoids, mixed voltages | Pulse outputs to stepper and servo drives, frequent switching |
Analog outputs send a variable signal, typically 0–10 V or 4–20 mA, for example a speed reference to a variable frequency drive.
Never drive a motor directly from a PLC output. The output switches a contactor or relay coil, and the contactor switches the motor. PLC output points are rated for small loads only.
6. Communication
Every PLC has at least one port for the programming laptop (USB, Ethernet or serial). Most also talk to other devices: HMIs (touch screens), drives, remote I/O and SCADA systems, using networks such as Modbus, PROFINET, EtherNet/IP and CC-Link.
Reading a datasheet: the lines that matter
- Supply voltage: 24 V DC or mains?
- Number of inputs and outputs, and whether you can add expansion modules.
- Input type: sinking, sourcing or both (lesson 4 explains this).
- Output type: relay or transistor, and the current per point and per common.
- Program memory and instruction set: timers, counters, maths, PID.
- Communication ports built in.
- Software: what it costs and whether a free version exists.
Frequently asked questions
Can a relay output switch 230 V AC?
Usually yes, within the contact rating on the datasheet (often 250 V AC, 2 A). Always check the rating and the limit per common terminal, and use a contactor for motors.
What does the ERR light on a PLC mean?
The CPU has detected a fault, such as a program error, a watchdog timeout or a failed module. Connect with the programming software and read the diagnostic buffer or error code.
