Panasonic FP Series Programming Manual page 474

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Error flags
No.
IEC address
%MX0.900.7
R9007
%MX0.900.8
R9008
If the input value x is smaller than the x-coordinate of the first reference point (P1: x < x1), the
output y is set to the first reference point's y-coordinate (output y = y1, horizontal dashed line in the
graph's upper left corner).
If the input value x is greater than the x-coordinate of the last reference point (P8: x > x8), the
output y is set to the last reference point's y-coordinate (output y = y8, horizontal dashed line in the
graphic's upper right corner).
 DUT for the xy value pairs (reference points P1, P2, ...):
The reference points (P1, P2, ...) are copied to the function via a DUT-type variable that contains
the number of reference points and the xy value pairs (number; x1, x2, ...; y1, y2; ...).
Structure of the DUT:
1. Entry: Variable of the data type INT that contains the number of reference points.
The number of reference points (xy value pairs) can be anywhere between 2 ... 100. In the graph, eight reference points (P1 ... P8) are used.
2. Entry: Variable of the data type ARRAY [0..z] OF DINT that contains the x
values.
z
Here
represents the place marker for the number of reference points (see entry 1).
3. Entry: Variable of the data type ARRAY [0..z] OF DINT that contains the y
values.
z
Here
represents the place marker for the number of reference points (see entry 1).
 Important information:
x values
The x values have to be entered in an ascending order (x1 < x2 < x3 < ...). If the x values are the
same (e.g. x2 = x3 = x4) the reference points P2(x2,y2) and P3(x3,y3) are ignored.
Overflow of the function:
In order to avoid an overflow in the calculation, neighboring reference points must fulfill the
following conditions:
|ya - yb| < 2147483647
|x - xb|
< 2147483647
|(ya - yb)*(x - xb)|
|xa - xb| < 2147483647
Accuracy of the calculation:
This function can only process whole numbers. Numbers that follow the decimal point are cut out
when calculating the value y. For example, if at the position x, y = 511,13, the function returns the
Set
permanently
for an instant
 Limitations of the output value y:
< 2147483647
If
 the number of reference points is not
between 2 ... 100, or the x values are not
in ascending order (x1 < x2 < x3 < ...).
Arithmetic instructions
473

Advertisement

Table of Contents
loading

Table of Contents