Omron CS1G/H-CPUxxH Instructions Manual page 272

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

Advertisement

Comparison Instructions
Precautions
Examples
000000
<
000001
<S
Name
Less Than or
< =
Equal Flag
Negative Flag
N
Note In CS1 and CJ1 CPU Units, these Flags are turned OFF.
In CS1-H, CJ1-H, CJ1M, and CS1D CPU Units, these Flags are left
unchanged.
Input comparison instructions cannot be used as right-hand instructions, i.e.,
another instruction must be used between them and the right bus bar.
AND LESS THAN: AND<(310)
When CIO 000000 is ON in the following example, the contents of D00100
and D00200 are compared in as unsigned binary data. If the content of
D00100 is less than that of D00200, CIO 005000 is turned ON and execution
proceeds to the next line. If the content of D00100 is not less than that of
D00200, the remainder of the instruction line is skipped and execution moves
to the next instruction line.
005000
005001
AND SIGNED LESS THAN: AND<S(312)
When CIO 000001 is ON in the following example, the contents of D00110
and D00210 are compared as signed binary data. If the content of D00110 is
less than that of D00210, CIO 005001 is turned ON and execution proceeds
to the next line. If the content of D00110 is not less than that of D00210, the
remainder of the instruction line is skipped and execution moves to the next
instruction line.
Label
≤ S
ON if S
with one-word data.
1
2
≤ S
ON if S
+1, S
1
1
OFF in all other cases.
OFF or unchanged (See note.)
Unsigned
S
: D00100
1
LESS THAN
8714
Comparison
Decimal: 34,580
Signed
S
: D00110
1
LESS THAN
8714
Comparison
Decimal: −30,956
Section 3-7
Operation
+1, S
with double-length data.
2
2
S
: D00200
2
3A1C
Decimal: 14,876
34,580 > 14,876
(Will not proceed to next line.)
S
: D00210
2
3A1C
Decimal: 14,876
−30,956 < 14,876
(Will proceed to next line.)
251

Advertisement

Table of Contents
loading

Table of Contents