Omron CS1G/H-CPUxxH Instructions Manual page 277

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxxH:
Table of Contents

Advertisement

Comparison Instructions
Flags
256
Using CMPL(060) Results in the Program
When CMPL(060) is executed, the result is reflected in the Arithmetic Flags.
Control the desired output or right-hand instruction with a branch from the
same input condition that controls CMPL(060), as shown in the following dia-
gram. Here, the Equals Flag and output A will be turned ON when S
S
+1, S
.
2
2
Correct Use of CMPL(060)
Using CMPL(060) Results in the Program
Do not program another instruction between CMPL(060) 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 CMPL(060).
Incorrect Use of CMPL(060)
Name
Error Flag
Greater Than Flag
Greater Than or Equal Flag
Equal Flag
Not Equal Flag
Less Than Flag
Less Than or Equal Flag
Negative Flag
CMPL
S1
S2
Arithmetic Flag
(Example: Equal Flag)
CMPL
Instruction
B
Arithmetic Flag
(Example: Equals Flag)
Label
Operation
ER
OFF or unchanged (See note.)
>
ON if S
+1, S
> S
1
1
OFF in all other cases.
≥ S
> =
ON if S
+1, S
1
1
OFF in all other cases.
=
ON if S
+1, S
= S
1
1
OFF in all other cases.
≠ S
<>
ON if S
+1, S
1
1
OFF in all other cases.
<
ON if S
+1, S
< S
1
1
OFF in all other cases.
≤ S
< =
ON if S
+1, S
1
1
OFF in all other cases.
N
OFF or unchanged (See note.)
Section 3-7
+1, S
=
1
1
A
S1
S2
A
+1, S
.
2
2
+1, S
.
2
2
+1, S
.
2
2
+1, S
.
2
2
+1, S
.
2
2
+1, S
.
2
2

Advertisement

Table of Contents
loading

Table of Contents