Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 314

Table of Contents

Advertisement

3. Instructions
ZCPS/ZCPSL
Instruction
SIGNED AREA RANGE COM-
PARE
DOUBLE SIGNED AREA
RANGE COMPARE
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
OK
Operands
Operand
ZCPS: Comparison data (one word of data)
CD
ZCPSL: Comparison data (two words of data)
ZCPS: Lower limit
LL
ZCPSL: First word of lower limit
ZCPS: Upper limit
UL
ZCPSL: First word of upper limit
Operand Specifications
Area
CIO
WR
ZCPS: CD, LL,
UL
OK
OK
ZCPSL: CD, LL,
UL
Flags
Name
Error Flag
Greater Than Flag
Greater Than or Equal Flag
Equal Flag
Not Equal Flag
278
Mnemonic
Variations
ZCPS
---
ZCPSL
---
ZCPS
ZCPS(117)
CD
CD: Comparison data (one word)
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
P_ER
ON if LL > UL.
P_GT
• ON if CD > UL.
• OFF in all other cases.
P_GE
• ON if LL
CD.
• OFF in all other cases.
P_EQ
• ON if LL
CD
• OFF in all other cases.
P_NE
• ON if CD < LL.
• ON if CD > UL.
• OFF in all other cases.
Function
code
Compares the 16-bit signed binary value in CD
(word contents or constant) to the range defined
117
by LL and UL and outputs the results to the Arith-
metic Flags.
Compares the 32-bit signed binary value in CD
and CD+1 (word contents or constant) to the
118
range defined by LL+1, LL and UL+1, UL and out-
puts the results to the Arithmetic Flags.
ZCPSL(118)
Subroutines
OK
Data type
ZCPS
INT
INT
INT
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+1, CD > UL+1, UL.
• OFF in all other cases.
• ON if LL+1, LL
• OFF in all other cases.
UL.
• ON if LL+1, LL
• OFF in all other cases.
• ON if CD+1, CD < LL+1, LL.
• ON if CD+1, CD > UL+1, UL.
• OFF in all other cases.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
ZCPSL
CD
CD: First word of comparison data
LL
(two words)
LL: First word of lower limit
UL
UL: First word of upper limit
SFC action or
Interrupt tasks
transition programs
OK
OK
Size
ZCPSL
ZCPS
ZCPSL
DINT
1
DINT
1
DINT
1
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
OK
ZCPL
CD+1, CD.
CD+1, CD
UL+1, UL.
2
2
2
TR
bits
---
---

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - REFERENCE MANUAL 02-2010 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents