575
Special Math Instructions Section 3-14
15 determines whether the input is BCD or binary: OFF specifies binary and
ON specifies BCD.
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
}
C+1
C+2
C+3
C+4
C+5
C+6
C+ (2m+1)
C+ (2m+2)
X0 (*1)
Y0
X1
Y1
X2
Y2
Xn
Yn
Xm
Ym
C+1
C+2
C+3
C+4
C+5
C+6
C+7
C+8
C+ (4n+1)
C+ (4n+2)
C+ (4n+3)
C+ (4n+4)
C+ (4m+1)
C+ (4m+2)
C+ (4m+3)
C+ (4m+4)
C+1
C+2
C+3
C+4
C+5
C+6
C+7
C+8
C+ (4n+1)
C+ (4n+2)
C+ (4n+3)
C+ (4n+4)
C+ (4m+1)
C+ (4m+2)
C+ (4m+3)
C+ (4m+4)
Note: Write X
m
(max. X
value in the table) in word
C+1 when the I/O data in
S and D contain unsigned
data (bit 11 of C = 0).
16-bit BCD16-bit binary (signed
or unsigned) or 16-bit BCD data
32-bit signed binary data
Floating-point data
X0 (rightmost 16 bits)
X0 (leftmost 16 bits)
Y0 (rightmost 16 bits)
Y0 (leftmost 16 bits)
X1 (rightmost 16 bits)
X1 (leftmost 16 bits)
Y1 (rightmost 16 bits)
Y1 (leftmost 16 bits)
to
Xn (rightmost 16 bits)
Xn (leftmost 16 bits)
Yn (rightmost 16 bits)
Yn (leftmost 16 bits)
to
Xm (rightmost 16 bits)
Xm (leftmost 16 bits)
Ym (rightmost 16 bits)
Ym (leftmost 16 bits)
X0 (rightmost 16 bits)
X0 (leftmost 16 bits)
Y0 (rightmost 16 bits)
Y0 (leftmost 16 bits)
X1 (rightmost 16 bits)
X1 (leftmost 16 bits)
Y1 (rightmost 16 bits)
Y1 (leftmost 16 bits)
to
Xn (rightmost 16 bits)
Xn (leftmost 16 bits)
Yn (rightmost 16 bits)
Yn (leftmost 16 bits)
to
Xm (rightmost 16 bits)
Xm (leftmost 16 bits)
Ym (rightmost 16 bits)
Ym (leftmost 16 bits)
to
to
to
to
Y0
X0
AB C
Y (Binary data)
Ymax
Xmax
X (Binary data)