FB_BARSunblindEvent

This function block serves to preset the position and angle for any desired event. It can be used, for example, in order to drive to a parking position or to drive the blind upward for maintenance.

FB_BARSunblindEvent 1:

The function is activated via the input bActivate. If this is the case, then the active flag is set in the positioning telegram (bActive in stSunblind) at the output stSunblind and the values uiPositionEvent for the blind height in % and iAngleEvent for the slat angle in degrees, which are entered in the In-Out variables, are passed on in this telegram. If the function is no longer active due to the resetting of bActive, then the active flag in the positioning telegram stSunblind is reset and the positions for height and angle are set to "0". If the priority function block is used, then a function with a lower priority can take over the control.

VAR_INPUT

eDataSecurityType : E_HVACDataSecurityType;
bActivate         : BOOL;

eDataSecurityType:if eDataSecurityType:= eDataSecurityType_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 internally released.

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: FB_BARSunblindEvent 2: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.

bActivate: a TRUE signal on this input activates the function block and transfers the entered setpoints together with the active flag in the positioning telegram ST_BARSunblind. A FALSE signal resets the active flag again and sets position and angle to zero.

VAR_OUTPUT

stSunblind : ST_BARSunblind;
bActive    : BOOL;

bActive : corresponds to the boolean value bActive in the blind telegram ST_BARSunblind and is solely used to indicate whether the function block sends an active telegram.

stSunblind: output structure of the blind positions, see ST_BARSunblind

VAR_IN_OUT

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 declared as input variables, they would not be able to write a reference variable.
Application example: FB_BARSunblindEvent 3:Example_PERSISTENT.zip.

uiPositionPark : UINT;
iAnglePark     : INT;

uiPositionEvent: height position of the blind in % in case of activation.

iAngleEvent: slat angle of the blind in degrees in case of activation.