Popular plc programmingladder logicPLC tutorial for beginnersIEC 61131-3industrial automationPLC timers
Lesson 1 of 12

What is a PLC, and why did it replace relays?

In this lesson
  • What a PLC is and the job it does on a machine
  • Why relay panels gave way to PLCs in 1968–1970
  • How a PLC differs from an Arduino or a PC
  • The main PLC types and brands you will meet

Walk into any factory, water treatment plant, packaging line or modern building plant room and you will find a grey or blue box on a DIN rail, surrounded by neat rows of wires. That box is a programmable logic controller, a PLC. It is the brain that decides when a conveyor starts, when a pump stops, and what happens when a guard door opens.

This first lesson gives you the big picture. By the end you will know what a PLC does, why it exists, and where it fits next to the other controllers you may already know.

The job in one sentence

A PLC reads inputs, makes decisions, and drives outputs, over and over, many times a second.

  • Inputs tell the PLC what is happening: push buttons, limit switches, proximity sensors, level switches, temperature transmitters.
  • Decisions are made by the program you write: “if the start button is pressed and the guard is closed, run the motor”.
  • Outputs make things happen: contactors that start motors, solenoid valves, pilot lamps, horns, and speed references for drives.

Everything else in this course is detail on those three words.

Before PLCs: the relay panel

Until the late 1960s, machine logic was built from electromechanical relays. A relay is a coil that, when energised, pulls in a set of contacts. Wire contacts in series and you get AND logic; wire them in parallel and you get OR logic. Add timer relays and you can build sequences.

It worked, but it had real problems:

  • Changes meant rewiring. A new product on a line could mean days of an electrician pulling wires and updating drawings.
  • Panels were huge. A complex machine needed hundreds of relays and a wall of cabinets.
  • Contacts wear out. Moving parts burn, stick and fail, and finding the one bad relay took time.
  • Little diagnostics. You found faults with a meter and a drawing, one rung at a time.

1968: the specification that started it

In 1968 the Hydra-Matic transmission division of General Motors asked for an electronic replacement for relay logic. It had to survive the factory floor, be programmed by plant electricians rather than computer specialists, and be reusable when the production line changed. Bedford Associates answered with the Modicon 084 in 1969, and the PLC industry was born. Allen-Bradley, Siemens, Mitsubishi, Omron and others followed within a few years.

That origin explains two things you will notice throughout this course. First, the most common PLC language, ladder logic, deliberately looks like a relay wiring diagram, so electricians could read it on day one. Second, PLCs are built to be boringly reliable: they run for years, often decades, without a reboot.

Why it still matters: when you troubleshoot a machine, thinking “which contact is open on this rung?” is exactly how relay electricians worked in 1965. The tools changed; the logic did not.

PLC vs microcontroller vs PC

If you have used an Arduino or an ESP32, you already understand inputs, outputs and loops. So why pay more for a PLC?

PLCArduino / ESP32Industrial PC
Typical I/O voltage24 V DC, 120/230 V AC3.3 V / 5 VNeeds extra I/O hardware
Electrical noise immunityDesigned and tested for itNeeds careful designGood, with I/O add-ons
Operating temperatureOften 0–55 °C or widerHobby grade unless specifiedDepends on model
ProgrammingLadder, ST, FBD (IEC 61131-3)C/C++, MicroPythonAny language
Online changes and monitoringBuilt inRarePossible
Spare parts in 10 yearsUsually yesUncertainUncertain
Best forMachines and processes that must not stopPrototypes, IoT, learningData, vision, heavy maths

None of these is “better” in general. A PLC wins when a machine must run safely and predictably for years, be maintained by people who did not write the program, and survive vibration, dust, heat and electrical noise.

Types of PLC

  • Compact (“brick”) PLCs have the power supply, CPU and a fixed number of inputs and outputs in one housing. Examples: Mitsubishi FX series, Siemens S7-1200, Allen-Bradley Micro800, Delta DVP. Ideal for small machines and for learning.
  • Modular PLCs are built from separate modules on a rack or rail: power supply, CPU, then as many I/O and communication modules as the job needs. Examples: Siemens S7-1500, Allen-Bradley ControlLogix and CompactLogix.
  • Safety PLCs are certified for safety functions such as emergency stops and light curtains, with redundant processors and self-checking I/O.
  • Soft PLCs and PACs run PLC runtimes on PC-class hardware, such as CODESYS-based controllers or OpenPLC on a Raspberry Pi.

What you need for this course

Nothing except a browser. Every lesson includes the Ladder Lab, a small PLC simulator that runs right on the page. Try it now: press and hold START, release it, then press STOP.

Start / stop with seal-in RUN
Program listing (IL)
LD   X0
OR   Y0
ANI  X1
OUT  Y0

If you want to go further, free tools such as OpenPLC Editor or CODESYS let you write programs on your own computer, and most manufacturers offer trial versions of their software. You do not need any of them to finish this course.

How this course works

  1. Read each lesson in order. Each one builds on the last.
  2. Play with the simulator in the lesson until the behaviour makes sense to you.
  3. Answer the knowledge check at the end. Your score is saved in your browser.
  4. Press Mark as complete. When every lesson is done, you can claim your certificate of completion.

Frequently asked questions

Is a PLC a computer?

Yes. A PLC is a purpose-built industrial computer with a processor, memory and an operating system. What makes it different is rugged I/O, deterministic scanning and programming languages designed for control.

Do I need to know electronics to learn PLCs?

Basic electrical knowledge helps: voltage, current, switches and safe wiring. This course explains the electrical parts you need as you go.

Knowledge check

Check your understanding

3 questions. Your best score is saved on this device.

1What are the three things a PLC does over and over?
2Why did PLCs replace relay panels?
3Why does ladder logic look like a wiring diagram?