FB_BA_Hys_03

The template represents a sliding limit value monitoring with two switching points which, in contrast to FB_BA_Hys_02, are subject to switch-on and switch-off delays.
The switch-on and switch-off thresholds as well as the time delays are entered via analog objects.
![]() | The initialization of the template takes place within the method FB_Init. |
Block diagram

Syntax
FUNCTION_BLOCK FB_BA_Hys_03 EXTENDS FB_BA_View
VAR_INPUT
bEn : BOOL;
fIn : REAL;
END_VAR
VAR_OUTPUT
bPresentValue : BOOL;
bEvent : BOOL;
END_VAR
VAR_INPUT CONSTANT
On : FB_BA_AV_Op;
Off : FB_BA_AV_Op;
DlyOn : FB_BA_AV_Op;
DlyOff : FB_BA_AV_Op;
Q : FB_BA_BV;
END_VAR
VAR
Swi2P : FB_BA_Swi2P;
END_VAR
Outputs
Name | Type | Description |
---|---|---|
bPresentValue | BOOL | Output of the current state of the hysteresis function. |
bEvent | BOOL | Display of a fault or the BV object is active. bEvent is only active if the property bEventDetectionEnable of the BV object was set to TRUE. The monitoring of the binary feedback indicates a fault. |
Inputs CONSTANT
Name | Type | Description |
---|---|---|
On | AV object for input of the upper limit of the hysteresis function. | |
Off | AV object for input of the lower limit of the hysteresis function. | |
DlyOn | AV object for entering the switch-on delay in seconds. | |
DlyOff | AV object for entering the switch-off delay in seconds. | |
Q | The binary object indicates the current state of the hysteresis function. |
Variables
Name | Type | Description |
---|---|---|
Swi2P | The function block Swi2P is the core of the hysteresis function. |
Requirements
Development environment | Necessary function |
---|---|
TwinCAT from v3.1.4024.35 | TF8040 | TwinCAT Building Automation from V5.2.1.0 |