Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 354

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Comparison Instructions
Flags
Precautions
Example
314
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
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.
Do not program another instruction between CPSL(115) and an input condi-
tion that accesses the result of CPSL(115) because the other instruction
might change the status of the Arithmetic Flags.
When CIO 000000 is ON in the following example, the eight-digit signed
binary data in D00002 and D00001 is compared to the eight-digit signed
binary data in D00006 and D00005 and the result is output to the Arithmetic
Flags.
• If the content of D00002 and D00001 is greater than that of D00006 and
D00005, the Greater Than Flag will be turned ON, causing CIO 002000 to
be turned ON.
• If the content of D00002 and D00001 is equal to that of D00006 and
D00005, the Equals Flag will be turned ON, causing CIO 002001 to be
turned ON.
• If the content of D00002 and D00001 is less than that of D00006 and
D00005, the Less Than Flag will be turned ON, causing CIO 002002 to
be turned ON.
Incorrect Use of CPSL(115)
Arithmetic Flag
(Example: Equal Flag)
Label
ER
OFF or unchanged (See note.)
>
ON if S
+1, S
1
OFF in all other cases.
> =
ON if S
+1, S
1
OFF in all other cases.
=
ON if S
+1, S
1
OFF in all other cases.
=
ON if S
+1, S
1
OFF in all other cases.
<
ON if S
+1, S
1
OFF in all other cases.
< =
ON if S
+1, S
1
OFF in all other cases.
N
OFF or unchanged (See note.)
Section 3-7
CPSL
S1
S2
Instruction
B
A
Operation
> S
+1, S
.
1
2
2
S
+1, S
.
1
2
2
= S
+1, S
.
1
2
2
S
+1, S
.
1
2
2
< S
+1, S
.
1
2
2
S
+1, S
.
1
2
2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents