Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 336

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Comparison Instructions
Flags
Precautions
Examples
000000
<
000001
<S
Name
Error Flag
ER
Greater Than
>
Flag
Greater Than or
> =
Equal Flag
Equal Flag
=
Not Equal Flag
=
Less Than Flag
<
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
Label
OFF or unchanged (See note.)
ON if S
> S
with one-word data.
1
2
ON if S
+1, S
> S
1
1
OFF in all other cases.
ON if S
S
with one-word data.
1
2
ON if S
+1, S
S
1
1
OFF in all other cases.
ON if S
= S
with one-word data.
1
2
ON if S
+1, S
= S
1
1
OFF in all other cases.
ON if S
S
with one-word data.
1
2
ON if S
+1, S
S
1
1
OFF in all other cases.
ON if S
< S
with one-word data.
1
2
ON if S
+1, S
< S
1
1
OFF in all other cases.
ON if S
S
with one-word data.
1
2
ON if S
+1, S
S
1
1
OFF in all other cases.
OFF or unchanged (See note.)
S
: D00100
Unsigned
1
LESS THAN
8714
Comparison
Decimal: 34,580
Section 3-7
Operation
+1, S
with double-length data.
2
2
+1, S
with double-length data.
2
2
+1, S
with double-length data.
2
2
+1, S
with double-length data.
2
2
+1, S
with double-length data.
2
2
+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.)
297

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents