Glossary · PLC and control programming
Interrupt task
Also known as: Hardware interrupt, Interrupt OB
German: Interrupt-Task
In PLC programming, an interrupt task is a program part that the operating system starts immediately when a hardware or system event occurs, such as an input change, a time-of-day event or a diagnostic alarm, interrupting lower-priority program execution.
- PLC programming
In one sentence
An interrupt task runs immediately when a hardware or system event occurs, interrupting the lower-priority PLC program.
Example
When a high-speed input detects a product edge, a hardware interrupt starts a short routine that captures the conveyor encoder position.
How it applies
- Engineering: Interrupts give fast reactions to events that cannot wait for the next cycle, such as position capture, time-stamped events or module diagnostics. In Siemens controllers, interrupts are handled by dedicated organization blocks; other environments configure event-triggered tasks with high priority.
- Design rules: Interrupt routines should be short. Long routines delay the cyclic program and can trigger the watchdog. Data shared with the cyclic program needs protection against inconsistent access.
- Diagnostics: Diagnostic and error interrupts decide how the controller reacts to module faults, for example whether it stops or continues. That reaction is part of the defined Fault reaction.
- Documentation: List every interrupt source, the routine it starts, its priority and the expected reaction time in the software documentation. Service staff need this to understand why a controller stopped after a hardware fault.
Interrupt task vs. event task
An interrupt task reacts to a hardware or system event. An Event task in IEC 61131-3 terms reacts to a software condition such as a variable edge. Vendors use the terms differently, so the tool's documentation decides.