S5-100U
STEP 5 Operations
Processing Jump Operations
A symbolic jump destination (jump label) must always be entered next to a jump operation. This
jump label can have up to four characters. The first character must be a letter of the alphabet.
When programming, please be aware of the following items:
•
The absolute jump displacement cannot 127 or - 128 words in the program memory.
Some statements take up two words (e.g., “Load a constant”). For long jumps, insert an inter-
mediate destination.
•
Jumps can be executed only within a block.
•
Jumping over segment boundaries (“BLD 255”) is not permitted.
•
Jump labels can be set only at the start of a series of scans for CPU 102.
1
The “L...” statement does not affect the condition codes. An addition (+F) is executed with the constant
0000
H
so that the “JZ” operation can evaluate the contents of the accumulator.
STL
Explanation
Example
If no bit of input word IW1 is
set, program scanning jumps to
the label “AN 1”. If input word
IW1 and output word QW3 do
not agree, program processing
jumps back to the label “AN 0”.
Otherwise input word IW1 and
data word DW12 are compared.
If input word IW1 is greater than
or less than data word DW12,
program scanning jumps to the
“DEST” label.
AN0
:L
IW 1
:L
KH 0000
:+F
:JZ=
AN 1
:A
I 0.0
.
.
.
.
.
.
AN1
:L
IW 1
:L
QW 3
:XOW
:JN = AN 0
:L
IW 1
:L
DW12
:><
F
:JC = DEST
.
.
.
.
.
DEST
:A
I 0.1
.
.
Load input word IW1 into
ACCU 1. If the contents of
ACCU 1 equal zero
1
, jump to
the label “AN 1”. Otherwise
process the next statement
(I 0.0).
Compare input word IW1 and
output word QW3. If they are
not equal, set individual bits in
ACCU 1.
If the contents of ACCU 1 are
not zero, jump to the label
“AN 0”. Otherwise process the
next statements.
Compare input word IW1 and
data word DW12. If they are
not equal, set RLO to “1”.
If the RLO = “1”, jump to the
“DEST” label. If the RLO =
“0”, process the next
statement.
EWA 4NEB 812 6120-02b
8-57
Summary of Contents for SIMATIC S5-100U
Page 6: ...EWA 4NEB 812 6120 02b ...
Page 16: ...EWA 4NEB 812 6120 02b ...
Page 21: ...1 The SIMATIC S5 System Family EWA 4NEB 812 6120 02b ...
Page 22: ...Figures 1 1 Members of the SIMATIC S5 System Family 1 1 EWA 4NEB 812 6120 02b ...
Page 23: ......
Page 27: ......
Page 36: ...EWA 4NEB 812 6120 02b ...
Page 40: ......
Page 41: ......
Page 42: ......
Page 43: ......
Page 48: ......
Page 49: ......
Page 50: ......
Page 102: ...EWA 4NEB 812 6120 02b ...
Page 156: ...EWA 4NEB 812 6120 02b ...
Page 232: ...EWA 4NEB 812 6120 02b ...
Page 268: ...EWA 4NEB 812 6120 02b ...
Page 272: ...EWA 4NEB 812 6120 02b ...
Page 336: ...EWA 4NEB 812 6120 02b ...
Page 352: ...EWA 4NEB 812 6120 02b ...
Page 412: ...EWA 4NEB 812 6120 02b ...
Page 482: ...EWA 4NEB 812 6120 02b ...
Page 484: ...EWA 4NEB 812 6120 02b ...
Page 505: ...B Dimension Drawings EWA 4NEB 812 6120 02b ...
Page 515: ...C Active and Passive Faults in Automation Equipment EWA 4NEB 812 6120 02b ...
Page 516: ...EWA 4NEB 812 6120 02b ...
Page 522: ...EWA 4NEB 812 6120 02b ...
Page 523: ...D Information for Ordering Accessories EWA 4NEB 812 6120 02b ...
Page 524: ...EWA 4NEB 812 6120 02b ...
Page 530: ...EWA 4NEB 812 6120 02b ...
Page 531: ...E Reference Materials EWA 4NEB 812 6120 02b ...
Page 532: ...EWA 4NEB 812 6120 02b ...
Page 534: ...EWA 4NEB 812 6120 02b ...
Page 535: ...F Siemens Addresses Worldwide EWA 4NEB 812 6120 02b ...
Page 536: ...EWA 4NEB 812 6120 02b ...
Page 542: ...EWA 4NEB 812 6120 02b ...
Page 543: ...Index EWA 4NEB 812 6120 02b ...
Page 544: ...EWA 4NEB 812 6120 02b ...
Page 550: ...EWA 4NEB 812 6120 02b ...