Basics of program execution
8.2 CPU overload behavior
Automation system
180
System Manual, 12/2017, A5E03461182-AE
OB priority and runtime behavior
If you have assigned an OB to the event, the OB has the priority of the event. S7-1500 CPUs
support the priority classes 1 (lowest) to 26 (highest). The following items are essential to the
execution of an event:
●
Call and execution of the assigned OB
●
The update of the process image partition of the assigned OB
The user program processes the OBs exclusively on a priority basis. This means the
program processes the OB with the highest priority first when multiple OB requests occur at
the same time. If an event occurs that has a higher priority than the currently active OB, this
OB is interrupted. The user program processes events of the same priority in order of
occurrence.
Note
Communication
The communication (e.g. test functions with the PG) always works with priority 15. To
prevent extending the program runtime unnecessarily in time-critical applications, these OBs
should not be interrupted by communication. Assign a priority > 15 for these OBs.
Reference
Additional information on organization blocks is available in the STEP 7 online help.
8.2
CPU overload behavior
Requirements
For the event scenarios considered in the following section, it is assumed that you have
assigned an OB to each event source and that these OBs have the same priority. The
second condition, in particular, is only for the sake of a simplified representation.
Principle of CPU overload behavior
An occurring event triggers the execution of the associated OB. Depending on the OB
priority and the current processor load, a time delay may occur before the OB is executed
when there is an overload. The same event can therefore occur once or several times before
the user program processes the OB belonging to the preceding event. The CPU treats such
a situation as follows: The operating system queues the events in the queue associated with
their priority in the order of their occurrence.
To control temporary overload situations, you can limit the number of queued events that
originate from the same source. The next event is discarded as soon as the maximum
number of pending triggers of a specific cyclic interrupt OB, for example, is reached.
An overload occurs when events which originate from the same source occur faster than
they can be processed by the CPU.
More detailed information is provided in the following sections.
Summary of Contents for Simatic S7-1500/ET 200MP
Page 1: ......