460
Special Math Instructions Section 3-13
Note The X coordinates must be in ascending order: X
1
< X
2
< ... < X
m
. Input all
values of (X
n
, Y
n
) as binary data, regardless of the data format specified in
control word C.
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. The following 5 kinds of I/O data can be used:
• 16-bit unsigned BCD data
• 16-bit unsigned binary data
• 16-bit signed binary data
• 32-bit signed binary data
• Single-precision floating-point data
Y0
X0
AB C
Y (Binary data)
Ymax
Xmax
X (Binary data)
Yn
Yn+1
Xn Xn+1S
S−Xn
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)
Input data