FB_BA_Chrct07

FB_BA_Chrct07 1:

The function block FB_BA_Chrct07 represents a linear interpolation with 7 interpolation points and can be used to generate a characteristic curve. The characteristic curve is determined by the interpolation points [rX1/rY1] to [rX7/rY7]. If the input variable bLmt is TRUE, rY is limited by rY01 and rY07. If bLmt is FALSE, rY is not limited.

FB_BA_Chrct07 2:

Error handling

The input values for rX[n+1] must always be at least 0.0000001 greater than the values for rX[n].
In the event of an error the variable sErrDescr indicates that at one point of the characteristic curve the values are not monotonically increasing.

VAR_INPUT

rX   : REAL;
rX01 : REAL;
rX02 : REAL;
rX03 : REAL;
rX04 : REAL;
rX05 : REAL;
rX06 : REAL;
rX07 : REAL;
rY01 : REAL;
rY02 : REAL;
rY03 : REAL;
rY04 : REAL;
rY05 : REAL;
rY06 : REAL;
rY07 : REAL;
bLmt : BOOL;

rX: Input value of the characteristic curve.

rX01: X-value for interpolation point P1.

rX02: X-value for interpolation point P2.

rX03: X-value for interpolation point P3.

rX04: X-value for interpolation point P4.

rX05: X-value for interpolation point P5.

rX06: X-value for interpolation point P6.

rX07: X-value for interpolation point P7.

rY01: Y-value for interpolation point P1.

rY02: Y-value for interpolation point P2.

rY03: Y-value for interpolation point P3.

rY04: Y-value for interpolation point P4.

rY05: Y-value for interpolation point P5.

rY06: Y-value for interpolation point P6.

rY07: Y-value for interpolation point P7.

bLmt: Limit for the output value rY.

VAR_OUTPUT

rY        : REAL;
bErr      : BOOL;
sErrDescr : T_MAXSTRING;

rY: Calculated output value of the characteristic curve.

bErr: This output is switched to TRUE if the parameters entered are erroneous.

sErrDescr: Contains the error description.

Error description

01: Error: at the specified element. The sequence must always be rX01 > rX02 > rXn or rX01 < rX02 < rXn.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.7

Tc3_BA from v1.1.6.0