FB_HVACAirConditioning2Speed

FB_HVACAirConditioning2Speed 1:

The function block FB_HVACAirConditioning2Speed controls switching to the second stage of air conditioning systems with two-speed fans. Switching to the second stage via the output variable bSpeed2 can be performed either by a scheduler via the input variable bTimeScheduler or load-dependent via a difference between the setpoint of the room or exhaust temperature, rSetpoint, and the actual value of the room or exhaust temperature, rActualValue, depending on the time delays tDelayHysteresisOn/tDelayHysteresisOff, the switch-on and release hystereses rHysteresisOn/rHysteresisOff and the setting of the operation mode via the Enum eAirConditioning2SpeedMode.

VAR_INPUT

eDataSecurityType   : E_HVACDataSecurityType;
bSetDefault         : BOOL;
bEnable             : BOOL; 
bTimeScheduler      : BOOL;
rSetpoint           : REAL;
rActualValue        : REAL;
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.

bEnable: The function block is enabled by the PLC program with the input variable bEnable= TRUE. The output variable bSpeed2 is FALSE if the function block is not enabled.

bTimeScheduler: Request by a timer program for the second fan stage. If bEnable and bTimeScheduler are TRUE, then bSpeed2 and bRequestScheduler are also TRUE.

rSetpoint: Setpoint of room or exhaust temperature

rActualValue: actual value of room air or exhaust air temperature

bReset: Input for acknowledging an incorrect parameter entry or an error via a rising edge.

VAR_OUTPUT

bSpeed2                     : BOOL;
bRequestScheduler           : BOOL;
bRequestTemperature         : BOOL;
bInvalidParameter           : BOOL;

bSpeed2: Output for controlling the second fan speed.

bRequestScheduler: Request for the second fan speed via the input variable bTimeScheduler.

bRequestTemperature: Request for the second stage, depending on the load, via a difference between the setpoint of the room or exhaust temperature, rSetpoint, and the actual value of the room or exhaust temperature, rActualValue, depending on the time delays tDelayHysteresisOn/tDelayHysteresisOff, the switch-on and release hystereses rHysteresisOn/rHysteresisOff and the setting of the operating mode via the Enum eAirConditioning2SpeedMode.

bInvalidParameter: Indicates that an incorrect parameter is present at one of the variables rHysteresisOn , rHysteresisOff and eAirConditioning2SpeedMode. An incorrect parameter entry does not lead to a standstill of the block; see description of variables. After rectifying the incorrect parameter entry, the message bInvalidParameter must be acknowledged via bReset.

VAR_IN_OUT

rHysteresisOn              : REAL;
rHysteresisOff             : REAL;
tDelayHyteresisOn          : TIME;
tDelayHyteresisOff         : TIME;
eAirConditioning2SpeedMode : E_HVACAirConditioning2SpeedMode;

rHysteresisOn: Parameter to switch on the second fan stage via a hysteresis loop, load-dependent, via the output variable bSpeed2 depending on the enum eAirConditioning2SpeedMode (0..1000). rHysteresisOn must be larger than rHysteresisOff if the operation mode eAirConditioning2SpeedMode=eHVACAirConditioning2SpeedModeHeatingAndCooling.
If no correct variable value is present, then the last valid variable value, if one exists, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter will be set in the event of an incorrect parameter entry; the function block continues to work normally. The variable is saved persistently. Preset to 5.

rHysteresisOff: Parameter to switch off the second fan stage via a hysteresis loop, load-dependent, via the output variable bSpeed2 depending on the enum eAirConditioning2SpeedMode (0..1000).
If no correct variable value is present, then the last valid variable value, if one exists, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter will be set in the event of an incorrect parameter entry; the function block continues to work normally. The variable is saved persistently. Preset to 1.

tDelayHysteresisOn: Switch-on delay of the output variable bSpeed2 in the event of a load-dependent request for the second fan stage. The variable is saved persistently. Preset to 300 s.

tDelayHysteresisOff: Switch-off delay of the output variable bSpeed2 in the event of a load-dependent request for the second fan stage. The variable is saved persistently. Preset to 300 s.

eAirConditioning2SpeedMode: Enum that specifies the load-dependent operation mode for switching on the second fan stage via the output variable bSpeed2 (see E_HVACAirConditioning2SpeedMode).
eAirConditioning2SpeedMode = eHVACAirConditioning2SpeedMode_Off: Operation mode off
eAirConditioning2SpeedMode = eHVACAirConditioning2SpeedMode_Heating: Heating operation mode. This is an air conditioning system with heating operation only.
eAirConditioning2SpeedMode = eHVACAirConditioning2SpeedMode_Cooling: Cooling operation mode. This is an air conditioning system with cooling operation only.
eAirConditioning2SpeedMode = eHVACAirConditioning2SpeedMode_HeatingAndCooling: Heating and cooling operation mode. This is an air conditioning system with heating and cooling operation. The variable is saved persistently. Preset to 1.

Operating mode eAirConditioning2SpeedMode = eHVACAirConditioning2SpeedMode_Heating

FB_HVACAirConditioning2Speed 2:

Operating mode eAirConditioning2SpeedMode = eHVACAirConditioning2SpeedMode_Cooling

FB_HVACAirConditioning2Speed 3:

Operating mode eAirConditioning2SpeedMode = eHVACAirConditioning2SpeedMode_HeatingAndCooling

FB_HVACAirConditioning2Speed 4:

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