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

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

Advertisement

3. Instructions
ZCP/ZCPL
Instruction
AREA RANGE COMPARE
DOUBLE AREA RANGE
COMPARE
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
OK
Operands
Operand
ZCP: Comparison data (one word of data)
CD
ZCPL: Comparison data (two words of data)
ZCP: Low limit
LL
ZCPL: Low limit leftmost word number
ZCP: High limit
UL
ZCPL: High limit rightmost word number
Operand Specifications
Area
CIO
WR
ZCP: CD, LL, UL
OK
OK
ZCPL: CD, LL, UL
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
272
Mnemonic
Variations
ZCP
---
ZCPL
---
ZCP
ZCP(088)
CD
CD: Comparison Data
LL
LL: Lower limit of range
UL: Upper limit of range
UL
Block program areas
Step program areas
OK
OK
Description
Word addresses
HR
AR
T
C
DM
EM
OK
OK
OK
OK
OK
Label
ER
ON if LL > UL.
>
• ON if CD > UL.
• OFF in all other cases.
> =
Left unchanged.
=
• ON if LL
CD
• OFF in all other cases.
=
Left unchanged.
<
• ON if CD < LL.
• OFF in all other cases.
< =
Left unchanged.
N
Left unchanged.
Function
code
Compares a 16-bit unsigned binary value (CD)
with the range defined by lower limit LL and upper
088
limit UL. The results are output to the Arithmetic
Flags.
Compares a 32-bit unsigned binary value (CD+1,
CD) with the range defined by lower limit (LL+1,
116
LL) and upper limit (UL+1, UL). The results are
output to the Arithmetic Flags.
ZCPL(116)
Subroutines
OK
Data type
CMP
UINT
UINT
UINT
Indirect
DM/EM
Con-
addresses
stants
@DM
*DM
DR
@EM
*EM
OK
OK
OK
OK
OK
---
Operation
ZCP
ON if LL+1, LL > UL+1, UL.
• ON if CD > UL+1, UL.
• OFF in all other cases.
Left unchanged.
UL.
• ON if LL+1, LL
• OFF in all other cases.
Left unchanged.
• ON if CD+1, CD < LL+1, LL.
• OFF in all other cases.
Left unchanged.
Left unchanged.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
ZCPL
CD
CD: First word of Comparison Data
LL
LL: First word of Lower Limit
UL: First word of Upper Limit
UL
SFC action or
Interrupt tasks
transition programs
OK
OK
Size
CMPL
CMP
UDINT
1
UDINT
1
UDINT
1
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
OK
ZCPL
CD+1, CD
UL+1, UL.
CMPL
2
2
2
TR
bits
---
---

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