FB_BA_Chrct07
Linear interpolation with 7 interpolation points
Functional description
The function block FB_BA_Chrct07 represents a linear interpolation with seven interpolation points and can be used to generate a characteristic curve. The characteristic curve is determined by the interpolation points [lrX1/lrY1] to [lrX7/lrY7]. If the input variable bLmt is TRUE, lrY is limited by lrY01 and lrY07. If bLmt is FALSE, lrY is not limited.
Error handling
The input values for lrX[n+1] must always be at least 0.0000001 greater than the values for lrX[n].
In the event of an error the variable udiErrId indicates at which point of the characteristic curve the values are not monotonically increasing.
Inputs/outputs
VAR_INPUT
lrX : LREAL;
lrX01 : LREAL;
lrX02 : LREAL;
lrX03 : LREAL;
lrX04 : LREAL;
lrX05 : LREAL;
lrX06 : LREAL;
lrX07 : LREAL;
lrY01 : LREAL;
lrY02 : LREAL;
lrY03 : LREAL;
lrY04 : LREAL;
lrY05 : LREAL;
lrY06 : LREAL;
lrY07 : LREAL;
bLmt : BOOL;
lrX: input value of the characteristic curve
lrX01: X-value for interpolation point P1
lrX02: X-value for interpolation point P2
lrX03: X-value for interpolation point P3
lrX04: X-value for interpolation point P4
lrX05: X-value for interpolation point P5
lrX06: X-value for interpolation point P6
lrX07: X-value for interpolation point P7
lrY01: Y-value for interpolation point P1
lrY02: Y-value for interpolation point P2
lrY03: Y-value for interpolation point P3
lrY04: Y-value for interpolation point P4
lrY05: Y-value for interpolation point P5
lrY06: Y-value for interpolation point P6
lrY07: Y-value for interpolation point P7
bLmt: limitation of the output value lrY
VAR_OUTPUT
lrY : LREAL;
bErr : BOOL;
udiErrId : UDINT;
udiErrArg : UDINT;
lrY: calculated output value of the characteristic curve
bErr: this output is switched to TRUE if the parameters entered are erroneous.
udiErrId / udiErrArg: contains the error number and the error argument. See error codes.
Requirements
Development environment | Target system | required library | required supplement |
---|---|---|---|
TwinCAT 2.11 R3/x64 | PC/CX | TcBA library from V1.0.0 | TS8040 | TwinCAT Building Automation from V1.0.0 |