FB_BA_AnalogOutput

The function block FB_BA_AnalogOutput is used to control continuous actuators such as valves or dampers.
The input value fValue is converted into an analog value nRawValue by linear interpolation with 2 interpolation points.

Within the parameters, it is possible to activate upper (stHighLimit) and lower (stLowLimit) limit value monitoring of the output signal fPresentValue.
Syntax
FUNCTION_BLOCK FB_BA_AnalogOutput
VAR_INPUT
fValue : REAL;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
{region 'Variable Parameters'}
{attribute 'parameterCategory':='Hardware'}
stScale : ST_BA_ScaleRealToInt := (fX01 := 0,fX02 := 100,nY01 := 0,nY02 := 32767);
{attribute 'parameterCategory':='EventConfig'}
stHighLimit : ST_BA_LimitParameter := (nTimeToAbnormal := 1, nTimeToNormal := 1);
{attribute 'parameterCategory':='EventConfig'}
stLowLimit : ST_BA_LimitParameter := (nTimeToAbnormal := 1, nTimeToNormal := 1);
{endregion}
END_VAR
VAR_OUTPUT
fPresentValue : REAL;
bHighLimit : BOOL;
bLowLimit : BOOL;
nRawValue : INT;
END_VAR
Inputs CONSTANT PERSISTENT
Name | Type | Description |
|---|---|---|
stScale | The structure contains the interpolation points for linear interpolation. | |
stHighLimit | Data and command structure for upper limit value monitoring. | |
stLowLimit | Data and command structure for lower limit value monitoring. |
Outputs
Name | Type | Description |
|---|---|---|
fPresentValue | REAL | Current value -> fPresentValue = fValue + fOffset. |
bHighLimit | BOOL | The upper limit monitoring is active. |
bLowLimit | BOOL | The lower limit monitoring is active. |
nRawValue | INT | Scaled value for an analog output terminal. |
Prerequisites
Development environment | Required PLC library |
|---|---|
TwinCAT from v3.1.4024.62 | Tc3_BA2 from v5.5.14.0 |