Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 370

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Comparison Instructions
Description
Flags
Area
Indirect DM/EM
addresses in binary
Indirect DM/EM
addresses in BCD
Constants
Data Registers
Index Registers
Indirect addressing using
Index Registers
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.)
Arithmetic Flag Status
The following table shows the status of the Arithmetic Flags after execution of
ZCPL(116).
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
Using ZCPL(116) Results in the Program
When 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 ZCPL(116).
Do not program another instruction between ZCPL(116) and the instruction
controlled by the Arithmetic Flag because the other instruction might change
the status of the Arithmetic Flag.
The operation of ZCPL(116) is almost identical to that of ZCP(088) except that
ZCPL(116) compares 32-bit values instead of 16-bit values. Refer to 3-7-11
AREA RANGE COMPARE: ZCP(088) for diagrams showing how to use
results in the program and an example program section.
Name
Error Flag
Greater Than Flag
CD
@ D00000 to @ D32767
@ E00000 to @ E32767
@ En_00000 to @ En_32767
(n = 0 to C)
*D00000 to *D32767
*E00000 to *E32767
*En_00000 to *En_32767
(n = 0 to C)
#0000 0000 to #FFFF FFFF
(binary)
---
IR0 to IR15
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Flag status
>
=
ON
OFF
OFF
ON
OFF
Label
ER
ON if LL+1, LL > UL+1, UL.
>
ON if CD > UL+1, UL.
OFF in all other cases.
Section 3-7
LL
UL
<
OFF
ON
Operation
331

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents