Technical data
Basics of Designing a Program Structure
4.2 Blocks in the User Program
Programming with STEP 7
86 Manual, 05/2010, A5E02789666-01
How the Parameter works
The operating system of the CPU constantly provides the communication with the configured
percent of the entire CPU processing capacity (time slice technique). If this processing capacity is
not needed for the communication, it is available to the rest of the processing.
Effect on the Actual Scan Cycle Time
Without additional asynchronous events, the OB1 scan cycle time is extended by a factor that can
be calculated according to the following formula:
100
100 - "Scan cycle load from communication (%)"
Example 1 (no additional asynchronous events):
When you set the load added to the cycle by communication to 50%, the OB1 scan cycle time can
be doubled.
At the same time, the OB1 scan cycle time is also influenced by asynchronous events (such as
hardware interrupts or cyclic interrupts). From a statistical point of view, even more asynchronous
events occur within an OB1 scan cycle because of the extension of the scan cycle time by the
communication portion. This causes an additional increase in the OB1 scan cycle. This increase
depends on how many events occur per OB1 scan cycle and on the duration of event processing.
Example 2 (additional asynchronous events considered):
For a pure OB1 execution time of 500 ms, a communication load of 50% can result in an actual
scan cycle time of up to 1000 ms (provided that the CPU always has enough communication jobs
to process). If, parallel to this, a cyclic interrupt with 20 ms processing time is executed every 100
ms, this cyclic interrupt would extend the scan cycle by a total of 5*20 ms = 100 ms without
communication load. That is, the actual scan cycle time would be 600 ms. Because a cyclic
interrupt also interrupts communication, it affects the scan cycle time by 10 * 20 ms with 50%
communication load. That is, in this case, the actual scan cycle time amounts to 1200 ms instead
of 1000 ms.
Note
• Check the effects of changing the value of the "Scan Cycle Load from Communication" parameter
while the system is running.
• The communication load must be taken into account when setting the minimum scan cycle time;
otherwise time errors will occur.