MATH.CharCurve_DINT (FB)

(CAA_Mathematics.library)

This function block will evaluate a piecewise linear function (the characteristic curve) at an integral point . The characteristic curve is specified by a defined number of integral sampling points .

Input:

diInputValue

DINT

interpolation point  

usiNoPoints

USINT

number  of sampling points defining the characteristic curve ( ).

Input/Output:

ap2diPoints

ARRAY[0..10] OF MATH.POINT2_DINT;

array of two dimensional sampling points  with

Output:

diOutputValue

DINT

interpolated value at point

xError

BOOL

error flag (see Guidlines for CAA libs)

wErrorID

WORD

information on error

0 : no error   

1 : error within array of sampling points ( i.e. the sampling points aren't arranged in ascending order)

2 : interpolation point diInputValue is outside of area covered by sampling points ()

4 : number of invalid sampling points