FB_BARFctSelection
Application
This function block is for enabling room heating or room cooling. It can be used for 2-pipe systems (changeover) or 4-pipe systems.
In the case of a 4-pipe system the changeover from heating to cooling operation takes place automatically on the basis of a comparison of the setpoint for the room temperature with the actual value for the room temperature.
Sketch:
In the case of a 2-pipe system the heating operation or cooling operation may only be enabled when heating or cooling medium is present. The room temperature controller gets this information from the primary units.
In both 2-pipe and 4-pipe systems the changeover between heating operation and cooling operation can be delayed by a timer. The input variable udiChangeOverDelay must be greater than zero for this.
The following tables describe the interrelationship between the inputs and the eCtrlFct output of the FB_BARFctSelection function block.
in the 2-pipe system
bEnable | bPipeSystem | bFeedbHeatMedium | bFeedbCoolMedium | interim result | bDewPoint | eCtrlFct |
0 | 0 | 0 | 0 | OFF | TRUE / FALSE | OFF |
1 | 0 | 0 | 0 | Heating | TRUE / FALSE | Heating |
1 | 0 | 0 | 1 | Cooling | TRUE | OFF |
FALSE | Cooling | |||||
1 | 0 | 1 | 0 | Heating | TRUE / FALSE | Heating |
1 | 0 | 1 | 1 | Heating | TRUE / FALSE | Heating |
in the 4-pipe system
bEnable | bPipeSystem | T_Room < = Tsetpoint | T_Room > Tsetpoint | interim result | bDewPoint | eCtrlFct |
0 | 1 | 0 | 0 | OFF | TRUE / FALSE | OFF |
1 | 1 | 0 | 1 | Cooling | TRUE | OFF |
FALSE | Cooling | |||||
1 | 1 | 1 | 0 | Heating | TRUE / FALSE | Heating |
1 | 1 | 1 | 1 | Heating | TRUE / FALSE | Heating |
VAR_INPUT
eDataSecurityType: E_HVACDataSecurityType;
bSetDefault : BOOL;
bEnable : BOOL;
bPipeSystem : BOOL;
bFeedbHeatMedium : BOOL;
bFeedbCoolMedium : BOOL;
bDewPoint : BOOL;
rRoomTemp : REAL;
stSetpoint : ST_BARSetpointRoom;
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.
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. |
bSetDefault: If the variable is TRUE, the default values of the VAR_IN_OUT variables are adopted.
bEnable: TRUE enables the function block. If FALSE the function block is disabled and eCtrlFct := eHVACCtrlFct_Off.
bPipeSystem: FALSE means that a 2-pipe system is present. TRUE means that a 4-pipe system is present.
bFeedbHeatMedium: Signal from the power generation or distribution that heating medium is available.
bFeedbCoolMedium: Signal from the power generation or distribution that cooling medium is available.
bDewPoint: the dew point sensor is connected to this input. If this is triggered the cooling control function is deactivated and eCtrlFct := eHVACCtrlFct_Off is set.
rRoomTemp: This input variable transfers the current room temperature to the function block.
stSetpoint: STRUCTURE containing the setpoints for the individual energy levels.
VAR_OUTPUT
eCtrlFct : E_BARCtrlFct;
uiReqHeating : UINT;
uiReqCooling : UINT;
udiRT_ChangeOverDelay: UDINT;
eCtrlFct: This output contains the current control function.
uiReqHeating: is 1 if the room/zone requests heating energy. It is 0 if there is no heating requirement.
uiReqCooling: is 1 if the room/zone requests cooling energy. It is 0 if there is no cooling requirement.
udiRT_ChangeOverDelay: Indicates the time remaining until the active control function is changed over.
VAR_IN_OUT
uiChangeOverDelay : UINT;
uiChangeOverDelay: changeover time between the control functions. Must be specified in seconds. If the input is greater than 0 it will always be observed. The variable must be 0 if there is to be no changeover time between the control functions. The variable is saved persistently. Preset to 0.