What is a Programmable Logic Controller? The Complete Guide to PLCs

Inside almost every modern automated factory, water treatment plant, packaging cell, and motor control centre (MCC) sits an industrial microprocessor quietly executing thousands of logic routines every second: the Programmable Logic Controller (PLC).

Before PLCs, industrial automation relied on massive arrays of electromechanical relays, mechanical timers, and cam sequencers. Reconfiguring a production line meant days of physically stripping and rewiring panels. Today, PLCs provide the deterministic speed, environmental ruggedness, and operational flexibility required to run modern machinery safely and reliably.

Whether you are an electrical apprentice, a panel builder assembling an automation suite, or an engineer transitioning into systems integration, this guide breaks down the core architecture, operational mechanics, programming standards, and panel wiring practices behind PLCs.

1. What is a PLC and Why Was It Invented?

A Programmable Logic Controller is a ruggedised, solid-state industrial computer designed to monitor inputs from field devices, make logical decisions based on a custom program stored in its memory, and output control signals to drive actuators, motors, and indicators.

┌─────────────────────────────────────────────────────────────────────────────┐
│                             THE PLC ADVANTAGE                               │
├──────────────────────────────────────┬──────────────────────────────────────┤
│ Hardwired Relay Logic (Legacy)       │ Solid-State PLC Architecture         │
├──────────────────────────────────────┼──────────────────────────────────────┤
│ Re-engineering required total rewiring│ Re-programming via software in minutes│
│ Bulky enclosures & heavy heat load   │ Compact DIN-rail or rack footprints  │
│ Mechanical contact wear & tear       │ Solid-state microprocessors & optos  │
│ Complex physical fault diagnosis     │ Live software diagnostics & alarms   │
└──────────────────────────────────────┴──────────────────────────────────────┘

Invented in the late 1960s by Richard Morley (often termed the father of the Modicon 084), PLCs were originally created for the automotive manufacturing industry to eliminate the immense financial and time costs associated with rewiring hardwired relay banks during annual vehicle model changeovers.

Unlike consumer desktop computers or single-board microcontrollers, PLCs are built to withstand severe environmental stress:

  • Temperature & Humidity: Reliable operation within typical control enclosure ranges of 0°C to 60°C.
  • Electrical Noise (EMI/RFI): High immunity against electromagnetic interference generated by adjacent contactors, busbars, and variable speed drives (VFDs).
  • Vibration & Shock: Mechanical resilience against plant machinery vibrations.
  • Deterministic Execution: Real-time processing where tasks are completed within strictly repeatable, predictable microsecond intervals.

2. Core Hardware Architecture

A standard PLC system consists of five primary hardware building blocks:

                      ┌────────────────────────────┐
                      │    POWER SUPPLY (PSU)      │
                      │   (230V AC -> 24V DC)      │
                      └─────────────┬──────────────┘
                                    │
                                    ▼
┌──────────────────┐      ┌────────────────────┐      ┌──────────────────┐
│  FIELD INPUTS    │ ───► │  CPU & MEMORY      │ ───► │  FIELD OUTPUTS   │
│  Sensors/Buttons │      │  (Logic Execution) │      │  Valves/Starters │
└──────────────────┘      └─────────┬──────────┘      └──────────────────┘
                                    │
                                    ▼
                      ┌────────────────────────────┐
                      │   COMMUNICATION MODULES    │
                      │  (Profinet, Modbus, IP)    │
                      └────────────────────────────┘

1. Central Processing Unit (CPU) & Memory

The CPU is the brain of the controller. It executes the user logic stored in non-volatile memory (ROM/Flash), tracks system timers, processes mathematics, and manages volatile memory (RAM) where input states, internal bit markers, and variable registers are maintained during runtime.

2. Power Supply Unit (PSU)

Industrial PLCs operate primarily on a clean 24V DC auxiliary control rail, stepped down and regulated from incoming single-phase 230V AC supplies. High-reliability switch-mode power supplies (SMPS) are standard to protect delicate microelectronics from line surges.

3. Input Modules (Signal Conditioning)

Input cards translate raw field signals into low-voltage digital bits the CPU can process:

  • Digital Inputs (DI): Binary signals (24V DC or 110/230V AC) representing open/closed states from emergency stop pushbuttons, limit switches, and inductive proximity sensors.
  • Analogue Inputs (AI): Continuous variable signals scaled via internal Analogue-to-Digital Converters (ADCs)—typically standard industrial loops of 4–20 mA, 0–10V DC, or direct temperature probes (PT100 RTDs, thermocouples).

4. Output Modules (Actuation & Driving)

Output interfaces convert CPU commands into physical actions:

  • Transistor (Solid-State) Outputs: High-speed switching (ideal for pulse-width modulation, stepper controls, or cycling fast pneumatic solenoids) with no mechanical wear.
  • Relay Outputs: Dry contacts capable of switching higher current loads (e.g., up to 2A at 230V AC) or interfacing between different control potentials.
  • Analogue Outputs (AO): Digital-to-Analogue Converters (DACs) delivering 0–10V or 4–20 mA reference signals to control motor speed on VFDs or modulate flow control valves.

5. Communication Ports & Fieldbuses

