Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 310

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

Function
ZCP
ZCP(088) compares the 16-bit signed binary data in CD with the range defined by LL and UL and
outputs the result to the Greater Than, Equals, and Less Than Flags in the Auxiliary Area. (The Less
Than or Equal, Greater Than or Equal, and Not Equal Flags are left unchanged.)
When S > T2 as shown below, the > flag turns ON.
When T1
S
T2, the = flag turns ON. When S < T1, the < flag turns ON.
ZCP(088)Result
CD > UL
CD = UL
LL < CD < UL
CD = LL
CD < LL
ZCPL
ZCPL(116) compares the 32-bit signed binary data in CD+1, CD with the range defined by LL+1, LL
and UL+1, UL and outputs the result to the Greater Than, Equals, and Less Than Flags in the Auxiliary
Area. (The Less Than or Equal, Greater Than or Equal, and Not Equal Flags are left unchanged.)
When S+1,S > T2+1,T2 as shown below, the > flag turns ON.
When T1+1,T1
When S+1, S < T1+1, T1, the < flag turns ON.
ZCPL(116)Result
CD+1, CD > UL+1, UL
CD+1, CD = UL+1, UL
LL+1, LL < CD+1, CD <
UL+1, UL
CD+1, CD = LL+1, LL
CD+1, CD < LL+1, LL
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.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Flag status
>
=
ON
OFF
OFF
OFF
ON
OFF
ON
S+1, S
T2+1, T2, the = flag turns ON.
Flag status
>
=
ON
OFF
OFF
OFF
ON
OFF
ON
<
<
ZCP
CD
LL
UL
A
Arithmetic Flag
(Example: Equal Flag)
In this case, the Equals Flag and output A will be
turned ON when LL
CD
UL.
3. Instructions
3
273

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?

Questions and answers

Table of Contents