227
Comparison Instructions Section 3-6
Using CPS(114) Results in the Program
Do not program another instruction between CPS(114) and the instruction
controlled by the Arithmetic Flag because the other instruction might change
the status of the Arithmetic Flag. In this case, the results of instruction B might
change the results of CPS(114).
The immediate-refreshing variation (!CPS(114)) can be used with words allo-
cated to external inputs specified in S
1
and/or S
2
. When !CPS(114) is exe-
cuted, input refreshing will be performed for the external input word specified
in S
1
and/or S
2
and that refreshed value will be compared.
Flags
Precautions Do not program another instruction between CPS(114) and an input condition
that accesses the result of CPS(114) because the other instruction might
change the status of the Arithmetic Flags.
3-6-6 DOUBLE SIGNED BINARY COMPARE: CPSL(115)
Purpose Compares two double signed binary values (constants and/or the contents of
specified words) and outputs the result to the Arithmetic Flags in the Auxiliary
Area.
Ladder Symbol
CPS
S1
S2
A
Incorrect Use of CPS(114)
Instruction
B
Arithmetic Flag
(Example: Equal Flag)
Name Label Operation
Greater Than Flag > ON if S
1
> S
2
.
OFF in all other cases.
Greater Than or Equal Flag > = ON if S
1
≥ S
2
.
OFF in all other cases.
Equal Flag = ON if S
1
= S
2
.
OFF in all other cases.
Not Equal Flag <> ON if S
1
≠ S
2
.
OFF in all other cases.
Less Than Flag < ON if S
1
< S
2
.
OFF in all other cases.
Less Than or Equal Flag < = ON if S
1
≤ S
2
.
OFF in all other cases.
CPSL(115)
S
1
S
2
S1: Comparison data 1
S
2: Comparison data 2