Modern PLCs integrate standard industrial communications ports—most commonly RJ45 Ethernet ports running deterministic protocols such as PROFINET, EtherNet/IP, Modbus TCP, or legacy serial fieldbuses like PROFIBUS and Modbus RTU. These link the controller with HMIs, supervisory systems (SCADA), remote I/O islands, and smart motor drives.

3. How a PLC Operates: The Scan Cycle

Rather than executing continuous event interrupts like a desktop OS, a PLC runs a continuous, deterministic loop known as the Scan Cycle, typically repeating every 1 to 20 milliseconds:

┌─────────────────────────────────────────────────────────────────────────────┐
│                          THE PLC SCAN CYCLE LOOP                            │
├─────────────────────────────────────────────────────────────────────────────┤
│ 1. Read Inputs       ──► Sample physical I/O terminals into Process Image.  │
│ 2. Execute Program   ──► Process logic rungs sequentially from top to bottom.│
│ 3. Update Outputs    ──► Write output table states to physical terminals.   │
│ 4. Housekeeping/Comms──► Run diagnostics, handle comms, update watchdog.   │
└─────────────────────────────────────────────────────────────────────────────┘
  1. Input Scan: The CPU checks the physical status of every input channel and maps the states into the internal input memory table (Process Image Inputs).
  2. Program Execution: The controller processes the user program line-by-line, rung-by-rung, updating internal memories and staging output states in the Process Image Outputs.
  3. Output Scan: The calculated output states are written simultaneously to the physical output card transistors or relays.
  4. Housekeeping & Diagnostics: The CPU conducts internal self-checks, processes communication packets to HMIs, and clears the hardware watchdog timer before restarting the cycle.

4. Programming Standards: IEC 61131-3

Programming is standardized globally under IEC 61131-3, which defines five programming languages:

LanguageTypeBest Used For
Ladder Diagram (LD)GraphicalRelay replacement, discrete machine logic, interlocks.
Function Block Diagram (FBD)GraphicalProcess control loops, safety logic, mathematical blocks.
Structured Text (ST)Text-based (Pascal-like)Complex math, data arrays, string handling, recipes.
Instruction List (IL)Text-based (Assembly-like)Legacy systems (deprecated in modern standards).
Sequential Function Chart (SFC)Graphical (State-machine)Batch processing, sequential multi-stage automation steps.

5. Wiring and Panel Integration Best Practices

Building an industrial enclosure housing a PLC requires strict adherence to BS EN 60204-1 (Safety of Machinery – Electrical Equipment of Machines):

  • Conductor Colour Conventions: Maintain strict segregation. Use Dark Blue flexible tri-rated cable for 24V DC control lines and White/Blue for 0V reference lines. Ensure 230V/400V AC power circuits (Black) are physically routed in separate slotted trunking away from sensitive analogue signals.
  • Ferrule Terminations: Always terminate stranded Class 5 conductors with properly crimped bootlace ferrules. Loose copper whiskers can bridge adjacent terminals on high-density PLC cards, leading to component failure or intermittent field faults.
  • Screening & Grounding: Analogue signal cables must use shielded twisted pairs. Terminate cable shields directly to dedicated chassis earth bars via high-surface-area EMC spring clamps—never twist a screen into a long “pigtail” wire, which acts as an antenna for high-frequency electrical noise.

Frequently Asked Questions (FAQ)

What is the difference between a PLC and a microcontroller (like Arduino)?

While both run on microprocessors, an Arduino or Raspberry Pi is bare electronics requiring external power conditioning, protection, and noise suppression. A PLC is a complete, industrial-grade appliance packaged with surge protection, optocoupled isolation, short-circuit protection, standardized DIN-rail mounting, and compliance certifications (CE/UKCA/UL) designed to operate continuously for decades in hostile factory environments.

Can a PLC replace dedicated safety relays?

Standard PLCs cannot replace safety relays because their standard firmware and hardware are not fault-tolerant. However, dedicated Safety PLCs (yellow-cased controllers certified up to SIL 3 / PL e under ISO 13849-1) use redundant multi-channel processors and internal self-testing hardware to handle Emergency Stops, light curtains, and safety interlocks directly.

What is the difference between a Compact PLC and a Modular PLC?

A Compact (Fixed) PLC has the CPU, power supply, and a fixed number of I/O points built into a single brick housing—cost-effective for small machines. A Modular PLC uses a chassis or DIN-rail backplane where engineers can mix and match custom modules, adding hundreds or thousands of digital, analogue, and communication channels as needed.

What is remote I/O?

Instead of running hundreds of individual sensor cables across a factory floor back to the main control panel, engineers install Remote I/O racks near the field devices. These local junction blocks collect field wiring and transmit all signal states back to the master PLC over a single industrial Ethernet cable (such as PROFINET or EtherNet/IP).

Sourcing Wiring and Components for Your Next Panel Build

Whether building custom automation suites, serial machine control cabinets, or process control distribution boards, using high-specification wiring and terminal accessories is critical for long-term system integrity.

Explore our full inventory of BS 6231 Tri-Rated panel wire, German/French standard bootlace ferrules, and professional crimping tools with fast UK delivery at Panelwire.co.uk.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top