3. Instructions
Function
When the execution condition is ON, ZONE(682) adds the specified bias to the specified input data
(signed 16-bit binary) and places the result in a specified word.
If the input data (S) is less than zero, the input data plus the negative bias will be output to D and the
Less Than Flag will turn ON.
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, 0 will be output to D and the Equals Flag will turn ON.
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]
Sample program
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.
0.00
Contents of D300
656
Output
Input
Negative bias (C)
D100
C:
C: D200
D200
D300
D201
Contents of D200
Decimal values
–100
Negative bias
Positive bias
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Need help?
Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?
Questions and answers