Technical data
Basics of Designing a Program Structure
4.2 Blocks in the User Program
Programming with STEP 7
78 Manual, 05/2010, A5E02789666-01
Event-Driven Program Processing
Cyclic program processing can be interrupted by certain events (interrupts). If such an event
occurs, the block currently being executed is interrupted at a command boundary and a different
organization block that is assigned to the particular event is called. Once the organization block has
been executed, the cyclic program is resumed at the point at which it was interrupted.
This means it is possible to process parts of the user program that do not have to be processed
cyclically only when needed. The user program can be divided up into "subroutines" and distributed
among different organization blocks. If the user program is to react to an important signal that
occurs relatively seldom (for example, a limit value sensor for measuring the level in a tank reports
that the maximum level has been reached), the subroutine that is to be processed when the signal
is output can be located in an OB whose processing is event-driven.