FB_BA_Chrct04

The function block FB_BA_Chrct04 represents a linear interpolation with 4 interpolation points and can be used to generate a characteristic curve. The characteristic curve is determined by the interpolation points [rX1/rY1] to [rX4/rY4]. If the input variable bLmt is TRUE, rY is limited by rY01 and rY04. If bLmt is FALSE, rY is not limited.

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;
rY01  : REAL;
rY02  : REAL;
rY03  : REAL;
rY04  : 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.
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.
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  |