FB_HVACAirConditioning2Speed
Application
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 schedule 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 switch-off 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 air temperature
rActualValue: actual value of room 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 stage.
bRequestScheduler: request for the second fan stage 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 air temperature rSetpoint and the actual value of the room or exhaust air temperature rActualValue depending on the time delays tDelayHysteresisOn/tDelayHysteresisOff , the switch-on and switch-off hystereses rHysteresisOn/rHysteresisOff and the setting of the 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 function 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: 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 greater than rHysteresisOff, if the operation mode is eAirConditioning2SpeedMode=eHVACAirConditioning2SpeedModeHeatingAndCooling.
If an incorrect variable value is present, the last valid variable value, if available, is used. If there is no valid last value, then the default value is used. bInvalidParameter will be set in the event of an incorrect parameter entry. The function block continues to operate 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 an incorrect variable value is present, the last valid variable value, if available, is used. If there is no valid last value, then the default value is used. bInvalidParameter will be set in the event of an incorrect parameter entry. The function block continues to operate 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 used to specify the load-dependent operation mode for switching on the second fan stage via the output variable bSpeed2.
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.