FB_BA_SunBld
This template is used to control a blind actuator with slat adjustment.
The resulting diagram from the zone stSunBldCmd is routed via a drive delay FB_BA_SunBldPosDly.
This delays all automatic telegrams and is intended to ensure that, in the event of global control of blinds (e.g. fire alarm), not all blinds move at the same time and thus the breakaway starting current of the motors remains limited.
The current blind position and the current angle are made available in BACnet via two analog objects FB_BA_AV_Op.
The template has a feedback structure stFeedback at the output.
If the programmed blind actuator is an individual actuator or the reference actuator of a group, this feedback telegram must be linked to the controlling room (zone) user function in order to obtain information about the state of the actuator.
The initialization of the template takes place within the method FB_Init. |
Syntax
FUNCTION_BLOCK FB_BA_SunBld EXTENDS FB_BA_View
VAR_INPUT
bEn : BOOL;
stSunBldCmd : ST_BA_SunBld;
END_VAR
VAR_OUTPUT
bReferencing : BOOL;
nReferenceTimer : UDINT;
bErr : BOOL;
fActualPosition : REAL;
fActualAngle : REAL;
eActualSunblindPrio : BYTE;
stFeedback : ST_BA_SunblindActuatorFeedback;
END_VAR
VAR_INPUT CONSTANT PERSISTENT
nSwiOverTi : UDINT;
nPositioningDelay : UDINT;
nTiUp : UDINT;
nTiDwn : UDINT;
nTurnTiUp : UDINT;
nTurnTiDwn : UDINT;
nBckLshTiUp : UDINT;
nBckLshTiDwn : UDINT;
fAnglLmtUp : REAL;
fAnglLmtDwn : REAL;
END_VAR
VAR_INPUT CONSTANT
ActualPosition : FB_BA_AV_Op;
ActualAngle : FB_BA_AV_Op;
END_VAR
VAR
PositioningDly : FB_BA_SunBldPosDly;
SunBldActr : FB_BA_SunBldActr;
bCmdUp AT %Q* : BOOL;
bCmdDown AT %Q* : BOOL;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
bEn | BOOL | Enable the function block function. |
stSunBldCmd | Resulting telegram from the higher-level zone (room). |
Outputs
Name | Type | Description |
---|---|---|
bReferencing | BOOL | Blind is being referenced. |
nReferenceTimer | UDINT | Elapsed referencing time [s]. |
bErr | BOOL | The internal function block FB_BA_SunBldActr is parameterized incorrectly. |
fActualPosition | REAL | Current position (calculated). |
fActualAngle | REAL | Current angle (calculated). |
eActualSunblindPrio | BYTE | Current priority with which the blind actuator is controlled. |
stFeedback | Feedback telegram for linking to the controlling room (zone) user function. In this way, information about the state of the blind actuator is fed back to the user function. |
Inputs CONSTANT PERSISTENT
Name | Type | Description |
---|---|---|
nSwiOverTi | UDINT | Changeover time [ms] of the manual switch SunBldSwi for latching. |
nPositioningDelay | UDINT | Transmission delay of the zone telegrams [ms] to distribute and limit breakaway starting currents in time. |
nTiUp | UDINT | Complete time for driving up [ms]. |
nTiDwn | UDINT | Complete time for driving down [ms]. |
nTurnTiUp | UDINT | Time for turning the slats in the upward direction [ms]. |
nTurnTiDwn | UDINT | Time for turning the slats in the downward direction [ms]. |
nBckLshTiUp | UDINT | Time to traverse the backlash in the upward direction [ms]. |
nBckLshTiDwn | UDINT | Time to traverse the backlash in the downward direction [ms]. |
fAnglLmtUp | REAL | Highest position of the slats [°]. |
fAnglLmtDwn | REAL | Lowest position of the slats [°]. This position is reached once the blind has moved to the bottom position. |
Inputs CONSTANT
Name | Type | Description |
---|---|---|
ActualPosition | Function block for displaying the position [%] in BACnet. | |
ActualAngle | Function block for displaying the angle [°] in BACnet. |
Variables
Name | Type | Description |
---|---|---|
PositioningDelay | Delay of telegrams from the zone (group) to avoid high breakaway starting currents due to simultaneity. | |
SunBldActr | Function block for controlling a blind. | |
bCmdUp | BOOL | Output variable command "up". |
bCmdDown | BOOL | Output variable command "down". |
Requirements
Development environment | Necessary function |
---|---|
TwinCAT from v3.1.4024.35 | TF8040 | TwinCAT Building Automation from V5.0.0.0 |