Cyclic Program Execution; Time-Controlled Program Execution - Siemens SIMATIC S5-115U User Manual

Simatic s5 series cpu 941-7ub11 cpu 942-7ub11 cpu 943-7ub11 and cpu 943-7ub21 cpu 944-7ub11 and cpu 944-7ub21
Table of Contents

Advertisement

Introduction to STEP 5
FB1 STL
NAME
:CLEAR F
:L
KF
:T
FW
L10
:L
KF
:DO
FW
:T
FW
:L
FW
:I
2
:T
FW
:L
KF
:<F
:JC
=L10
:BE
7.4.2

Cyclic Program Execution

OB1 is called cyclically by the operating system. The maximum duration of the cyclic program is
established by the scan monitoring time (see Section 2.6.3). If you want structured programming,
you should program only jump operations (block calls) in OB1. The blocks called (PBs, FBs and SBs)
should then consist of self-contained function units so that overall clarity is enhanced.
See Section 2.5.3 for details on cyclic program execution (RUN mode).
7.4.3

Time-Controlled Program Execution

OBs 10 to 13 are available for time-controlled program execution. The timed-interrupt OBs are
called by the operating system at fixed intervals.
The call interval can be set (e.g. in the RESTART OB) in the system data as a multiple of 10 ms. It
can be changed during cyclic program execution. The default call interval for OB13 is 100 ms. Call
intervals from 10 ms to 10 min. can be set in system data words 97 to 100 (range: 0 to FFFF, see
Table 7-5).
You can also initialize the call intervals in DB1 (see Section 11.3).
The operating system only calls a timed-interrupt OB in the following cases:
if a call interval is >0,
and
if the relevant time-interrupt OB has been programmed!
7-20
+0
FW 200 is preset with "0".
200
"0" is stored in ACCUM 1.
+0
The contents of FW 200 indicate the address of the
200
current flag word.
0
The current flag word is set to "0".
200
The contents of FW 200 are incremented by 2.
200
+100
The comparison value "100" is loaded into ACCUM 1.
If the contents of FW 200 < 100, the program jumps to
label 10.
Bytes FB 0...99 are set to "0".
S5-115U Manual
Explanation
EWA 4NEB 811 6130-02b

Advertisement

Table of Contents
loading

Table of Contents