FB_HVACStartAirConditioning

FB_HVACStartAirConditioning 1:

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 with hot water before the outside and exhaust air dampers are opened. In air handling units 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 continues until the timer tPreRinseMaxTime elapses. 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 active when the system is switched off, the ramp-down times of frequency converters must also be taken into account!
The output bErrorDampers becomes TRUE if no feedback is received from the damper drives within the set time. 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 tDelayLimitCtrl has elapsed, the output bEnableLimitCtrl is enabled and, hence, 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 applied to the output the same as that of iStartSeqWinter. 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 becomes active in the case of operation requests from the automatic programs, the scheduler activates, summer night cooling, support operation and overheating protection.
In order to activate the sequence controllers, the enumeration variable eModeSeqCtrl at the output of the function block is set 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.

- Deactivate limit monitoring at the analog inputs
- Deactivate the controllers (reset iCurrentSequence to 0)
- Switch off the fans
- Close the dampers after the timer tDelaySupplyVent has elapsed.

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 pre-heater 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 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: A collection of all VAC system error messages that lead to the system switching off can be applied to this input.

bReset: Input for acknowledging the 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 (see E_HVACSequenceCtrlMode).

bPreRinse: TRUE if the pre-rinsing procedure is active.

bDampersOpen: If TRUE, then the outside and exhaust air dampers are open.

bSupplyVentilation: Switches on the supply air fan if TRUE.

bExhaustVentilation: Switches on the exhaust air fan if TRUE.

bStartPIDControllers: Enables the controllers.

bEnableLimitCtrl: After the timer tDelayLimitCtrl has elapsed, the output bEnableLimitCtrl is enabled and, hence, 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 there is an incorrect input parameter. 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 (see E_HVACConvectionMode). 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 duration of the pre-rinsing procedure. 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.

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