Monitoring The Cycle Time - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

4.1.5

Monitoring the cycle time

The cycle time is the time that the CPU operating system requires to execute the cyclic
phase of the RUN mode. The CPU provides two methods of monitoring the cycle time:
● Maximum scan cycle time
● Fixed minimum scan cycle time
Scan cycle monitoring begins after the startup event is complete. Configuration for this
feature appears under the "Device Configuration" for the CPU under "Cycle time".
The CPU always monitors the scan cycle and reacts if the maximum scan cycle time is
exceeded. If the configured maximum scan cycle time is exceeded, an error is generated
and is handled one of two ways:
● If the user program does not include an OB 80, then the CPU generates an error and
● If the user program includes an OB 80, then the CPU executes OB 80
The RE_TRIGR instruction (Re-trigger cycle time monitoring) allows you to reset the timer
that measures the cycle time. However, this instruction only functions if executed in a
program cycle OB; the RE_TRIGR instruction is ignored if executed in OB 80. If the
maximum scan cycle time is exceeded twice within the same program cycle with no
RE_TRIGR instruction execution between the two, then the CPU transitions to STOP
immediately. The use of repeated executions of the RE_TRIGR instruction can create an
endless loop or a very long scan.
Typically, the scan cycle executes as fast as it can be executed and the next scan cycle
begins as soon as the current one completes. Depending upon the user program and
communication tasks, the time period for a scan cycle can vary from scan to scan. To
eliminate this variation, the CPU supports an optional fixed minimum scan cycle time (also
called fixed scan cycle). When this optional feature is enabled and a fixed minimum scan
cycle time is provided in ms, the CPU will maintain the minimum cycle time within ±1 ms for
the completion of each CPU scan.
In the event that the CPU completes the normal scan cycle in less time than the specified
minimum cycle time, the CPU spends the additional time of the scan cycle performing
runtime diagnostics and/or processing communication requests. In this way the CPU always
takes a fixed amount of time to complete a scan cycle.
In the event that the CPU does not complete the scan cycle in the specified minimum cycle
time, the CPU completes the scan normally (including communication processing) and does
not create any system reaction as a result of exceeding the minimum scan time. The
following table defines the ranges and defaults for the cycle time monitoring functions.
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
goes to STOP. (You can change the configuration of the CPU to ignore this time error
and stay in RUN. The default configuration is for the CPU to go to STOP.)
97BPLC concepts
4.1 Execution of the user program
73

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents