![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268336.webp)
297
Comparison Instructions
Section 3-7
Flags
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.
Precautions
Input comparison instructions cannot be used as right-hand instructions, i.e.,
another instruction must be used between them and the right bus bar.
Examples
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.
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
Name
Label
Operation
Error Flag
ER
OFF or unchanged (See note.)
Greater Than
Flag
>
ON if S
1
> S
2
with one-word data.
ON if S
1
+1, S
1
> S
2
+1, S
2
with double-length data.
OFF in all other cases.
Greater Than or
Equal Flag
> =
ON if S
1
≥
S
2
with one-word data.
ON if S
1
+1, S
1
≥
S
2
+1, S
2
with double-length data.
OFF in all other cases.
Equal Flag
=
ON if S
1
= S
2
with one-word data.
ON if S
1
+1, S
1
= S
2
+1, S
2
with double-length data.
OFF in all other cases.
Not Equal Flag
=
ON if S
1
≠
S
2
with one-word data.
ON if S
1
+1, S
1
≠
S
2
+1, S
2
with double-length data.
OFF in all other cases.
Less Than Flag
<
ON if S
1
< S
2
with one-word data.
ON if S
1
+1, S
1
< S
2
+1, S
2
with double-length data.
OFF in all other cases.
Less Than or
Equal Flag
< =
ON if S
1
≤
S
2
with one-word data.
ON if S
1
+1, S
1
≤
S
2
+1, S
2
with double-length data.
OFF in all other cases.
Negative Flag
N
OFF or unchanged (See note.)
005000
005001
000000
000001
<
<S
34,580 > 14,876
S
2
: D00200
S
1
: D00100
8714
3A1C
Unsigned
LESS THAN
Comparison
Decimal: 34,580
Decimal: 14,876
(Will not proceed to next line.)
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...