FB_HVACFreezeProtectionHeater

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 is activated if the return flow temperature of the air heater rReturnWaterTemp is lower than the limit value rReturnWaterAlarmLimit or if the input bThermostat is FALSE = error.
For each of these errors, the respective message bAlarmReturnWaterTemp and/or bAlarmThermostat at the output of the function block is 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 a fault 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.
Once the system has restarted following an automatic reset, the timer tMonitoringAfterReset is started.
If another frost warning occurs during 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 monitor. If control voltage is present bCtrlVoltage = TRUE.
bReset: Input for acknowledging the fault.
VAR_OUTPUT
byState : BYTE;
bFrostProtecRunning : BOOL;
bHardwareReset : BOOL;
bErrorGeneral : 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 1 s pulse that the frost protection relay is self-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 there is an incorrect input parameter. 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 a reset 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.
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 |