S5-95F
Introduction to STEP 5
7.4.2
Cyclical Program Processing
F
igure 7-10. Cyclical Program Processing
The operating system calls OB1 cyclically. If you want to have
structured programming, you should program only jump operations
(block calls) in OB1. The blocks you call up, PBs, FBs, and SBs,
should contain completed functional units in order to provide a
clearer overview.
The S5-95F monitors the duration of the cyclical program processing.
At the beginning of the program cycle it triggers two independent
cycle time monitors (watchdog).
If the scan cycle time trigger is not reset within the scan monitoring
time, the programmable controller automatically goes to the "STOP"
mode and disables the output modules. The monitoring time is
exceeded, for example, if you program an infinite loop or if a
malfunction has occurred in the programmable controller.
The monitoring time of the first cycle time monitor is defined via the
S5-95F hardware to be approx. 700 ms. If your control program is so
complex that it can not be processed within 700 ms, you can use OB
31 to lengthen (retrigger) the monitoring time in the control program .
The monitoring time of the second cycle time monitor is checked by
the operating system. The monitoring time is set in DB1 and you
cannot retrigger it in the control program. For the second cycle time
monitor (software watchdog) you can set monitoring times up to
2550 ms.
Transfer
data
Cycle trigger
Control
program
Extension of the Cycle Time through Interrupts
The following paragraphs are intended for the system expert and explain the correlation between
interrupts and the resulting extension of the cycle time.
1.
Extension of Cycle Time
An S5-95F cycle consists of the operating system execution time (max. 80 ms) and the
execution time of the control program (OB1).
The cycle is interrupted by several events, such as the internal updating of the timers.
Execution of these interrupts represents an additional load for the system. The load (proportion
of execution time in %) is in the following called quota Q. Through the quota Q, the S5-95F
cycle is extended by a certain factor.
The following applies for the factor of extension:
Extension D=
1
1- sum of all quotas Q
D=
T
PLC
with interrupts
T
PLC
without interrupts
where
EWA 4NEB 812 6210-02
7-21