MOULDLKnowledge BaseElectrical Knowledge Base3D Model DownloadsMembership
中文版Model Store »
Knowledge Base › Electrical Knowledge Base › How fast does a PLC scan cycle need to be, and how do you judge real-time performance?
HomeModels
Table of contents

On this page

PLC & Programming (100 articles)

Quick Reference

  • PLC & Programming
  • Electrical & Electronic Basics (monthly)(每月更新中)
  • Electrical Control & Drawings (monthly)(每月更新中)
  • Drives & Actuators (monthly)(每月更新中)
  • Sensors & Detection (monthly)(每月更新中)
  • Industrial Communication & Networks (monthly)(每月更新中)
  • HMI & Host Systems (monthly)(每月更新中)
  • Industrial Robots & Motion Control (monthly)(每月更新中)
  • Mechatronic System Integration (monthly)(每月更新中)
  • Fault Diagnosis & Standards (monthly)(每月更新中)

How fast does a PLC scan cycle need to be, and how do you judge real-time performance?

There is no single "fast enough" scan time; what is fast enough is set by the response time the machine allows. Real-time behaviour cannot be judged from the headline speed of the PLC either — it has to be estimated as the worst-case total: input filtering, one or several scans, and output delay. This article gives the estimation method and reference figures for several classes of machine.

1. What one scan cycle is made of

A scan can be roughly divided into four parts: the input refresh reads field states into the image area; program execution works through the instructions; the output refresh writes the image back to the modules; and system overhead plus communication takes what is left. The first two grow with point count and program size, the last two with network load. The current, minimum and maximum scan times shown online by the programming software are the sum of these parts.

2. What decides "fast enough"

Not the PLC — the machine. For pushbuttons and indicator lamps a few hundred milliseconds is imperceptible; plain interlocking and sequential actions are usually satisfied by a 10–20 ms scan; high-speed counting, cut-to-length flying shears and packaging register-marking, where motion must stay synchronised with position, often need 1–5 ms or faster and rely on high-speed inputs or interrupts to step outside the scan rhythm. The quantitative approach is to ask how much lag the machine tolerates and work back to the allowed scan time.

3. Real-time means worst-case response

A signal travelling from a change in the field to an output action passes through input filtering and debounce, a wait for the next input refresh, one or several scans, and the output refresh plus the mechanical operating time of a relay or valve. In the worst case the signal just misses the input refresh and waits a whole extra scan. Total response is therefore roughly the input filter time plus two scan periods plus the output delay, not simply one scan period.

4. Estimation formula and values

tresponse(max) ≈ tinput filter + 2 × Tscan + toutput delay

Input filter time is set by module parameters and runs from a few milliseconds up to about ten-odd milliseconds. Of the output delay, transistor outputs are near enough negligible while relay outputs include the mechanical pull-in time. Solenoid valves and cylinders are usually far slower than the PLC itself, so the scan period is not the only thing that matters.

5. Bringing the effective response time down

Four common measures: route urgent signals to hardware interrupts or high-speed inputs so they do not wait for the normal scan; trim the program and cut floating-point and string work to shorten the execution part; move signal acquisition into the field with remote or distributed I/O to shorten the bus and refresh path; and keep emergency stops that protect people out of the program by cutting the drive with a hardwired safety circuit. The first three shorten the scan; the fourth takes the fastest action out of the program altogether.

6. Scan period reference for different machines

Machine typeAllowed action lagCommon scan periodJudging basis
Pushbuttons and indicator lamps100 ms or more20–50 msHuman perception
Plain logic interlockingTens of milliseconds10–20 msLag the interlock allows
Sequential action and cylinder cyclesA few tens of milliseconds5–10 msCycle time and mechanical motion
High-speed counting and cut-to-lengthAround 1 ms1–5 ms or a high-speed moduleCounting rate and positioning accuracy
Flying shear and register synchronisationSub-millisecond to a few msInterrupt or motion controllerSynchronisation error allowed
Slow processes such as temperature and pressureSeconds100 ms–1 sSensor response time
Multi-axis position synchronisationMillisecondsSet by the motion controllerInterpolation period
Distributed remote I/OA few tens of millisecondsLimited by the bus refreshNetwork refresh time
Safety emergency stop signalMillisecondsHandled in hardware, not by the programSafety circuit requirement

7. Notes

The scan time of one and the same PLC is not a fixed number: it varies with program branches, communication load and online monitoring. Rather than compare headline instruction speeds between brands, estimate the execution part from your own program size, add the input/output refresh and the communication overhead, and verify it with an online measurement. The minimum scan time quoted in a manual is usually measured with a minimal program and an idle network and should not be taken as a field figure.

8. References

The performance and test requirements for programmable controllers follow GB/T 15969.2 and IEC 61131-2, which cover scanning, response time and operating conditions. Safety and protective earthing for electrical equipment of machines follow GB 5226.1 and IEC 60204-1, and drive-related response figures can be checked against the GB/T 12668 series. Filter times and output delays for a specific module are as stated in the manufacturer's technical data.

9. Points to watch

⚠️ Three common traps:
(1) Judging real-time behaviour from the average rather than the maximum scan time, so occasional long scans stay hidden and show up on site as intermittent loss of control;
(2) Counting only one scan period and ignoring input filtering and the two-scan worst case, which makes the estimate nearly twice as optimistic as reality;
(3) Handing the safety emergency stop to the program as well, so it depends on the controller working at all — which does not satisfy the safety requirement.

Assess real-time performance by measuring the maximum scan time online with the actual communication load and program size, and keep margin. Actions that carry a safety function must not depend on scan timing.

Related reading

Related 3D models: Ready to build it? Download free 3D models & CAD drawings at MOULDL »
MOULDL · Electrical Knowledge Base · free self-study reference for electrical & automation engineers, 3D CAD models at MOULDL