STEP 5 Operations
S5-115U Manual
8.1.6
Comparison Operations
Comparison operations compare the contents of the two accumulators. The comparison does not
change the accumulators' contents. Table 8-6 provides an overview of the comparison operations.
An example follows the table.
Table 8-6. Overview of Comparison Operations
Operation
Meaning
Compare for "equal to"
The contents of the two accumulators are interpreted as bit
patterns and scanned to see if they are equal.
Operand
! =
F
> <
F
Compare for "not equal to"
The contents of the two accumulators are interpreted as bit
patterns and compared to see if they are not equal.
Compare for "greater than"
The contents of the two accumulators are interpreted as fixed-
point numbers. They are compared to see if the operand in
ACCUM 2 is greater than the operand in ACCUM 1.
>
F
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
Compare for "greater than or equal to"
The contents of the two accumulators are interpreted as fixed-
point numbers. They are compared to see if the operand in
ACCUM 2 is greater than or equal to the operand in ACCUM 1.
> =
F
Compare for "less than"
The contents of the two accumulators are interpreted as fixed-
point numbers. They are compared to see if the operand in
ACCUM 2 is less than the operand in ACCUM 1.
<
F
Compare for "less than or equal to"
The contents of the two accumulators are interpreted as fixed-
point numbers. They are compared to see if the operand in
ACCUM 2 is less than or equal to the operand in ACCUM 1.
< =
F
Processing Comparison Operations
To compare two operands, load them consecutively into the two accumulators. Execution of the
operations is independent of the RLO.
The result is binary and is available as RLO for further program scanning. If the comparison is
satisfied, the RLO is "1". Otherwise it is "0".
Executing the comparison operations sets the condition codes (see Section 8.4).
Note
When using comparison operations,
make sure the operands have the same number
format.
8-30
EWA 4NEB 811 6130-02b
Summary of Contents for SIMATIC S5-115U
Page 6: ...EWA 4NEB 811 6130 02b ...
Page 16: ...EWA 4NEB 811 6130 02b ...
Page 18: ...EWA 4NEB 811 6130 02b ...
Page 26: ......
Page 62: ...EWA 4NEB 811 6130 02b ...
Page 64: ...EWA 4NEB 811 6130 02b ...
Page 67: ......
Page 74: ......
Page 79: ......
Page 80: ......
Page 81: ......
Page 82: ......
Page 83: ......
Page 84: ......
Page 97: ......
Page 98: ......
Page 99: ......
Page 114: ...EWA 4NEB 811 6130 02b ...
Page 280: ...EWA 4NEB 811 6130 02b ...
Page 372: ...EWA 4NEB 811 6130 02b ...
Page 432: ...EWA 4NEB 811 6130 02b ...
Page 442: ......
Page 528: ...EWA 4NEB 811 6130 02b ...
Page 590: ......
Page 591: ......
Page 592: ......
Page 593: ......
Page 594: ......
Page 600: ...EWA 4NEB 811 6130 02b ...
Page 602: ...EWA 4NEB 811 6130 02b ...
Page 604: ...EWA 4NEB 811 6130 02b ...
Page 624: ...EWA 4NEB 811 6130 02b ...
Page 632: ...EWA 4NEB 811 6130 02b ...
Page 644: ...EWA 4NEB 811 6130 02b ...
Page 646: ...EWA 4NEB 811 6130 02b ...
Page 652: ...EWA 4NEB 811 6130 02b ...
Page 654: ...EWA 4NEB 811 6130 02b ...
Page 660: ...EWA 4NEB 811 6130 02b ...
Page 662: ...EWA 4NEB 811 6130 02b ...
Page 666: ...EWA 4NEB 811 6130 02b ...
Page 668: ...EWA 4NEB 811 6130 02b ...
Page 674: ...EWA 4NEB 811 6130 02b ...