Factory Automation Hub
PLCs & Controllers

Explainer: Scan Cycle vs Processing Time in PLCs

Published 7 min read

A close view of an industrial control panel housing a programmable logic controller.
Quick answer

A PLC executes input reading, program logic, and output writing in a fixed scan cycle. Processing time is the portion of that cycle used by your code. Shorter cycles improve responsiveness, while longer cycles can cause lag. Buyers must measure actual execution time, not just rated specs, to ensure the controller meets machine requirements.

Key takeaways
  • A PLC scan cycle includes input reading, program execution, and output writing.
  • Processing time is the actual duration the CPU spends running your specific code.
  • Scan time directly affects how quickly a machine reacts to sensor inputs or operator commands.
  • Buyers should request or verify measured execution times for similar programs, not just general CPU speed ratings.
  • Redundant or high-availability PLCs add timing considerations that must be checked during design.

What a PLC scan cycle actually includes

A PLC does not execute a single line of code and stop. It runs a continuous loop called the scan cycle. This loop repeats many times per second. Inside each cycle, the controller performs three main tasks. It reads input signals, executes the program logic, and writes output signals.

The input stage pulls data from discrete inputs, analog inputs, and communication ports. The program stage runs your ladder logic, function blocks, or structured text. The output stage sends the results to relays, digital outputs, or field devices. The entire sequence must complete before the next cycle begins.

This loop is where the PLC scan time concept enters the conversation. The scan time is the total duration of one complete cycle. If a machine requires a quick response to a sensor, the scan time sets the maximum delay between the physical event and the controller reaction.

Many buyers focus on the rated CPU speed or the number of instructions per second. Those numbers help, but they do not tell the full story. The actual execution time depends on program size, communication load, and I/O configuration. A large program can run slowly even on a fast CPU if it contains many heavy instructions or extensive I/O handling.

How processing time differs from scan time

Processing time is the portion of the scan cycle consumed by executing the user program. It is not the same as scan time. Scan time includes fixed controller tasks such as I/O polling, communication cycles, and internal housekeeping. Processing time is the variable part that changes with your code.

A simple program may use only a small fraction of the available cycle. A complex program with many loops, communication handshakes, and data structures can consume most of it. The remaining time in the cycle is available for the next pass.

This distinction matters when comparing controllers. Two PLCs may have similar instruction execution speeds. One may have a faster I/O interface or a more efficient communication stack. The one with the better internal handling may deliver a shorter total scan time for the same program.

In practice, processing time is what you can influence through code design. You can reduce it by simplifying logic, avoiding unnecessary data movement, and separating fast tasks from slower ones. Scan time is what you observe in the final running system.

How timing affects machine responsiveness

Machine responsiveness is often measured by the delay between a trigger and the action. A press stop button, a conveyor start signal, or a safety relay output all depend on how quickly the PLC reacts. The scan cycle adds a predictable delay to that reaction.

If a sensor closes a contact, the PLC must detect that change in the next input read. It must then run enough logic to change an output. The output must then be written to the field device. Each of these steps adds delay. The total delay is not just the processing time. It includes I/O scan and communication overhead.

For high-speed machines, this delay can become a problem. A packaging line that must reject a product in milliseconds may need a controller with a very short scan time. A slow batch process may tolerate a longer cycle without any visible effect. The tolerance depends on the process, not just the controller spec sheet.

Buyers should define the maximum acceptable delay for each function. A safety stop may require a different timing budget than a normal start command. A communication loop to a historian may not need to run in the same cycle as a safety function. Separating these tasks helps keep the critical path short.

What to look for during PLC selection

When selecting a PLC, timing is one of the first things to verify. The datasheet may list a maximum execution time for a basic program. It may also show typical cycle times for different I/O counts. These numbers are useful, but they are not a guarantee for your specific application.

Request a measured execution time for a program similar to yours. Many vendors can provide a benchmark or a sample project. If they cannot, ask for a reference design with a comparable function set. This gives you a real number to work with.

Check the I/O expansion capabilities. Adding analog modules, communication cards, or high-speed I/O can change the scan time. Some I/O types are polled more frequently than others. Communication modules may introduce additional delays depending on the protocol and network load.

Also consider the programming language and structure. Ladder logic is often intuitive for machine control. Structured text or function blocks can be more efficient for data-heavy tasks. The choice of language can affect processing time. A well-structured program in the right language can run faster than a poorly structured one in a different language.

A worked example in plain words

Imagine a small assembly station. A photo sensor detects a part on a conveyor. When the sensor sees the part, a pneumatic actuator must push the part into a tray. The actuator must move quickly enough to avoid jamming.

The PLC reads the sensor input during the input phase. If the sensor is new, the controller notes the change. The program then checks the condition. If the part is present and the tray is empty, the program sets an output bit. The output phase writes that bit to the relay or direct drive module. The actuator then moves.

The total delay from sensor detection to actuator motion includes the input read, the logic execution, and the output write. If the program is short and the I/O is simple, this delay can be very small. If the program contains many other tasks, or if communication to a higher-level system is running in the same cycle, the delay can grow.

This example shows why a short scan time matters. The machine does not need a fast CPU in the abstract. It needs a short cycle for the specific function. A controller with a 1 millisecond cycle may feel very responsive. A controller with a 10 millisecond cycle may be fine for a slow process but too slow for this station.

How to verify timing before purchase

Verification is not optional. It is part of the buying process. Ask the vendor for a test program or a reference design. Run it on the proposed controller. Measure the cycle time with the actual I/O configuration. Use the controller’s diagnostic screen or a monitoring tool to read the cycle time.

Check the timing under load. A program may run fast when the machine is idle. It may run slower when the network is busy or when multiple I/O modules are active. The worst-case cycle time is what matters for safety and critical functions.

Document the results. Include the program version, the I/O list, the communication setup, and the measured cycle time. This document becomes part of the project record. It helps future engineers understand why the controller was chosen. It also helps when the machine is modified or expanded.

If the measured cycle time is close to the requirement, ask for a margin. A 20 to 30 percent margin is a common practice. It gives room for future code changes, additional I/O, or communication growth. Without margin, a small addition later can push the cycle time over the limit.

Common timing mistakes buyers make

One common mistake is relying on the maximum instruction rate alone. A fast CPU can still have a slow scan if the I/O or communication is the bottleneck. The instruction rate is a measure of code execution speed. It does not capture the full cycle.

Another mistake is ignoring the impact of communication. A PLC connected to a historian, a SCADA system, or a cloud gateway may spend a significant portion of the cycle sending and receiving data. This can slow down the control loop. Separating communication tasks from the control loop is a standard design practice.

A third mistake is not testing the safety functions separately. A safety PLC may run a different program or a different cycle time than the normal control program. The timing requirements for safety may be different. The safety function must be verified on its own.

A fourth mistake is assuming that a larger controller is always better. A larger CPU can handle more code, but it may also have a longer I/O scan. A compact controller with a fast I/O interface may deliver a shorter cycle for a small machine. Match the controller to the function, not to the biggest box on the shelf.

Finally, some buyers forget to check the impact of redundancy. A redundant PLC pair may share the I/O or run separate programs. The timing behavior can differ from a single controller. The failover process may introduce a brief delay. The system design must account for that delay.

Frequently asked questions

What is the difference between scan time and processing time in a PLC?

Scan time is the total duration of one complete PLC cycle, including input, logic, and output. Processing time is the portion of that cycle used by your specific program code.

Does a faster CPU always mean a shorter PLC scan time?

No. CPU speed affects processing time, but scan time also includes I/O polling, communication, and internal tasks. A fast CPU with a slow I/O interface may still have a long scan time.

How do I know if a PLC is fast enough for my machine?

Define the maximum acceptable delay for each function. Then measure the actual cycle time with your program and I/O configuration. Compare the measured value to your requirement and include a margin for growth.

Can communication affect PLC scan time?

Yes. Communication with historians, SCADA systems, or cloud gateways can consume part of the scan cycle. Separating communication tasks from the control loop helps keep the critical path short.

Should I always choose the largest PLC available?

No. A larger controller may handle more code, but it may also have a longer I/O scan. A compact controller with a fast I/O interface may be better for a small machine. Match the controller to the function.