PLC Scan Cycle
The PLC scan cycle is the repeating sequence in which a programmable controller reads its inputs, executes the user program, updates its outputs and performs housekeeping tasks such as communications and self-diagnostics.
In a typical cyclic execution model, the controller first copies the state of physical inputs into an input image table. It then executes the program using that consistent snapshot, writes results into an output image table and transfers them to the physical outputs. Communication servicing and self-diagnostics occupy part of each cycle, after which the sequence starts again. Many controllers also support periodic tasks at fixed intervals and event or interrupt tasks that run outside the main cycle.
Scan time, the duration of one cycle, determines how quickly a PLC can react to an input change. The worst-case response is generally longer than one scan, because an input that changes just after being read is only acted upon in the following cycle. For fast events such as high-speed counting or registration marks, engineers use dedicated high-speed inputs, interrupts or specialist modules rather than relying on the main scan.
Scan time depends on program size, instruction types, communication load and CPU performance, and it varies from cycle to cycle. A watchdog timer faults the controller if a cycle exceeds a configured maximum, protecting against endless loops. Pulses shorter than the scan time can be missed, so signal duration, input filter settings and module update times must be checked against the timing requirements of the application.
Key points
- Cycle: read inputs, execute program, write outputs, service communications
- Input and output image tables give the program a consistent snapshot
- Worst-case reaction time is generally longer than one scan
- A watchdog faults the CPU if a scan exceeds its configured limit
- Fast signals need high-speed inputs, interrupts or specialist modules
Where AiVibe comes in
AiVibe designs and manufactures the AiAmbA AI Factory, whose edge devices and AI agents let people talk to PLC, CNC and robot controllers in plain language. Agents only propose changes, a trained operator confirms each one, and the AI Factory never replaces a machine's control or safety systems.
Related terms
- Programmable Logic Controller (PLC)PLC & Industrial Control
- Discrete I/O (Digital Inputs and Outputs)PLC & Industrial Control
- IEC 61131-3PLC & Industrial Control
- Structured Text (ST)PLC & Industrial Control
- Remote I/O (Distributed I/O)PLC & Industrial Control