3. Instructions
456
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Flags
Function
z Operation of the Linear Extrapolation Function
APR(069) processes the input data specified in S with the following equation and the line-segment data (X
n
,
Y
n
) specified in the table beginning at C+1. The result is output to the destination word(s) specified with D.
1. For S < X
0
Converted value = Y
0
2. For X
0
≤ S ≤ X
max
, if X
n
< S < X
n+1
Converted value = Y
n
+[{Y
n
+ 1 - Y
n
}/{X
n
+ 1 - X
n
}] × {Input data S - X
n
}
3. X
max
< S
Converted value = Y
max
Up to 256 endpoints can be stored in the line-segment data table beginning at C+1.
Name Label Operation
Error Flag ER • ON if C is a constant greater than 0001.
• ON if C is a word address but the X coordinates are not in ascending order (X
1
≤ X
2
≤ ... ≤ X
m
).
• ON if C is a word address and bits 9, 11, and 15 of C indicate BCD input, but S is not BCD.
• ON if C is a word address and bit 9 of C indicates floating-point data, but S is a one-word constant.
• ON if C is 0000 or 0001 but S is not BCD between 0000 and 0900.
• OFF in all other cases.
Equals Flag = • ON if the result is 0.
• OFF in all other cases.
Negative Flag N • ON if bit 15 of R is ON.
• OFF in all other cases.
Y0
X0
AB C
Y (Binary data)
Ymax
Xmax
X (Binary data)
Yn
Yn+1
Xn Xn+1S
S−X
n
Xn+1−Xn
Yn+1−Yn
f(Y)=
Y
n+1−Yn
Xn+1−Xn
D
Y
n+
(S−X
n)
Y (binary data)
Equation:
Calculation
result
X (binary data)
In
ut data