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 #317 background imageLoading...
Page #317 background image
279
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Comparison Instructions
3
ZCP/ZCPL
Precautions
• When ZCP(088)/ZCPL(116) 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
ZCP(088)/ZCPL(116), as shown in the following diagram.
• Do not program another instruction between ZCP(088)/ZCPL(116) and the instruction controlled by
the Arithmetic Flag because the other instruction might change the status of the Arithmetic Flag.
Example Programming
• When CIO 0.00 is ON in the following example, the 16-bit unsigned binary data in D0 is compared to
the range 0005 to 001F hex (5 to 31 decimal) and the result is output to the Arithmetic Flags.
CIO 20.00 is turned ON if 0005 hex ≤ content of D0 ≤ 001F hex.
CIO 20.01 is turned ON if the content of D0 > 001F hex.
CIO 20.02 is turned ON if the content of D0 < 0005 hex.
A
ZCP
CD
LL
UL
Arithmetic Flag
(Example: Equal Flag)
In this case, the Equals Flag and output A will be
turned ON when LL
≤ CD ≤ UL.
In this case, the results of instruction B
might change the results of ZCP(088)/ZCPL(116).
A
ZCPL
CD
LL
UL
Arithmetic Flag
(Example: Equal Flag)
Instruction
B
20.00
0.00
>
20.01
=
20.02
<
ZCP
D0
#0005
#001F
CD
LL
UL
Arithmetic Flags
≤
≤
D0
LL CD UL
= ON(1)
D0
> ON(1)
D0
< ON(1)
>
>
0005Hex
001FHex
001FHex
0005Hex

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