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

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

Advertisement

Comparison Instructions
Flags
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
Precautions
Example
308
CX-Programmer
label
P_ER
ER
P_GT
>
P_GE
> =
P_EQ
=
P_NE
<>
P_LT
<
P_LE
< =
P_N
N
Note In CS1-H, CJ1-H, CJ1M, and CS1D (for Single-CPU System) CPU Units,
these Flags are left unchanged.
In CS1 and CJ1 CPU Units, these Flags are turned OFF.
Do not program another instruction between CMPL(060) and an input condi-
tion that accesses the result of CMPL(060) because the other instruction
might change the status of the Arithmetic Flags.
When CIO 000000 is ON in the following example, the eight-digit unsigned
binary data in CIO 0011 and CIO 0010 is compared to the eight-digit
unsigned binary data in CIO 0009 and CIO 0008 and the result is output to
the Arithmetic Flags. The results recorded in the Greater Than, Equals, and
Less Than Flags are immediately saved to CIO 000200 (Greater Than),
CIO 000201 (Equals), and CIO 000202 (Less Than).
Incorrect Use of CMPL(060)
Arithmetic Flag
(Example: Equals Flag)
Programming
Console label
Unchanged (See note.)
ON if S
1
OFF in all other cases.
ON if S
1
OFF in all other cases.
ON if S
1
OFF in all other cases.
ON if S
1
OFF in all other cases.
ON if S
1
OFF in all other cases.
ON if S
1
OFF in all other cases.
Unchanged (See note.)
Section 3-7
CMPL
S1
S2
Instruction
B
A
Operation
+1, S
> S
+1, S
.
1
2
2
+1, S
S
+1, S
.
1
2
2
+1, S
= S
+1, S
.
1
2
2
+1, S
S
+1, S
.
1
2
2
+1, S
< S
+1, S
.
1
2
2
+1, S
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