Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 823

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Data Control Instructions
Flags
Precautions
Example
784
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), 0000 (hex) will be output to D and the Equals
Flag will turn ON.
If the input data (S) is less than the lower limit (C), the difference between the
input data minus 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 difference
between the input data minus the upper limit data will be output to D and the
Greater Than Flag will turn ON.
Output
Lower limit (C)
Upper limit (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 lower limit of 0100 (hex) and input
data of 8000 (hex), the output data will be as follows:
8000 (hex) [–32768] – 0100 (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.
If D00100 is 00B4 hex (180), then 180–200=FFEC hex (–20) will be output to
D00300 because 180 is less than the lower limit of 200.
If D00100 is 00E6 hex (230), then 0 will be output to D00300 because 230 is
within the upper and lower limits.
If D00100 is 015E hex (350), then 350–300=0032 hex (50) will be output to
D00300 because 350 is greater than the upper limit of 300.
Input
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-18

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents