Basics of program execution
8.1 Events and OBs
Distributed I/O system
144 System Manual, 09/2019, A5E03576849-AJ
Possible priorities (default
priority)
Default system
response
1)
Programming error (only for
2 to 26 (7) 121 STOP 0 or 1
I/O access error (only for
2 to 26 (7) 122 Ignore 0 or 1
If you have not configured the OB.
In the case of these event sources, besides the permanently assigned OB numbers (see column: Possible OB numbers)
in STEP 7 you can assign OB numbers from the range ≥ 123.
If the maximum cycle time has been exceeded twice within one cycle, the CPU always assumes the STOP state, re-
gardless of whether you have configured OB 80.
You will find more information on these event sources and the starting behavior in the S7-1500 Motion Control function
Response to triggers
The occurrence of a start event results in the following reaction:
● If the event comes from an event source to which you have assigned an OB, this event
triggers the execution of the assigned OB. The event enters the queue according to its
priority.
● If the event comes from an event source to which you have not assigned an OB, the CPU
executes the default system reaction.
Note
Some event sources, such as startup, pull/plug, exist even if you do n
ot configure them.
Assignment between event source and OBs
The type of OB determines where you make the assignment between OB and event source:
● With hardware interrupts and isochronous mode interrupts, the assignment is made
during the configuration of the hardware or when the OB is created.
● In the case of the MC-Servo, MC-PreServo, MC-PostServo and MC-Interpolator, STEP 7
automatically assigns the OBs 91/92 as soon as you add a technology object.
● For all other types of OB, the assignment is made when the OB is created, where
applicable after you have configured the event source.
For hardware interrupts, you can change an assignment which has already been made
during runtime with the instructions ATTACH and DETACH. In this case, only the actually
effective assignment changes, and not the configured assignment. The configured
assignment takes effect after loading, and at startup.
The CPU ignores hardware interrupts to which you did not assign an OB in your
configuration or which occur after the DETACH instruction. The CPU does not check
whether an OB is assigned to this event when an event arrives, but only prior to the actual
processing of the hardware interrupt.