Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 244

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Comparison Instructions
Inputting the Instructions
The input comparison instructions are treated just like the LD, AND, and OR
instructions to control the execution of subsequent instructions.
Input type
LD
The instruction can be connected directly to the left bus bar.
AND
The instruction cannot be connected directly to the left bus bar.
OR
The instruction can be connected directly to the left bus bar.
LD connection
ON execution condition when
comparison result is true.
<
AND connection
<
OR connection
<
ON execution condition when
comparison result is true.
Options
The input comparison instructions can compare signed or unsigned data and
they can compare one-word or double values. If no options are specified, the
comparison will be for one-word unsigned data. With the three input types and
two options, there are 72 different input comparison instructions.
Symbol
=
(Equal)
< >
(Not equal)
<
(Less than)
<=
(Less than or equal)
>
(Greater than)
>=
(Greater than or equal)
Unsigned input comparison instructions (i.e., instructions without the S option)
can handle unsigned binary or BCD data. Signed input comparison instruc-
tions (i.e., instructions with the S option) handle signed binary data.
Operation
ON execution condition when
comparison result is true.
Option (data format)
Option (data length)
None: Unsigned data
None: One-word data
S: Signed data
L: Double-length data
Section 3-6
211

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents