Programmable Logic Controller (PLC): Definition and Working

Programmable Logic Controller (PLC): Definition and Working

Verified Sources
Nov 4, 2026

A PLC (Programmable Logic Controller) is a rugged, real-time control system computer designed for factory environments. PLCs repeatedly read inputs (e.g., pushbuttons, limit switches, sensors), execute a stored control program, and then drive outputs (e.g., motors, valves, lamps).

In practice, PLCs are built to tolerate noise, vibration, wide temperature ranges, and intermittent wiring faults typical of industrial sites, while providing deterministic scan-based behavior. The core idea is the repeating scan cycle: input sampling → program execution → output update. This scan approach is widely documented in industrial automation references.

Key concepts you’ll use while learning PLC working:

  • Input image: the PLC stores input states at the start of each scan.
  • Output image: outputs are determined in the program and written at the end of the scan.
  • Scan cycle: ensures consistent timing within the PLC.
  • I/O modules: separate real-world signals from CPU logic.
  • Real-time execution: scan times are managed so control stays responsive.

Note: Exact implementation details vary by PLC vendor/model, but the fundamental working principles (I/O modules + CPU execution + scan cycle) remain consistent.

PLC basics: What is a PLC and how does it work?

Major PLC components and their roles

A typical PLC system is partitioned into a few functional blocks: CPU, power supply, I/O modules, memory, and communication interfaces.

Component-level responsibilities

  1. Power supply: powers CPU, I/O modules, and (often) sensor excitation (for some module types).
  2. CPU: runs the user program, manages the scan timing, and updates input/output images.
  3. Input modules: condition signals (voltage/current), isolate them for safety/noise immunity, and present logic states to the CPU.
  4. Output modules: convert CPU output decisions into field-ready signals (switching transistors/relays, analog outputs, PWM, etc.).
  5. Programming & communication: programming software downloads logic (ladder/ST/FBD/etc.) and diagnostics; communications enable monitoring and integration.

A minimal conceptual architecture looks like this:

PLC Working Over One Scan (Micro-Sequence)

Read field inputs

1. Input sampling

The PLC input modules capture sensor/switch states and write them into an input image in memory."

Execute control logic

2. Program execution

The CPU executes the user program (e.g., ladder logic/structured text), using the input image and internal variables."

Compute desired outputs

3. Output decision

Logic produces new output states (output image) and may update timers/counters."

Write outputs to modules

4. Output update

The CPU transfers output image states to output modules, which energize/de-energize actuators."

Working of a PLC (Scan Cycle + Control Execution)

  1. 1
    Step 1

    The PLC begins a new scan cycle and prepares to capture a consistent snapshot of inputs.

  2. 2
    Step 2

    Input modules sense the physical signals and store the results into the PLC’s input image in memory.

  3. 3
    Step 3

    The CPU runs the user logic, typically referencing the input image, internal memory bits, registers, timers, and counters.

  4. 4
    Step 4

    Timers/counters and other internal variables progress based on logic results for the scan.

  5. 5
    Step 5

    The executed logic sets output variables in the output image (the CPU decides what outputs should be this scan).

  6. 6
    Step 6

    The CPU sends output-image states to the output modules, which drive real actuators.

  7. 7
    Step 7

    The PLC repeats the process continuously, producing a stable, predictable control response at a rate governed by scan time.

How PLC logic is represented and executed

PLC programs are commonly written in standardized IEC 61131-3 languages such as:

  • Ladder Diagram (LD)
  • Structured Text (ST)
  • Function Block Diagram (FBD)
  • Sequential Function Chart (SFC)

PLC execution typically follows the vendor’s organization of program blocks (e.g., tasks, OBs/cyclic programs), but at the heart remains: read inputs → compute outputs → update outputs—repeated continuously in scan cycles.

A closer look: why output changes at scan boundaries

Because outputs are decided based on input-image values captured earlier in the same scan, a PLC exhibits “scan latency”:

  • An input change made just after the input-image sampling will not be seen until the next scan.
  • Outputs computed from logic will be applied at the end of the current scan.

This is why PLC systems often provide deterministic timing: you can design logic knowing that each scan uses a consistent snapshot.

Pro Tip: Think in “images,” not direct wires

In most PLCs, your logic reads an input snapshot (input image) and writes into an output snapshot (output image). This makes behavior predictable and helps avoid race conditions.

Watch for scan time and blocking logic

If the program or communications handling increases the time of a scan beyond your control requirement, responsiveness can degrade. Avoid long blocking operations inside cyclic logic.

While the scan cycle explains the basic working, real systems add capabilities that affect behavior:

  • Timers and counters: implemented as instructions that advance once per scan (or per configured timing base).
  • Interlocks and safety logic: often implemented using additional logic blocks and specific execution patterns.
  • Watchdog/diagnostics: PLCs typically include mechanisms to detect faults or program anomalies and move to safe states.
  • Analog I/O and filtering: analog channels may involve scaling, sampling rate considerations, and optional filtering in software or modules.

Conceptual Timing Within One PLC Scan

Relative order of phases (not vendor-accurate microseconds).

Key learning checkpoints

PLC Working: Quick Self-Testing Deck

1 / 5
Question · Term

What does the PLC read first during each scan?

Click to reveal
Answer · Definition

The PLC reads field signals via input modules and stores them into the input image in memory.

Knowledge Check

Question 1 of 4
Q1Single choice

In a typical PLC scan cycle, what happens first?