PLC · Lesson 1 of 10

What is a PLC?

A PLC (Programmable Logic Controller) is a small, rugged computer for factories: it handles heat, dust and electrical noise, reads buttons and sensors, and runs motors and valves according to a program you write. Here you will see why factories left relay circuits behind, and how a PLC "thinks" in a cycle called the scan.

▶ The lesson in 5 minutes

Illustrated explanation, the simulator task solved, and the quiz answered. Made for the phone.

1Why did the PLC replace relays?

In an old relay panel the program is the wiring itself: any change to how the machine works means rewiring. In a PLC the program is written on a laptop, so a change takes minutes.

A machine that needed 30 relays and 8 timers now has them all as lines in the program.

The PLC doesn't replace contactors or overloads. And the emergency stop must cut by wiring or a safety relay, not by the program.

2How does a PLC work?

The PLC runs in a loop called the scan cycle, three steps that repeat: it reads all inputs, runs the program, then writes the outputs. Then it starts again. The whole cycle takes 1 to 20 ms.

Try it yourself in slow motion:

The scan cycle in slow motion

If a signal is shorter than one scan, the PLC may never see it.

3What is a PLC made of?

There are two shapes. A compact PLC is all in one box. A modular PLC is a rack where you add the cards you need. Tap each card to see what it does:

PLC rack

There are four card types. DI is a digital input for buttons and sensors (0 or 24V DC). DO is a digital output for contactors and lamps, relay or transistor type. AI is an analog input for transmitters (4–20mA or 0–10V). And AO is an analog output for VFD speed or a valve opening.

4Which brands are well known?

Siemens: S7-1200 and S7-1500 with TIA Portal. Allen-Bradley: Micro800 and CompactLogix with Studio 5000. Schneider: M221 and M241 with Machine Expert.

Mitsubishi: FX5U with GX Works. Delta: DVP and AS with ISPSoft. And Omron: CP1E and NX1P with Sysmac.

All of them support Ladder (plus FBD, ST and SFC). We focus on Ladder.

About the simulator: a generic trainer: the logic is the same, the look differs a little.

5Faults you meet on site

All outputs off: the PLC is in STOP, check the RUN/STOP switch. ERROR or SF lit: a card is missing or loose, or there is a power problem.

All inputs went off at once: the 24V dropped because of a shorted sensor. And the program is lost: the memory battery died, so always keep a backup.

?Lesson questions

Answer at least 5 of 6 correctly to mark the lesson done.

The numbers (scan time, number of cards) are typical examples and vary by model. The simulator here is a generic trainer with IEC / Siemens style addresses: the exact addresses and instructions differ from one brand to another, and the manual of your PLC is the reference. Your progress is saved on this device only.
© 2026 LearnElectricals. All rights reserved. This site is not affiliated with any of the companies mentioned (such as Siemens, Allen-Bradley, Delta, Schneider and others); names and trademarks belong to their owners and are used only to explain the devices.