EasyManuals Logo

Omron SYSMAC CP Series Instruction & Reference Manual

Omron SYSMAC CP Series
467 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 #143 background imageLoading...
Page #143 background image
2-107
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Comparison Instructions
2
ZCP/ZCPL
• 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.
Sample program
• 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.
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
≤ 001FHex
D0
LL CD UL
= ON(1)
D0
> ON(1)
D0
< ON(1)
> 001FHex
0005Hex ≤
0005Hex >

Table of Contents

Other manuals for Omron SYSMAC CP Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron SYSMAC CP Series and is the answer not in the manual?

Omron SYSMAC CP Series Specifications

General IconGeneral
BrandOmron
ModelSYSMAC CP Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals