F_BA_ScaleLimit

The F_BA_ScaleLimit function represents a linear interpolation with 2 interpolation points and can be used to generate characteristic curves. The characteristic curve is determined by the interpolation points [fX01/fY01] and [fX02/fY02].
The calculated return value F_BA_ScaleLimit can be limited by bLimit.
Syntax
FUNCTION F_BA_ScaleLimit : REAL
VAR_INPUT
fX : REAL;
bLimit : BOOL;
fY02 : REAL;
fY01 : REAL;
fX02 : REAL;
fX01 : REAL;
END_VAR
VAR_OUTPUT
fSlope : REAL;
END_VAR
Inputs
Name | Type | Description |
|---|---|---|
fX | REAL | Input value of the characteristic curve. |
bLimit | BOOL | A TRUE indicates that the return value F_BA_ScaleLimit is limited by the two values fY01 and fY02. |
fY02 | REAL | y-value of the second interpolation point. |
fY01 | REAL | y-value of the first interpolation point. |
fX02 | REAL | x-value of the second interpolation point. |
fX01 | REAL | x-value of the first interpolation point. |
Outputs
Name | Type | Description |
|---|---|---|
fSLope | REAL | fSlope is the result of the slope -> (fY02 - fY01) / (fX02 - fX01). |
Prerequisites
Development environment | Required PLC library |
|---|---|
TwinCAT from v3.1.4024.62 | Tc3_BA2 from v5.5.14.0 |