97BPLC concepts
4.1 Execution of the user program
S7-1200 Programmable controller
70
System Manual, 11/2011, A5E02486680-05
Event
OB number
Quantity allowed
Start event
OB priority
Diagnostic error OB 82
1 event (only if OB 82 was
loaded)
Module transmits an error
9
Time error
OB 80
1 event (only if OB 80 was
loaded)
5
Maximum cycle time was
exceeded
A second time interrupt (cyclic or
time-delay) started before the
CPU had finished execution of
the first interrupt
26
1
The startup event and the program cycle event will never occur at the same time because the startup event will run to
completion before the program cycle event will be started (controlled by the operating system).
2
Only the diagnostic error event (OB 82) interrupts the startup event. All other events are queued to be processed after
the startup event has finished.
3
The CPU provides a total of 4 time events that are shared by the time-delay OBs and the cyclic OBs. The number of
time-delay and cyclic OBs in your user program cannot exceed 4.
4
You can have more than 50 process events if you use the DETACH and ATTACH instructions.
5
You can configure the CPU to stay in RUN if the maximum scan cycle time was exceeded or you can use the
RE_TRIGR instruction to reset the cycle time. However, the CPU goes to STOP mode the second time that the
maximum scan cycle time was exceeded in one scan cycle.
After the execution of an OB with a priority of 2 to 25 has started, processing of that OB
cannot be interrupted by the occurrence of another event, except for by OB 80 (time-error
event, which has a priority of 26). All other events are queued for later processing, allowing
the current OB to finish.
Interrupt latency
The interrupt event latency (the time from notification of the CPU that an event has occurred
until the CPU begins execution of the first instruction in the OB that services the event) is
approximately 175 µsec, provided that a program cycle OB is the only event service routine
active at the time of the interrupt event.
Understanding time error events
The occurrence of any of several different time error conditions results in a time error event.
The following time errors are supported:
●
Maximum cycle time exceeded
●
Requested OB cannot be started
●
Queue overflow occurred
The maximum cycle time exceeded condition results if the program cycle does not complete
within the specified maximum scan cycle time. See the section on "Monitoring the cycle time"
(Page 73) for more information regarding the maximum cycle time condition, how to
configure the maximum scan cycle time, and how to reset the cycle timer.
The requested OB cannot be started condition results if an OB is requested by a cyclic
interrupt, a time-delay interrupt, or a time-of-day interrupt, but the requested OB is already
being executed.