FB_HVACHeatingCurve

FB_HVACHeatingCurve 1:

Application

The four-point heating curve serves to determine the setpoint for the flow temperature of a heating circuit, depending on the outside temperature.

For functional reasons, this function block must be used together with FB_HVACSetpointHeating. The reason for this is that the value for the night setback is taken into account in FB_HVACHeatingCurve.

VAR_INPUT

eDataSecurityType : E_HVACDataSecurityType;
bSetDefault       : BOOL;
rOutsideTempDamped: REAL;
bDayOperation     : BOOL;
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: FB_HVACHeatingCurve 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.

bSetDefault: If the variable is TRUE, the default values of the VAR_IN_OUT variables are adopted.

rOutsideTempDamped: this input variable transfers the current damped outside temperature to the function block.

bDayOperation: TRUE = day operation, FALSE = night operation.

bReset: acknowledge input in the event of a fault.

VAR_OUTPUT

rTempSetpoint    : REAL;     0 .. 500      ° C
bInvalidParameter: BOOL;

rTempSetpoint: the calculated setpoint for the flow temperature.

bInvalidParameter: Indicates that an incorrect input parameter is present. bInvalidParameter must be acknowledged with bReset.

VAR_IN_OUT

rMinTemp            : REAL;
rMaxTemp            : REAL;
rNightSetback       : REAL;
rTempSetpoint_Y1    : REAL;
rTempSetpoint_Y2    : REAL;
rTempSetpoint_Y3    : REAL;
rTempSetpoint_Y4    : REAL;
rOutsideTemp_X1     : REAL;
rOutsideTemp_X2     : REAL;
rOutsideTemp_X3     : REAL;
rOutsideTemp_X4     : REAL;     

rMinTemp: the minimum value for the setpoint of the flow temperature is defined by this variable. The variable is saved persistently. Preset to 0.

rMaxTemp: the maximum value for the setpoint of the flow temperature is defined by this variable. The variable is saved persistently. Preset to 500.

rNightSetback: the value for the night setback is specified by this variable. The variable is saved persistently. Preset to 20.

rTempSetpoint_Y1 / rOutsideTemp_X1: the course of point 1 of the heating curve is parameterized by this value pair. The variable is saved persistently. Preset to 20.

rTempSetpoint_Y2 / rOutsideTemp_X2: the course of point 2 of the heating curve is parameterized by this value pair. The variable is saved persistently. Preset to 65 and 0.

rTempSetpoint_Y3 / rOutsideTemp_X3: the course of point 3 of the heating curve is parameterized by this value pair. The variable is saved persistently. Preset to 74 and -10.

rTempSetpoint_Y4 / rOutsideTemp_X4: the course of point 4 of the heating curve is parameterized by this value pair. The variable is saved persistently. Preset to 80 and -20.

Course of the heating characteristic curves

FB_HVACHeatingCurve 3:

Conditions

The following applies to the input of the values:°X1 > X 2 > X3 > X4 and Y1 < Y2 < Y3 < Y4.

Furthermore the minimum value for the setpoint of the flow temperature must be <= rTempSetpoint_Y1 and >= 0. The maximum value for the setpoint of the flow temperature must be >= rTempSetpoint_Y4.

If one of these conditions is not met, the variable bInvalidParameter will be set to TRUE and the default values of the VAR_IN_OUT variables will be adopted.