Omron CP1E-N@@D@-@ Computer Hardware User Manual


 
2-221
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Special Math Instructions
2
APR
Flags
Function
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 P_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 P_EQ ON if the result is 0.
OFF in all other cases.
Negative Flag P_N ON if bit 15 of R is ON.
OFF in all other cases.
Y0
X0
Y (Binary data)
Ymax
Xmax
X (Binary data)
Yn
Yn+1
Xn Xn+1S
f(S)=
D
Yn+
Y (binary data)
Equation:
Calculation
result
X (binary data)
Input data
Xn+1
-
Xn