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.

1From relays to the PLC

In the past, every machine was controlled by relay circuits, contactors and timers wired together. That circuit was the "program". To change something small (a 5-second delay, or one more condition) you had to unwire, rewire and add relays.

Relay panel (relay logic)
  • The program = the wiring itself
  • Every change = manual work and material
  • Every timer and auxiliary relay = a part in the panel that can fail
  • Troubleshooting with a multimeter, wire by wire
PLC
  • Buttons and sensors are wired to the inputs, contactors to the outputs, and that is it
  • All the logic is a program: change it from a laptop in minutes
  • Hundreds of timers, counters and auxiliary relays inside the program, without buying a single part
  • Watch the program while it runs (online) and find where the fault is
Example: a filling machine had 30 relays and 8 timers. After the PLC: the same buttons, sensors and contactors, but all the auxiliary relays and timers became lines in the program. The panel became smaller and easier to maintain.
Note: a PLC does not replace contactors, overloads or breakers. The contactor still carries the motor current; the PLC only switches its coil. And emergency stop (E-Stop) circuits must still disconnect through hard wiring or a safety relay, not through the normal program alone.

2The scan cycle

A PLC does not watch the buttons "all the time" like a wire does. It runs 3 steps in a row and repeats them forever. Each round is called a scan:

  1. Read inputs: it takes a snapshot of all terminals at once and stores it in the input image.
  2. Execute: it runs through the program from start to end and calculates the results.
  3. Write outputs: it sends the results to the output cards all at once.

A scan usually takes 1–20 milliseconds, depending on the program length. Try it yourself in slow motion:

The scan cycle in slow motion

Remember: the program works on the image taken at the start of the scan, and the outputs only change at the end. If a signal comes and goes in less than one scan, the PLC may never see it.

3Parts of a PLC

A PLC is either compact (everything in one box: CPU, inputs and outputs, like the small models) or modular (a rack where you mount the cards you need). Tap each card:

PLC rack

CardWhat connects to itSignal
DI digital inputButtons, limit switches, proximity sensors, photocells, overload contacts0 / 24V DC
DO digital outputContactor coils, relays, pilot lamps, solenoid valvesRelay or transistor
AI analog inputPressure / level / temperature / flow transmitters4–20mA or 0–10V
AO analog outputDrive (VFD) speed, control valves4–20mA or 0–10V

4Well-known brands

BrandExamplesProgramming software
SiemensS7-1200, S7-1500, LOGO!TIA Portal
Allen-Bradley (Rockwell)Micro800, CompactLogix, ControlLogixCCW, Studio 5000
SchneiderModicon M221, M241, M340EcoStruxure Machine Expert
MitsubishiFX5U, iQ-RGX Works
DeltaDVP, AS seriesISPSoft
OmronCP1E, NX1PCX-Programmer, Sysmac Studio

All of them support Ladder (LD), plus other languages of the IEC 61131-3 standard: FBD (blocks), ST (structured text) and SFC (steps). We focus on Ladder because it looks like the contactor circuits electricians already know.

About the simulator: the simulator you will use from lesson 3 is a generic trainer. The logic is the same in every brand; only the look and the addresses differ a little.

5Common faults on site

Common faults on site:
  • The PLC is in STOP after someone downloaded a program or after a fault: all outputs are off. Check the RUN/STOP LED before anything else.
  • The ERROR / SF LED is on: a card is not seated correctly, a card is missing compared with the configuration in the program, or there is a power fault.
  • The 24V supply has dropped: a short in one sensor wire pulls down the whole supply, so all inputs go off at once.
  • The memory battery is empty on older models: the program or the values are lost when the power goes off. Always keep a copy of the program.

?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.