FB_HVACFreezeProtectionHeater
Application
This function block is for the frost protection monitoring of an air heater in an air conditioning system. Frost protection monitoring takes place both on the air side via a frost protection thermostat and on the water side via a temperature sensor in the heater return flow.
The frost protection program becomes active when the return temperature of the air heater rReturnWaterTemp is lower than the limit value rReturnWaterAlarmLimit or the input bThermostat is FALSE = fault.
For each of these faults, the respective message bAlarmReturnWaterTemp and/or bAlarmThermostat is sent to the output of the function block TRUE. Similarly, the output bAlarmFrost becomes TRUE and the activation of the frost protection program is indicated by a TRUE at the output variable bFrostProtectionRunning.
In order to avoid the air heater freezing up when the frost protection is activated, the heater pump must be switched on and the heater valve compulsorily opened. In many systems this function is implemented not only on the software side, but for reasons of safety on the hardware side also by means of a relay circuit in the control cabinet. In the normal case the frost protection relay is self-latched, since the frost protection circuit is based on the quiescent current principle. Following an error the frost protection relay is normally brought back to its self-latched state by a reset button on the control cabinet. This function is implemented automatically by means of a short pulse at the output bHardwareReset. The condition for this is that the frost protection thermostat has returned to its normal state, the temperature in the return flow of the heater has reached the value of rReturnWaterNormalLimit and the time tDelayFirstWarning has elapsed.
After the system has restarted after an automatic acknowledgement, the timer tMonitoringAfterReset is started.
If another frost warning occurs within this time, the output bAlarmFrost becomes TRUE again. It is only possible to reset the frost alarm by means of a rising edge at the input bReset.
VAR_INPUT
eDataSecurityType : E_HVACDataSecurityType;
bSetDefault : BOOL;
bThermostat : BOOL;
rReturnWaterTemp : REAL;
bCtrlVoltage : 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: 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.
bThermostat: signal from the frost protection thermostat. In the normal case TRUE.
rReturnWaterTemp: water temperature in the return flow of the air heater.
bCtrlVoltage:control voltage monitoring. If control voltage is present bCtrlVoltage = TRUE.
bReset: acknowledge input in the event of a fault.
VAR_OUTPUT
byState : BYTE;
bFrostProtecRunning : BOOL;
bHardwareReset : BOOL;
bErrorGeneral : BOOL;
bAlarmFrost : BOOL;
bAlarmReturnWaterTemp: BOOL;
bAlarmThermostat : BOOL;
byError : BYTE;
bInvalidParameter : BOOL;
byState: output of the state as a byte.
byState.0 := bFrostProtecRunning;
byState.1 := bHardwareReset;
byState.2 := bThermostat;
byState.7 := bCtrlVoltage;
bFrostProtecRunning: TRUE, if the frost protection program is active.
bHardwareReset: output that indicates with a 1s pulse that the frost protection relay is latched again following an error.
bErrorGeneral: there is a general error.
bAlarmFrost: TRUE if there is a frost warning.
bAlarmReturnWaterTemp: the water temperature limit in the return flow of the air heater was undershot.
bAlarmThermostat: TRUE if there is an error in the frost protection thermostat.
byError: output of the error as a byte.
byError.1 := bInvalidParameter;
byError.2 := bErrorGeneral;
byError.3 := bAlarmFrost;
byError.4 := bAlarmReturnWaterTemp;
byError.5 := bAlarmThermostat;
bInvalidParameter: Indicates that an incorrect input parameter is present. bInvalidParameter must be acknowledged with bReset.
VAR_IN_OUT
rReturnWaterAlarmLimit : REAL;
rReturnWaterNormalLimit : REAL;
tDelayHardwareReset : TIME;
tMonitoringAfterReset : TIME;
rReturnWaterAlarmLimit: the frost alarm is activated below the temperature value rReturnWaterAlarmLimit in the return flow of the air heater (0°C..22°C). The variable is saved persistently.
rReturnWaterNormalLimit: the air heater returns to its normal state when the temperature is once again above bReturnWaterNormalLimit
following the temperature having been undershot (0 °C..70 °C). The variable is saved persistently.
tDelayHardwareReset: time that elapses, after input, between the input of the frost error and output of an acknowledgement pulse in order to return the system to normal operation. The variable is saved persistently.
tMonitoringAfterReset: monitoring time after the first frost warning. The variable is saved persistently.