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

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Data Control Instructions
Flags
Precautions
Example
638
If the input data (S) is less than the lower limit (C), the lower limit data will be
output to D and the Less Than Flag will turn ON.
If the input data (S) is greater than the upper limit (C+1), the upper limit data
will be output to D and the Greater Than Flag will turn ON.
If the input data (S) is greater than or equal to the lower limit (C) and less than
or equal to the upper limit (C+1), the input data (S) will be output to D.
Upper limit
C+1
Lower limit
C
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.
If D100 is 0050 hex (80), then 0064 hex (100) will be output to D300 because
80 is less than the lower limit of 100.
If D100 is 00C8 hex (200), then 0064 hex (100) will be output to D300
because 200 is within the upper and lower limits.
If D100 is 012C hex (300), then 015E hex (350) will be output to D300
because 350 is greater than the upper limit of 300.
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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents