Table of Contents
ToggleSome signals cannot wait for the main scan to come around again, and some loops need an exact, repeatable time base. Interrupt driven tasks give both, as long as you keep them short and plan their priorities carefully.
A normal PLC program runs in a loop, but some logic must respond instantly or at a fixed rate. Interrupt tasks and organisation blocks make that possible without slowing the rest of the program.

What Is a PLC Interrupt?
A PLC interrupt is a signal or timer that pauses the normal program and runs a separate block of logic immediately, then returns to where it stopped. It lets critical code run faster or more regularly than the main PLC scan cycle allows.
Siemens calls these blocks organisation blocks, or OBs, while Rockwell calls them tasks. The idea is the same in both families.

In Studio 5000 each task has a type, a priority and a watchdog time. The image shows an event task set to run when a chosen trigger occurs.
5 Essential Task Types
Runs again and again in the background.
Runs at a fixed time interval.
Runs when a trigger such as an input change occurs.
Siemens OB started by an input or counter.
Runs when an error is detected.
A fault routine is also a PLC interrupt of sorts, see PLC fault handling. The other types are the focus of this article.
Siemens Organisation Blocks
PLCblog explains that S7 CPUs support up to eight hardware interrupt OBs, numbered OB40 to OB47. Cyclic interrupt OBs run from OB30 to OB38, with default intervals from 5 s down to 10 ms.
A higher priority PLC interrupt always pauses a lower priority one. OB1, the main cycle, has the lowest priority, so any interrupt can pause it.
| Block | Purpose | Typical Use |
|---|---|---|
| OB1 | Main cyclic program | Machine sequences |
| OB30 to OB38 | Cyclic interrupt | PID and sampling |
| OB40 to OB47 | Hardware interrupt | Fast inputs |
| OB80 onwards | Error handling | Faults and diagnostics |
How a PLC Interrupt Runs
AutomationPrimer gives a simple example of a 50 ms main scan with a 10 ms periodic task. The periodic task runs five times during each main scan, stretching that scan a little each time.
If an interrupt runs too long, the watchdog may fault the CPU, as explained in PLC watchdog timer. Keep interrupt code short.
Rockwell Event and Periodic Tasks
In ControlLogix and CompactLogix controllers, a periodic task runs at a set rate and priority. An event task runs on triggers such as module input changes, motion events or an EVENT instruction.
Rockwell recommends limiting the number of tasks, since each PLC interrupt and task switch costs time. Newer platforms such as the ControlLogix 5590 handle more tasks but the rule still applies.
Good Interrupt Design Practices
Timers inside periodic tasks behave differently, see PLC timer instructions. Status bits for overlap counts are listed in PLC diagnostic status bits.
CPU Load Formula
Stretched scan = Continuous scan ÷ (1 minus Load)
Example:
Task A runs 2 ms every 10 ms, load 20 percent
Task B runs 5 ms every 50 ms, load 10 percent
Total load 30 percent, continuous logic needs 40 ms
Stretched scan = 40 ÷ 0.7 ≈ 57.1 ms
This is an average estimate that ignores task switching overhead. Check the real value in the controller diagnostics.
Task Load Calculator
Keep total PLC interrupt load well below 50 percent. Other ways to speed up programs are shared in how to increase PLC speed.
- Fast response to critical inputs.
- Exact timing for control loops.
- Less load than running everything often.
- Clear priority structure.
- Long interrupts stretch the main scan.
- Shared data can change mid logic.
- Harder to debug and trace.
- Too many tasks waste CPU time.
PLC interrupt support should be part of controller selection, see how to select the right PLC.
Rockwell Event Tasks White Paper
ControlLogix Tasks Video
PLC Interrupt FAQ
Related Articles
- How PLC Scan Cycle Works
- PLC Watchdog Timer Explained
- How to Increase PLC Speed
- PLC Diagnostic Status Bits
- PLC Programming Languages
External References
- Using Event Tasks With Logix5000 Controllers, Rockwell Automation
- Organization Blocks in Siemens PLC, PLCblog
- Interrupt, Wikipedia
What We Learn Today
- A PLC interrupt pauses the main scan to run urgent or timed logic.
- Periodic and event tasks each have priorities and watchdogs.
- Keep interrupt code short and total periodic load low.
