Siemens SIMATIC S5-90U System Manual page 225

Table of Contents

Advertisement

S5-90U/S5-95U
Processing the 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 exceed +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.
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 IW 1 and
data word DW12 are compared.
If input word IW1 is greater than
or less than data word DW12,
program scanning jumps to the
"Destination"
label.
1
The "L..." statement does not affect the condition codes. An addition (+F) is executed with the constant 0000
"JZ" operation can evaluate the contents of the accumulator.
EWA 4NEB 812 6115-02b
STL
AN0
:L
IW 1
:L
KH 0000
:+F
:JZ=
AN 1
:A
I 32.0
.
.
.
.
.
.
AN1
:L
IW 1
:L
QW 3
:XOW
:JN = AN 0
:L
IW 1
:L
DW12
:><
F
:JC = DEST
.
.
.
.
.
DEST
:A
I 32.1
.
.
STEP 5 Operations
Explanation
Load input word IW1 into ACCU
1. If the contents of ACCU 1
1
equal zero
, jump to the label
"AN 1". Otherwise process the
next statement (AI 32.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 DW 12. If they are
not equal, set RLO to "1".
If the RLO = "1", jump to the
"Destination" label. If the RLO
= "0", process the next
statement.
so that the
H
8-57

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s5-95u

Table of Contents