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

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Data Control Instructions
Flags
Precautions
Example
If the input data (S) is greater than zero, the input data plus the positive bias
will be output to D and the Greater Than Flag will turn ON.
If the input data (S) is equal to zero, 0000 will be output to D and the Equals
Flag will turn ON.
Output
Positive bias (C+1)
If the output data is smaller than the 8000 (hex) or if is greater than 7FFF, the
sign will be reversed. For example, for a negative bias value of FF00 (hex) and
input data of 8000 (hex), the output data will be as follows:
8000 (hex) [–32768] – FF00 (hex) [–256] = 7F00 (hex) [32512]
Name
Label
Error Flag
ER
Greater Than
>
Flag
Equals Flag
=
Less Than Flag
<
Negative Flag
N
If the upper limit is less than the lower limit, an error will occur and the Error
Flag will turn ON.
If the input data (S) is greater than the upper limit, the Greater Than Flag will
turn ON.
If the output word D is 0000 hex, the Equals Flag will turn ON.
If the input data (S) is less than the lower limit, the Less Than Flag will turn
ON.
If the status of the leftmost bit of the output word D is "1," the Negative Flag
will turn ON.
When CIO 0.00 is ON, a bias of –100 will be applied to the value of D100 if
that value is less than 0, and the resulting value will be stored in D300.
If the value of D100 is 0, then 0000 hex will be stored in D300.
If the value of D100 is greater than 0, then a bias of +100 will be applied and
the resulting value will be stored in D300.
Input
Negative bias (C)
Operation
ON if the upper limit is less than the lower limit.
OFF in all other cases.
ON if the input data (S) is greater than the upper limit.
OFF in all other cases.
ON if the result is 0.
OFF in all other cases.
ON if the input data (S) is less than the lower limit.
OFF in all other cases.
ON if the leftmost bit of the result is "1."
OFF in all other cases.
Section 3-17
643

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents