INDUSTRIAL AUTOMATION • DEEP LEARNING

PLC Controller — How It Works, Scan Cycle, I/O & Wiring

Deep visual guide to programmable logic controllers: CPU, scan cycle, digital and analog I/O, addressing, memory, relay interfaces, troubleshooting and safe design boundaries.

PLC scan cycle — one loop repeats continuously
1
Read Inputs
2
Execute Logic
3
Update Outputs
4
Diagnostics / Comms
5
Repeat Scan
Typical scan is milliseconds; exact time depends on PLC, program and communications.
PLC I/O wiring concept — field signals to controller to loads
FIELD INPUTSPush button / limit switchProximity / level switch4–20 mA transmitterVFD run/fault feedbackPLC CPU + I/ODI • DO • AI • AOLogic • timers • countersScaling • interlocksDiagnostics • communicationsFIELD OUTPUTSInterposing relayContactor / solenoidLamp / hornVFD RUN / speed reference

What is a PLC?

A programmable logic controller is an industrial computer designed to read field inputs, execute deterministic control logic and command outputs. It replaces large relay-logic panels for many control tasks while adding timers, counters, analog processing, diagnostics and communication.

The scan cycle in detail

StageWhat happensWhat the programmer sees
Input updatePhysical input states are copied to an input image/table.Logic reads a consistent snapshot for that scan.
Program executionRungs/functions execute in program order.Internal bits, timers, counters and output image change.
Output updateOutput image is transferred to physical outputs.Relays, lamps or commands change state.
HousekeepingDiagnostics, communications and OS tasks run.Scan-time and fault status update.

Digital vs analog I/O

DI — Digital Input

Two-state signal such as ON/OFF, healthy/tripped, open/closed.

24 VDCPNP/NPN check

DO — Digital Output

Commands a relay, lamp, solenoid or drive input. Check transistor/relay/triac type and current rating.

AI/AO — Analog

Continuous values such as 4–20 mA pressure or analog speed reference.

Typical addressing

I0.0 START push button I0.1 STOP / permissive I0.2 Motor overload healthy Q0.0 Contactor relay AI0 Pressure transmitter AO0 VFD speed reference

How a PLC controls a motor

START PB→DI I0.0→ladder logic→DO Q0.0→interposing relay→contactor coil

What you should understand first

A PLC separates sensing, decision logic and actuation. The key mental model is that field inputs become data, the program evaluates that data, and outputs become commands.

Signal and energy boundaries

A PLC is a controller, not the power source for a motor. Separate the low-energy logic side from the field power circuit. Digital outputs often command an interposing relay, contactor coil, valve solenoid or VFD input. The motor power still passes through the MCC/MCCB/contactor/VFD power circuit.

Fail-safe thinking

For critical shutdowns, do not rely only on software logic. Emergency-stop, trip and safety functions may require dedicated safety-rated hardware and a risk assessment. A normal PLC output should not be assumed to provide a safety function unless the architecture is specifically designed and certified for it.

Common mistakes

  • Treating a PLC output as if it can directly power any contactor or solenoid
  • Ignoring common/0 V references and PNP/NPN input type
  • Using software only for an emergency-stop function without a safety assessment
  • Forgetting output-state behavior during CPU fault or power loss
  • No spare I/O or terminal allowance

Commissioning checklist

  1. Verify controller supply voltage and earthing.
  2. Check every field device voltage/current and signal type.
  3. Create an I/O list before writing logic.
  4. Force/test one point at a time during commissioning under controlled conditions.
  5. Verify trip/fail-safe behavior by simulation and documented tests.

Frequently asked questions

Does a PLC continuously read inputs?

It repeats a scan cycle. Exact input/output update behavior depends on the controller and task structure.

Can a PLC output drive a contactor directly?

Sometimes electrically possible for a small coil, but an interposing relay is often used for isolation, serviceability and output protection. Check ratings and suppression requirements.

What happens when the PLC loses power?

Outputs typically de-energize, but exact behavior and retained memory depend on hardware/configuration. Design the process to reach a defined safe state.

Safety / engineering note: These diagrams are conceptual training material. Do not wire mains, safety circuits or field equipment from a generic web diagram. Use the exact PLC manual, device datasheets, applicable standards, isolation practices, risk assessment and a qualified controls/electrical engineer for final design and commissioning.