Technical data
Basics of Designing a Program Structure
4.2 Blocks in the User Program
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 99
4.2.4 Organization Blocks for Interrupt-Driven Program Processing
By providing interrupt OBs, the S7 CPUs allow the following:
• Program sections can be executed at certain times or intervals (time-driven)
• Your program can react to external signals from the process.
The cyclic user program does not need to query whether or not interrupt events have occurred. If
an interrupt does occur, the operating system makes sure that the user program in the interrupt OB
is executed so that there is a programmed reaction to the interrupt by the programmable logic
controller.
Interrupt Types and Applications
The following table shows how the different types of interrupt can be used.
Type of Interrupt Interrupt OBs Application Examples
Time-of-day interrupt OB10 to OB17 Calculation of the total flow into a blending process at the end of
a shift
Time-delay interrupt OB20 to OB23 Controlling a fan that must continue to run for 20 seconds after a
motor is switched off
Cyclic interrupt OB30 to OB38 Scanning a signal level for a closed loop control system
Hardware interrupt OB40 to OB47 Signaling that the maximum level of a tank has been reached