FB_HVACSummerCompensation

FB_HVACSummerCompensation 1:

This function block is a setpoint 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: = 6K

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).

The set differential value between outside temperature and room temperature rSetpointShiftAbsolute: = 6K

outside temperature rOutsideTemp: = 28 °C

eExternalMode:= eHVACExternalMode_On

eSetpointMode:= eHVACSetpointMode_DIN

calculated room temperature setpoint rSetpointOut:= 20°C

Example III:

Room setpoint rSetpointIn: = 23 °C

external setpoint rSetpointExternal: = -3K (e.g. +/- 3K can be set via a potentiometer).

The set differential value between outside temperature and room temperature rSetpointShiftAbsolute: = 6K

outside temperature rOutsideTemp: = 34 °C

rSetpointHighLimit: = 35 °C

eExternalMode:= eHVACExternalMode_On

eSetpointMode:= eHVACSetpointMode_DINLimited

calculated room temperature setpoint rSetpointOut:= 31°C

Example IV:

Room setpoint rSetpointIn: = 24 °C

external setpoint rSetpointExternal: = -3K (e.g. +/- 3K can be set via a potentiometer).

The set differential value between outside temperature and room temperature rSetpointShiftAbsolute: = 6K

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: Setpoint for the room.

bInvalidParameter: Indicates that there is an incorrect input parameter. 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 external setpoint is activated/deactivated via the enum E_HVACExternalMode (see E_HVACExternalMode).
eHVACExternalMode_Off
means that the external setpoint set via the potentiometer on the control panel is deactivated.
eHVACExternaMode_On
means that the external setpoint is activated, e.g. +/- 3 °C
eHVACExternalMode_ShiftAbsolut corresponds to an absolute external setpoint in °C

eSetpointMode: Enum that specifies the type of setpoint determination (see E_HVACSetpointMode).

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.

  1. According to DIN (eHVACSetpointMode_DIN). The room temperature setpoint follows the outside temperature, guided by a difference.
  2. Limited (eHVACSetpointMode_DINLimited). The room temperature setpoint follows the outside temperature, guided by a difference. However, it is limited. The limit value is rSetpointHighLimit.
  3. Constant (eHVACSetpointMode_ConstantValueBase). The room temperature setpoint is specified as a constant value; the outside temperature does not exert any influence.

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