FB_HVACStartAirConditioning
Application
The air conditioning system is started up stepwise with the start program FB_HVACStartAirConditioning. The shut-off dampers, the fans, the controller and the limit value monitoring of the analog inputs are thereby enabled one after the other.
In the case of low outside temperatures below the value of rPreRinseOutsideTemp, the heating coil is initially rinsed through with hot water before the outside and exhaust air dampers are opened. In VAC-systems with a temperature sensor in the return flow from the heating coil, the rinsing procedure continues until the temperature rReturnWaterTemp has exceeded the value of the input variable rPreRinseLimitTemp. The outside and exhaust air dampers are opened when the specified temperature in the return flow from the air heater is reached. If the temperature is not exceeded after the timer tPreRinseMaxTime has elapsed, the fault is indicated by a TRUE at the output bErrorNoHotWater.
If there is no temperature sensor in the return flow from the heater, a constant of -100 is applied to the input rReturnWaterTemp. The function block FB_HVACStartAirConditioning then knows that the pre-rinse procedure must be executed without return flow monitoring. In this case, rinsing is performed until the timer tPreRinseMaxTime expires. Hence, there is no monitoring of the rinsing procedure!
The outside and exhaust air dampers are opened after completion of the pre-rinsing procedure. The output bDampersOpen becomes TRUE as a result.
In order to avoid damage to the air ducts and the dampers, the start-up of the fans is delayed until the feedback "Open" from the dampers is present at the input bDampersFeedbOpen. In addition the timer tDelaySupplyVent must have elapsed. The set time must be longer than the stroke time of the damper drive.
Since this timer is also effective when the plant is switched off, shutdown ramps of frequency converters must also be taken into account!
If there is no feedback from the damper drives within the set time, the output bErrorDampersbecomes TRUE. In order to avoid high start-up currents, the switching on of the exhaust air fan is delayed by the timer tDelayExhaustVent.
In systems with a mixed air chamber it makes sense to enable the controller only after the supply air temperature rSupplyAirTemp has reached approximately the value of the exhaust air temperature. The maximum deviation is specified by the parameter rDifferenceTemp. In systems without a mixed air system a very large value is simply entered here as a constant, e.g. 100. The controller is then enabled without a delay.
After the timer tDelayLimitCtrlhas expired, the output bEnableLimitCtrlis enabled and thus the limit value monitoring of the analog inputs is activated.
If the outside temperature lies below the value of rPreRinseOutsideTemp, the value of iCurrentSequence is set equal to that of iStartSeqWinter at the output. The number of the pre-heater controller must be entered here (see the chapter on sequence controllers). (See the chapter on sequence controllers). If the outside temperature is higher than rPreRinseOutsideTemp, start-up can commence with the heat recovery unit or the mixed air chamber. Hence, the number of the sequence controller for the mixed air chamber or for the heat recovery unit is entered at the input iStartSeqSummer.
The start-up circuit becomes active in the event of operating requirements of the automatic programs, the time schedules, summer night cooling, back-up operation and overheating protection.
To control the sequence controllers, the enumeration variable eModeSeqCtrlis set at the output of the function block as follows:
TYPE E_HVACSequenceCtrlMode :
(
eHVACSequenceCtrlMode_Stop := 0,
eHVACSequenceCtrlMode_On := 1,
eHVACSequenceCtrlMode_NightCooling := 2,
eHVACSequenceCtrlMode_FreezeProtection := 3,
eHVACSequenceCtrlMode_OverheatingProtection := 4,
eHVACSequenceCtrlMode_NightCoolingAndOverheatingProtection := 5
);
END_TYPE
Requests from all automatic programs are transferred to the system start program via the input variables bTimeScheduler, bNightCooling, bFreezeProtec and bOverHeatingProtec. Requests from retention functions are only applied if there is no request from a timer program at the input variable bTimeScheduler.
The programs for summer night cooling (bNightCooling), cooling protection (bFreezeProtect) and overheating protection (bOverHeatingProtec) are only usable if a room temperature sensor is used in place of an exhaust air temperature sensor. The cooling protection program always has priority over the other automatic programs unless the operation request from the timer program is present.
Since summer night cooling can take place as forced ventilation with fans or as convection ventilation without fans, the command from the program FB_HVACSummerNightCooling is transferred with the counter variable E_HVACConvectionMode. This output must be applied to the input variable eConvection.
A collection of all air conditioning system error messages that lead to the system switching off is applied to the input bEmergencyStop.
When the air conditioning system is switched off, the order of the switch-on steps is reversed.
- Deactivating the limit monitoring at the analog inputs
- Deactivating the controllers ( resetting iCurrentSequence:= 0 )
- Switching off the fans
- Closing the dampers after the timer has expired tDelaySupplyVent.
VAR_INPUT
eDataSecurityType : E_HVACDataSecurityType;
bSetDefault : BOOL;
iStartSeqWinter : INT;
iStartSeqSummer : INT;
bTimeScheduler : BOOL;
bNightCooling : BOOL;
bFreezeProtec : BOOL;
bOverHeatingProtec : BOOL;
rOutsideTemp : REAL;
rReturnWaterTemp : REAL;
rSupplyAirTemp : REAL;
rReturnAirTemp : REAL;
bDampersFeedbOpen : BOOL;
bEmergencyStop : 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.
iStartSeqWinter: the number of the sequence controller for the preheater must be entered here.
iStartSeqSummer: the number of the sequence controller for the mixed air chamber or for the heat recovery unit must be entered here.
bTimeScheduler: input for the timer switch command.
bNightCooling: input for the night cooling function.
bFreezeProtec: input for the frost protection function.
bOverHeatingProtec: input for the overheating protection function.
rOutsideTemp: input for the outside temperature.
rReturnWaterTemp: input for the water temperature from the return flow of the air heater.
rSupplyAirTemp: input for the supply air temperature.
rReturnAirTemp: input for the room temperature or the exhaust air temperature.
bDampersFeedbOpen: input for the feedback from the dampers.
bEmergencyStop: this input can be used to create a collection of all fault messages of the VAC system, which then lead to the emergency shutdown of the system.
bReset: acknowledge input in the event of a fault.
VAR_OUTPUT
eModeSeqCtrl : E_HVACSequenceCtrlMode;
bPreRinse : BOOL;
bDampersOpen : BOOL;
bSupplyVentilation : BOOL;
bExhaustVentilation : BOOL;
bStartPIDControllers: BOOL;
bEnableLimitCtrl : BOOL;
bErrorGeneral : BOOL;
bErrorNoHotWater : BOOL;
bErrorDampers : BOOL;
byError : BYTE;
bInvalidParameter : BOOL;
eModeSeqCtrl: Enum that notifies the operation request.
bPreRinse: TRUE if the pre-rinsing procedure is active.
bDampersOpen: if TRUE, then the outside and exhaust air dampers are open.
bSupplyVentilation: switch on supply air fan if TRUE.
bExhaustVentilation: switch on exhaust air fan if TRUE.
bStartPIDControllers: enable control.
bEnableLimitCtrl: after the timer tDelayLimitCtrlhas expired, the output bEnableLimitCtrlis enabled and thus the limit value monitoring of the analog inputs is activated.
bErrorGeneral: there is a general error.
bErrorNoHotWater: is set to TRUE if the rinsing procedure has ended and the set temperature in the return flow has not been reached.
bErrorDampers: there is an error in the dampers.
byError: output of the error as a byte.
byError.1:= bInvalidParameter;
byError.2:= bErrorGeneral;
byError.3:= bErrorNoHotWater;
byError.4:= bErrorDampers;
bInvalidParameter: Indicates that an incorrect input parameter is present. bInvalidParameter must be acknowledged with bReset.
VAR_IN_OUT
eConvection : E_HVACConvectionMode;
tDelaySupplyVent : TIME;
tDelayExhaustVent : TIME;
tDelayTempCtrl : TIME;
rDifferenceTemp : REAL;
tDelayLimitCtrl : TIME;
rPreRinseOutsideTemp : REAL;
rPreRinseLimitTemp : REAL;
tPreRinseMaxTime : TIME;
iCurrentSequence : INT;
eConvection: ENUM via which summer night cooling can take place as forced ventilation with fans or as convection ventilation without fans.
TYPE E_HVACConvectionMode :
(
eHVACConvectionMode_WithFan := 0,
eHVACConvectionMode_WithoutFan := 1
);
END_TYPE
The variable is saved persistently. Preset to 1.
tDelaySupplyVent: time delay that delays the start-up of the supply air fans. The variable is saved persistently. Preset to 120 s.
tDelayExhaustVent: time delay that delays the start-up of the exhaust air fans. The variable is saved persistently. Preset to 5 s.
tDelayTempCtrl: time delay for the controller. The variable is saved persistently. Preset to 10 s.
rDifferenceTemp: the controller is enabled if the difference between the room temperature and the supply air temperature is smaller than rDifferenceTemp. The variable is saved persistently. Preset to 5 K.
tDelayLimitCtrl: time delay before limit monitoring of the temperature sensors is enabled. See the variable bEnableLimitCtrl in FB_HVACTemperature regarding this point. The variable is saved persistently. Preset to 360 s.
rPreRinseOutsideTemp: outside temperature below which the VAC system should start up with the prerinsing of the heating coil. The variable is saved persistently. Preset to 10 K.
rPreRinseLimitTemp: temperature of the return flow from the heating coil that must be reached in order to end the pre-rinsing procedure and continue with the opening of the dampers. The variable is saved persistently. Preset to 30 K.
tPreRinseMaxTime: maximum time of the pre-rinse process. The variable is saved persistently. Preset to 300 s.
iCurrentSequence: the starting controller at controller enable is specified here. The value is written by the start program in one cycle only, since afterwards in system operation this parameter must be freely writeable again for the switching on or off of the sequence controllers. The variable is saved persistently.