FB_HVACSummerCompensation
Application
This function block is a set value generator for the exhaust air temperature or room temperature of an air conditioning system. With the aid of this summer compensation, overly large temperature differences between the outside temperature and the exhaust air/room temperature are avoided. This helps to save energy whilst at the same time increasing comfort.
If the outside temperature increases to the point where the difference between it and the room temperature is greater than the set difference of rSetpointShiftAbsolute, then the room temperature setpoint (rSetpointOut) is raised. The permissible difference can be set from 0 to 10 Kelvin.
A check is performed in the function block that the maximum room temperature setpoint is not exceeded if eSetpointMode:= eHVACSetpointMode_DINLimited.
Example I:
Room setpoint (rSetpointIn):= 21 °C
external setpoint (rSetpointExternal):= 2K (e.g. +/- 3K can be set via a potentiometer, but are not taken into account because eExternalMode:= eHVACExternalMode_Off)
set differential value between outside temperature and room temperature (rSetpointShiftAbsolute):= 6 K
Outside temperature (rOutsideTemp):= 28°C
eExternalMode:= eHVACExternalMode_Off
eSetpointMode:= eHVACSetpointMode_DIN
calculated room temperature setpoint (rSetpointOut):= 22
Example II:
Room setpoint (rSetpointIn):= 20 °C
external setpoint (rSetpointExternal):= -2K (e.g. +/- 3K can be set via a potentiometer)
set differential value between outside temperature and room temperature (rSetpointShiftAbsolute):= 6 K
Outside temperature (rOutsideTemp):= 28°C
eExternalMode:= eHVACExternalMode_On
eSetpointMode:= eHVACSetpointMode_DIN
calculated room temperature setpoint (rSetpointOut):= 20
Example III:
Room setpoint (rSetpointIn):= 23 °C
external setpoint (rSetpointExternal):= 3K (e.g. +/- 3K can be set via a potentiometer)
set differential value between outside temperature and room temperature (rSetpointShiftAbsolute):= 6 K
Outside temperature (rOutsideTemp):= 34°C
rSetpointHighLimit:= 35°C
eExternalMode:= eHVACExternalMode_On
eSetpointMode:= eHVACSetpointMode_DINLimited
calculated room temperature setpoint (rSetpointOut):= 31
Example IV:
Room setpoint (rSetpointIn):= 24 °C
external setpoint (rSetpointExternal):= 3K (e.g. +/- 3K can be set via a potentiometer)
set differential value between outside temperature and room temperature (rSetpointShiftAbsolute):= 6 K
Outside temperature (rOutsideTemp):= 36°C
rSetpointHighLimit:= 30°C
eExternalMode:= eHVACExternalMode_On
eSetpointMode:= eHVACSetpointMode_DINLimited
calculated room temperature setpoint := 31 °C, but is limited to 30 °C on account of rSetpointHighLimit being set to 30 °C ==> rSetpointOut:=30 °C
VAR_INPUT
eDataSecurityType : E_HVACDataSecurityType;
bSetDefault : BOOL;
rSetpointIn : REAL;
rSetpointExternal : REAL;
rOutsideTemp : REAL;
bReset : 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. |
bSetDefault: If the variable is TRUE, the default values of the VAR_IN_OUT variables are adopted.
rSetpointIn: the setpoint for the room is applied to this input.
rSetpointExternal: the setpoint adjustment or correction, e.g. from a potentiometer, is applied to this input.
rOutsideTemp: input for the outside temperature.
bReset: acknowledge input in the event of a fault.
VAR_OUTPUT
rSetpointOut : REAL;
bInvalidParameter : BOOL;
rSetpointOut: calculated room temperature setpoint.
bInvalidParameter: Indicates that an incorrect input parameter is present. bInvalidParameter must be acknowledged with bReset.
VAR_IN_OUT
rSetpointHighLimit : REAL;
rSetpointShiftAbsolute : REAL;
eExternalMode : E_HVACExternalMode;
eSetpointMode : E_HVACSetpointMode;
rSetpointHighLimit: upper limit for the room temperature setpoint (0°C..100°C). The variable is saved persistently. Preset to 35.
rSetpointShiftAbsolute: parameter value that defines the permissible difference between the outside temperature and the room temperature. The permissible difference can be set from 0 to 10 Kelvin. If the difference between the outside temperature and the room temperature is greater than the set parameter value, the room temperature setpoint is raised. The variable is saved persistently. Preset to 6.
eExternalMode: the ENUM E_HVACExternalMode is used to activate/deactivate the external setpoint specification.
eHVACExternalMode_Off, corresponds to the external setpoint specification via potentiometer in the panel being deactivated.
eHVACExternaMode_On, corresponds to the external setpoint specification being activated, e.g. +/- 3 °C
eHVACExternalMode_ShiftAbsolut, corresponds to external setpoint specification absolute in °C
eSetpointMode: Enum that specifies the type of setpoint determination.
This increase of the setpoint in the case of high outside temperatures can be unlimited or limited according to DIN. Selection takes place with the ENUM E_HVACSetpointMode. Besides these two modes for summer compensation it is also possible to specify a fixed setpoint.
- According to DIN (eHVACSetpointMode_DIN). The room temperature setpoint follows the outside temperature, guided by a difference.
- Limited (eHVACSetpointMode_DINLimited). The room temperature setpoint follows the outside temperature, guided by a difference. However, it is limited. The limit value is rSetpointHighLimit.
- Constant (eHVACSetpointMode_ConstantValueBase). The room temperature setpoint is specified as a constant value; the outside temperature does not exert any influence.