FB_HVACSummerNightCooling

FB_HVACSummerNightCooling 1:

With this function block, rooms that were heated up on the day before can be cooled down during the night using cool outside air. The summer night cooling function serves to improve the quality of the air and to save electrical energy. Electrical energy for cooling is saved during the first hours of the next summer day.

The start conditions for the summer night cooling are defined by parameterizing the FB_HVACSummerNightCooling function block. The function block can be used to open motor-driven windows or to switch air conditioning systems to summer night cooling mode outside their normal hours of operation. Summer night cooling mode is active if the output variable bOn is TRUE.

The following conditions must be met for activation of summer night cooling:
- bEnable = TRUE
- rOutsideTemp > (rMinimumOutsideTemp + 0.2K)
- ((rRoomTemp - rOutsideTemp) > rDifferOutsideRoomTempOn)
- ((rRoomTemp - rSetpointRoomTemp) > rDifferRoomSetpointTemp)
- the system time dtSystemtime must be within the timeframe todStartTime to 12 noon

For the deactivation of summer night cooling bOn = FALSE it is sufficient if one of the following condition is met:
- bEnable = FALSE
- (rOutsideTemp < (rMinimumOutsideTemp - 0.2K))
- ((rRoomTemp - rOutsideTemp) < rDifferOutsideRoomTempOff)
- the system time dtSystemtime lies outside the timeframe of todStartTime to 12 noon
- summer night cooling was active for the maximum time tMaxRuntime within the timeframe between todStartTime and 12 noon. Summer night cooling can be switched on several times within this timeframe.

VAR_INPUT

eDataSecurityType   : E_HVACDataSecurityType;
bSetDefault         : BOOL;
bEnable             : BOOL;
rOutsideTemp        : REAL;
rRoomTemp           : REAL;
rSetpointRoomTemp   : REAL;
dtSystemTime        : DT;
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.

rOutsideTemp: Input for the outside temperature.

rRoomTemp: Input for the room temperature.

rSetpointRoomTemp: Setpoint of the room temperature

dtSystemTime: This variable transfers the computer system time to the function block.

bReset: Acknowledge input in the event of a fault.

VAR_OUTPUT

bOn                 : BOOL;
bInvalidParameter   : BOOL;

bOn: If bOn = TRUE summer night cooling is active.
The following conditions must be met for activation of summer night cooling:
bEnable = TRUE AND rOutsideTemp > (rMinimumOutsideTemp + 0.2K) AND ((rRoomTemp - rOutsideTemp) > rDifferOutsideRoomTempOn) AND
((rRoomTemp - rSetpointRoomTemp) > rDifferRoomSetpointTemp) AND the system time dtSystemtime must lie within the timeframe todStartTime to 12 noon.

For the deactivation of summer night cooling bOn = FALSE it is sufficient if one of the following condition is met:
bEnable = FALSE OR (rOutsideTemp < (rMinimumOutsideTemp - 0.2K)) OR ((rRoomTemp - rOutsideTemp) < rDifferOutsideRoomTempOff) OR the system time dtSystemtime lies outside the timeframe of todStartTime to 12 noon OR the summer night cooling had been active for the specified maximum time tMaxRuntime within the timeframe of todStartTime to 12 noon. Summer night cooling can be switched on several times within this timeframe.

bInvalidParameter: Indicates that there is an incorrect input parameter. bInvalidParameter must be acknowledged with bReset.

VAR_IN_OUT

rMinimumOutsideTemp       : REAL;
rDifferOutsideRoomTempOn  : REAL;
rDifferOutsideRoomTempOff : REAL;
rDifferRoomSetpointTemp   : REAL;
todStartTime              : TOD;
tMaxRuntime               : TIME;

rMinimumOutsideTemp: If the outside temperature rOutsideTemp falls below the limit value (rMinimumOutsideTemp - 0.2 K), the summer night cooling function is disabled, i.e. bOn = FALSE. If the outside temperature rOutsideTemp exceeds the limit value (rMinimumOutsideTemp + 0.2K), then one of the conditions for activating the summer night cooling bOn = TRUE is satisfied (4..100). The variable is saved persistently. Preset to 10 °C.

rMinimumOutsideTemp must be within the specified range.
If an incorrect variable value is present, then the last valid variable value, if one, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter is set in the case of an incorrect parameter specification.

rDifferOutsideRoomTempOn: The difference rRoomTemp - rOutsideTemp must be greater than the value of rDifferOutsideRoomTempOn so that one of the conditions for activating the summer night cooling bOn = TRUE is satisfied (0..100).
((rRoomTemp - rOutsideTemp) > rDifferOutsideRoomTempOn)

rDifferOutsideRoomTempOn must be 0.4 K higher than rDifferOutsideRoomTempOff. Furthermore rDifferOutsideRoomTempOn must be within its specified range.
If an incorrect variable value is present, then the last valid variable value, if one, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter is set in the case of an incorrect parameter specification.

The variable is saved persistently. Preset to 5 °C.

rDifferOutsideRoomTempOff: The difference rRoomTemp - rOutsideTemp must be less than the absolute value of rDifferOutsideRoomTempOff for summer night cooling to be disabled (bOn = FALSE).
((rRoomTemp - rOutsideTemp) < rDifferOutsideRoomTempOff)

rDifferOutsideRoomTempOff must be 0.4 K lower than rDifferOutsideRoomTempOn. In addition, rDifferOutsideRoomTempOff must lie within its range (0..100).
If an incorrect variable value is present, then the last valid variable value, if one, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter is set in the case of an incorrect parameter specification. The variable is saved persistently. Preset to 2 °C.

rDifferRoomSetpointTemp: The room temperature must exceed the room temperature setpoint by this value to meet one of the conditions for activation of summer night cooling (bOn = TRUE).
((rRoomTemp - rSetpointRoomTemp) > rDifferRoomSetpointTemp)

rDifferRoomSetpointTemp must lie within its range (0..100).
If an incorrect variable value is present, then the last valid variable value, if one, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter is set in the case of an incorrect parameter specification.

The variable is saved persistently. Preset to 2 °C.

todStartTime: Start time for the timeframe within which the summer night cooling can be activated (0..24). The timeframe for enabling summer night cooling starts with todStartTime and ends at 12 noon.

todStartTime must be within its specified range.
If an incorrect variable value is present, then the last valid variable value, if one, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter is set in the case of an incorrect parameter specification. The variable is saved persistently. Preset to 2 o'clock.

tMaxRuntime: Maximum runtime of the summer night cooling function within the timeframe between todStartTime and 12 noon (>0s). Summer night cooling can be switched on several times within this timeframe, but the total time cannot exceed tMaxRuntime.

tMaxRuntime must be greater than T#0s.
If an incorrect variable value is present, then the last valid variable value, if one, will be taken. If there is no valid last value, operation continues with the default value. bInvalidParameter is set in the case of an incorrect parameter specification. The variable is saved persistently. Preset to 20 min.

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