FB_BARSunblindWeatherProtection

FB_BARSunblindWeatherProtection 1:

The weather protection has the highest priority in the blind controller (see overview) and is intended to ensure that the blind is not damaged by ice or wind.

The task of the automatic weather protection function is to protect the blind against two impending dangers and, in order to do so, to drive it to a safe position:

In both cases of danger the blind is driven to the protection position specified by uiPositionProtection (height position in percent) and iAngleProtection (slat angle in degrees).

VAR_INPUT

eDataSecurityType    : E_HVACDataSecurityType;
bEnable              : BOOL;
lrWindSpeed          : LREAL;
lrOutsideTemperature : LREAL;
bRainSensor          : BOOL;

eDataSecurityType: If eDataSecurityType:= eHVACDataSecurityType_Persistent, the persistent VAR_IN_OUT variables of the function block are stored in the flash of the computer if a value changes. For this to work, the function block FB_HVACPersistentDataHandling must be instanced once in the main program, which is called cyclically. Otherwise the instanced FB is not released internally.

A change of value can be initiated by the building management system, a local operating device or via a write access from TwinCAT. When the computer is restarted the saved data are automatically read back from the flash into the RAM.

Application example: example_persistent.zip

If eDataSecurityType:= eHVACDataSecurityType_Idle the persistently declared variables are not saved in a fail-safe manner.

Notice

A cyclically changing variable must never be linked with the IN_OUT variable of a function block, if eDataSecurityType:= eHVACDataSecurityType_Persistent. It would lead to early wear of the flash memory.

bEnable : The function block has no function if this input is FALSE. 0 is output for both position and angle in the positioning telegram stSunblind and bActive is FALSE. This means that another function takes over control of the blind via the priority controller.

lrWindSpeed: Wind speed. The unit of entry is arbitrary, but it is important that no value is smaller than 0 and that the values become larger with increasing speed.

lrOutsideTemperature: Outside temperature in degrees Celsius.

bRainSensor: Input for a rain sensor.

VAR_OUTPUT

stSunblind                  : ST_BARSunblind;
bIceAlarm                   : BOOL;
udiRemainingTimeIceAlarm    : UDINT;
bStormAlarm                 : BOOL;
uiRemainingTimeStormDetect  : UINT;
uiRemainingTimeStormAlarm   : UINT;
bError                      : BOOL;
udiErrorId                  : UDINT;

stSunblind: Output structure of the blind positions, see ST_BARSunblind.

bActive : Corresponds to the Boolean value bActive in the blind telegram ST_BARSunblind and serves merely to indicate whether the function block is sending an active telegram.

bIceAlarm: Indicates the icing up alarm.

udiRemainingTimeIceAlarm: in the case of impending icing up (bIceAlarm=TRUE), this second counter is set to the deicing time. As soon as the temperature lies above the frost point entered (lrFrostTemperature), the remaining number of seconds until the 'all-clear' signal is given (bIceAlarm=FALSE) are indicated here. This output is 0 as long as no countdown of the time is taking place.

bStormAlarm: Indicates the storm alarm.

uiRemainingTimeStormDetect: In an uncritical case this second counter constantly indicates the alarm delay time uiDelayStormUpcoming. If the measured wind force lrWindSpeed lies above the activation limit value lrWindSpeedStormUpcoming, then the seconds until the alarm is given are counted down. This output is 0 as long as no countdown of the time is taking place.

uiRemainingTimeStormAlarm: As soon as the storm alarm is initiated, this second counter initially constantly indicates the deactivation time delay of the storm alarm uiDelayStormAbating. If the measured wind force lrWindSpeed falls below the deactivation limit value lrWindSpeedStormAbating, then the seconds remaining until the 'all-clear' signal is given (bStormAlarm = FALSE) are counted down. This output is 0 as long as no countdown of the time is taking place.

bError: This output is switched to TRUE if the parameters entered are erroneous.

udiErrorId: Contains the error code if the values entered should be erroneous. See Error codes.

FB_BARSunblindWeatherProtection 2:

If an error should occur, then this automatic function is deactivated and position and angle are set to 0. This means that if a priority controller is in use, another function with a lower priority (see Overview) automatically takes over control of the blind. In the case of a direct connection, conversely, the blind will drive to position/angle 0.

VAR_IN_OUT

lrFrostTemperature       : LREAL;
lrWindSpeedStormUpcoming : LREAL;
lrWindSpeedStormAbating  : LREAL;
uiDeiceTime              : UINT;
uiDelayStormUpcoming     : UINT;
uiDelayStormAbating      : UINT;
uiPositionProtection     : UINT;
iAngleProtection         : INT;

In order for the registered parameters to be retained beyond a controller failure, it is necessary to declare them as In-Out variables. A reference variable is then assigned to them in the program. Each change of the value of these reference variables is persistently stored in the function block and written back to the reference variable following a controller failure and restart. If the parameters were only to be defined as input variables, they would not be able to write a reference variable.
Application example: example_persistent.zip.

lrFrostTemperature: Icing up temperature limit value in degrees Celsius. This value may not be greater than 0. Otherwise an error is output.

lrWindSpeedStormUpcoming: Wind speed limit value for the activation of the storm alarm. This value may be not smaller than 0 and must lie above the value for the deactivation. Otherwise an error is output. The unit of entry must be the same as that of the input lrWindSpeed. A value greater than this limit value triggers the alarm after the entered time uiDelayStormUpcoming.

lrWindSpeedStormAbating: Wind speed limit value for the deactivation of the storm alarm. This value may be not smaller than 0 and must lie below the value for the activation. Otherwise an error is output. The unit of entry must be the same as that of the input lrWindSpeed. A value smaller than or equal to this limit value resets the alarm after the entered time uiDelayStormAbating.

uiDeiceTime: Time until the deicing of the blind after icing up (in minutes). After that the icing up alarm is reset.

uiDelayStormUpcoming: Time delay in seconds until the storm alarm is triggered.

uiDelayStormUpcoming: Time delay in seconds until the storm alarm is reset.

uiPositionProtection: Height position of the blind in % in the case of protection.

iAngleProtection: Slat angle of the blind in degrees in the case of protection.

Requirements

Development environment

required library

required function

TwinCAT 3.1 build 4022.16 or higher

Tc2_HVAC V3.3.1.0

TF8000 | TC3 HVAC V1.0.0.0