FB_BA_SwiHys2P

The function block FB_BA_SwiHys2P is a two-point switch with adjustable hysteresis and hysteresis offset.
A general function block enable can be implemented at input bEn. If the function block is locked, the output bQ is FALSE. The setpoint for the two-point switch is connected at input fSp. The control direction of the function block depends on the input variable bActn.
The active switching points result from the setpoint, the hysteresis and the hysteresis offset. They are output at fSwiHi and fSwiLow.
- The upper switching point is given by fSp + fHys/2 + fHysOffs.
- The lower switching point is given by fSp - fHys/2 + fHysOffs.
If bActn TRUE, the result is direct/synchronous control direction (cooling mode).

If bActn is FALSE, the result is indirect/reversed control direction (heating mode).

Syntax
VAR_INPUT
bEn : BOOL;
fIn : REAL;
fSp : REAL;
fHys : REAL;
fHysOffs : REAL;
{attribute 'parameterUnit':= 's'}
nDlyOn : UDINT;// (0..BAComn_Global.udiMaxSecInMilli) switch-on delay (in [s])
{attribute 'parameterUnit':= 's'}
nDlyOff : UDINT;// (0..BAComn_Global.udiMaxSecInMilli) switch-off delay (in [s])
bActn : BOOL;
END_VAR
VAR_OUTPUT
bQ : BOOL;
fSwiHi : REAL;
fSwiLow : REAL;
{attribute 'parameterUnit':= 's'}
nRemTiDlyOn : UDINT;// switch-on delay countdown (in [s])
{attribute 'parameterUnit':= 's'}
nRemTiDlyOff : UDINT;// switch-off delay countdown (in [s])
END_VAR
Inputs
Name | Type | Description |
---|---|---|
bEn | BOOL | General enable of the function block. |
fIn | REAL | Input value |
fSp | REAL | Setpoint input |
fHys | REAL | Hysteresis |
fHysOffs | REAL | Hysteresis offset |
nDlyOn | UDINT | Start-up delay [s] |
nDlyOff | UDINT | Switch-off delay [s] |
bActn | BOOL | Control direction |
Outputs
Name | Type | Description |
---|---|---|
bQ | BOOL | Output |
fSwiHi | REAL | Upper switching point |
fSwiLow | REAL | Lower switching point |
nRemTiDlyOn | UDINT | Remaining time of the start-up delay [s]. |
nRemTiDlyOff | UDINT | Remaining time of the switch-off delay [s]. |
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT 3.1 4024.56 | Tc3_BA2_Common from V2.2.23.0 |