S5-100U Introduction to STEP 5
The following two examples show you how you can program a start-up OB.
Example 1: Programming OB22
STL
AN T 1
L KT 500.0
SP T 1
F001: A T 1
JC =F001
BE
Explanation
A 5 s time value is loaded in
ACCU 1.
Timer 1 is started.
After 5 s, cyclic program
processing begins in OB1.
Example
After power recovery, you
want to be sure that the power
supply voltage for the I/Os has
attained its rated value before
the cyclic program is pro-
cessed. A time loop is there-
fore programmed in OB22.
Example 2: Programming OB21
STL
L KH 0
T FW 0
T FW 2
T FW 4
T FW 6
T FW 8
BE
Explanation
Value “0” is loaded in
ACCU 1 and transferred into
flag words 0, 2, 4, 6, and 8.
Example
After the operating mode
switch causes a cold restart,
flag bytes 0 to 9 are preset
with “0”. The other flag bytes
are retained since they contain
important machine functions.
EWA 4NEB 812 6120-02
7-25