EasyManuals Logo
Home>Omron>Controller>CJ - INSTRUCTIONS

Omron CJ - INSTRUCTIONS User Manual

Omron CJ - INSTRUCTIONS
1308 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #304 background imageLoading...
Page #304 background image
3. Instructions
266
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Precautions
• When CPS(114)/CPSL(115) is executed, the result is reflected in the Arithmetic Flags. Control the
desired output or right-hand instruction with a branch from the same input condition that controls
CPS(114)/CPSL(115), as shown in the following diagram.
• Do not program another instruction between CPS(114)/CPSL(115) and the instruction controlled by
the Arithmetic Flag because the other instruction might change the status of the Arithmetic Flag.
• The immediate-refreshing variation (!CPS(114)/!CPSL(115)) can be used with words allocated to
external inputs specified in S
1
and/or S
2
. When !CPS(114)/!CPSL(115) is executed, input refreshing
will be performed for the external input word specified in S
1
and/or S
2
and that refreshed value will be
compared. (Immediate refreshing cannot be performed on inputs allocated to Group-2 High-density
I/O Units or Units mounted to Slave Racks.)
Example Programming
When CIO 0.00 is ON in the following example, the eight-digit signed binary data in D2 and D1 is
compared to the eight-digit signed binary data in D6 and D5 and the result is output to the Arithmetic
Flags.
• If the content of D2 and D1 is greater than that of D6 and D5, the Greater Than Flag will be turned
ON, causing CIO 20.00 to be turned ON.
• If the content of D2 and D1 is equal to that of D6 and D5, the Equals Flag will be turned ON, causing
CIO 20.01 to be turned ON.
• If the content of D2 and D1 is less than that of D6 and D5, the Less Than Flag will be turned ON,
causing CIO 20.02 to be turned ON.
i
CPS/CPSL
S1
S2
A
Arithmetic Flag
(Example: Equal Flag)
In this case, the Equals Flag and output A will be turned
ON when S
1
= S
2
or S
1
+1, S
1
= S
2
+1, S
2
.
CPS/CPSL
S1
S2
A
Instruction B
Arithmetic Flag
(Example: Equal Flag)
In this case, the results of instruction B might
change the results of CPS(114)/CPSL(115).
CPSL
D1
D5
20.00
0.00
>
20.01
=
20.02
<
D2
1234
D1
5678
> ON (1)
= OFF (0)
< OFF (0)
D6
ABCD
D5
EF12
Result
Comparison
Flag status

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ - INSTRUCTIONS and is the answer not in the manual?

Omron CJ - INSTRUCTIONS Specifications

General IconGeneral
BrandOmron
ModelCJ - INSTRUCTIONS
CategoryController
LanguageEnglish

Related product manuals