Home › Guides › Machine control
What Is a PLC and How Does It Control a Machine?

- Inputs → program → outputs
- Replaces relays and timers
- Ladder logic programming
- Price depends on I/O count
On this page
What Is a PLC in Electrical and Automation Work?
Before PLCs, machines were controlled by panels full of relays, timers and hand-wired logic. Changing the sequence meant rewiring. A PLC does the same job in software: the wiring only connects sensors and loads, and the sequence lives in a program that can be changed, copied and backed up. In manufacturing, "PLC" almost always means this controller; in business, PLC also means a public limited company, which is unrelated.
How a PLC Works: The Scan Cycle
- Read inputs: the PLC checks every input (is the tank full? is the start button pressed? what is the temperature?).
- Run the program: it works through the logic from top to bottom.
- Write outputs: it switches relays or transistors to start pumps, open valves or sound alarms.
- Repeat: the whole cycle runs many times a second, so the machine reacts almost instantly.
Parts of a PLC
| Part | What it does |
|---|---|
| CPU | Runs the program and timers |
| Digital inputs | On/off signals: buttons, float switches, limit switches |
| Analogue inputs | Measurements: temperature, pressure, level, flow (4–20 mA or 0–10 V) |
| Outputs | Relay or transistor outputs to contactors, valves, buzzers |
| Power supply | Usually 24 V DC from a panel supply |
| Communication | Programming port, screen (HMI), GSM or network modules |
Where PLCs Are Used in Kenyan Machines
- RO and water treatment plants: pump sequencing, backwash, tank levels, alarms.
- Water and milk vending machines: coin or M-Pesa credit, dispensing valves, flow counting.
- Pasteurisers and boilers: temperature holding, timers, safety interlocks.
- Filling and packaging lines: counting, sealing timers, conveyor control.
- Pump stations and boreholes: dry-run protection, remote control by GSM.
Controller and GSM parts with listed prices
| Product | Price |
|---|---|
| Arduino Uno R3 compatible board (ATmega328P) | KSh 2,800 |
| SIM800L GSM/GPRS module with antenna | KSh 2,100 |
Current listed prices incl. VAT (updated 24 November 2026).
How Is a PLC Programmed?
Industrial PLCs use the IEC 61131-3 languages, most often ladder logic, which looks like an electrical relay diagram, plus function blocks and structured text. The engineer writes the program on a laptop, downloads it to the PLC, tests each input and output, and saves a backup. The H-TECH PLC board from Herritech is programmed from a browser using the Controller Lab, with ready projects for water vending, pumps, tanks and GSM control.
PLC Price Factors in Kenya
- Number of inputs and outputs (I/O) the machine needs.
- Analogue inputs for temperature, pressure or level.
- A touch screen (HMI) for operators.
- Communication: GSM, WiFi, Ethernet or Modbus.
- Panel, power supply, wiring, contactors and programming time.
For water plants, see the ready RO / UF PLC control panels with touch HMI. For a full panel explanation read motor control panels and contactors.
Safety: control panels, contactors, motor circuits and anything on 240/415 V must be designed, wired and tested by a qualified electrician. Isolate and lock off power before opening a panel. This guide helps you plan and ask the right questions.
Mistakes to Avoid
- Buying a PLC before listing every input and output the machine needs.
- No program backup: one failed PLC can stop a factory for days.
- Mixing 24 V control wiring with mains cables in the same trunking.
- Skipping interlocks (for example letting a pump run with a closed valve).
- Leaving the panel unlocked and unlabelled.
Watch: RO purifiers and water ATMs
Frequently asked questions
What is a PLC in simple terms?
A rugged industrial computer that reads sensors and switches, runs a program, and controls pumps, valves and motors.
What is a PLC used for?
Automating machines and processes: water plants, pasteurisers, filling lines, vending machines and pump stations.
What language is used to program a PLC?
Mostly ladder logic, plus function block diagram and structured text (IEC 61131-3).
How much is a PLC in Kenya?
It depends on the number of inputs and outputs, screen and communication options; ask for a quotation with your machine’s I/O list.
Is a PLC better than relays?
Yes for anything beyond a simple start/stop: it is easier to change, diagnose and back up.


