STEP 5 Operations
S5-100U
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 ACCU 2 is
greater than the operand in ACCU 1.
>
F
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 ACCU 2 is
greater than or equal to the operand in ACCU 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 ACCU 2 is
less than the operand in ACCU 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 ACCU 2 is
less than or equal to the operand in ACCU 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 processing. 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 812 6120-02b
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 ...