FB_BARSunblindSwitch
With the help of this function block the blind controller FB_BARSunblindActuator or the roller shutter controller FB_BARRollerblind can be controlled in manual operation mode. The connection takes place via the positioning telegram stSunblind either directly or with an additional priority controller.
Structure of the blind positioning telegram stSunblind.
TYPE ST_BARSunblind:
STRUCT
uiPosition : UINT;
iAngle : INT;
bManUp : BOOL;
bManDown : BOOL;
bManualMode : BOOL;
bActive : BOOL;
END_STRUCT
END_TYPE
Operation
This function block controls the blind function blocks FB_BARSunblindActuator and FB_BARRollerBlind in manual mode via the command inputs bSwitchUp and bSwitchDown, wherein bSwitchUp takes priority. The commands are passed on to the respective commands bManUp and bManDown in the positioning telegram. If a command input is activated that is longer than the entered time uiSwitchOverTime (in ms), then the corresponding control command latches. Activating a command input again releases this latch.
Linking to the blind function block
The manual control function block can be connected to the blind function block either directly or via an upstream priority controller FB_BARSunblindPrioritySwitch. The connection is made via the positioning telegram stSunblind.
Use of a priority controller:
Direct connection:
VAR_INPUT
eDataSecurityType : E_HVACDataSecurityType;
bEnable : BOOL;
bSwitchUp : BOOL;
bSwitchDown : 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 - bManualMode and bActive are both FALSE. For a connection with priority controller this means that another functionality takes over control of the blind. Conversely, a direct connection allows the blind to drive directly to the 0 position, i.e. fully up, since the actuator function block does not evaluate the bit bActive itself.
bSwitchUp: Command input for blind up.
bSwitchDown: Command input for blind down.
VAR_OUTPUT
stSunblind : ST_BARSunblind;
bActive : BOOL;
stSunblind: positioning telegram, 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.
VAR_IN_OUT
uiSwitchOverTime : UINT;
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.
uiSwitchOverTime : Time in milliseconds until the corresponding manual command in the positioning telegram stSunblind latches in the case of a continuous active command input.
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 |