![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_742030368.webp)
328
Comparison Instructions
Section 3-7
Do not program another instruction between ZCP(088) and the instruction
controlled by the Arithmetic Flag because the other instruction might change
the status of the Arithmetic Flag. In this case, the results of instruction B might
change the results of ZCP(088).
Flags
Precautions
Do not program another instruction between ZCP(088) and an input condition
that accesses the result of ZCP(088) because the other instruction might
change the status of the Arithmetic Flags.
Example
When CIO 000000 is ON in the following example, the 16-bit unsigned binary
data in D00000 is compared to the range 0005 to 001F hex (5 to 31 decimal)
and the result is output to the Arithmetic Flags.
CIO 000200 is turned ON if 0005 hex
≤
content of D00000
≤
001F hex.
CIO 000201 is turned ON if the content of D00000 > 001F hex.
CIO 000202 is turned ON if the content of D00000 < 0005 hex.
A
ZCP
CD
LL
UL
Correct Use of ZCP(088)
Arithmetic Flag
(Example: Equal Flag)
A
ZCPL
CD
LL
UL
Incorrect Use of ZCP(088)
Arithmetic Flag
(Example: Equal Flag)
Instruction
B
Name
Label
Operation
Error Flag
ER
ON if LL > UL.
Greater Than Flag
>
ON if CD > UL.
OFF in all other cases.
Greater Than or Equal Flag
> =
Left unchanged.
Equal Flag
=
ON if LL
≤
CD
≤
UL.
OFF in all other cases.
Not Equal Flag
<>
Left unchanged.
Less Than Flag
<
ON if CD < LL.
OFF in all other cases.
Less Than or Equal Flag
< =
Left unchanged.
Negative Flag
N
Left unchanged.
Summary of Contents for SYSMAC CS Series
Page 2: ......
Page 4: ...iv ...
Page 30: ...xxx ...
Page 186: ...146 List of Instructions by Function Code Section 2 4 ...
Page 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Page 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Page 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Page 1392: ...1352 ASCII Code Table Appendix A ...
Page 1404: ...1364 Revision History ...