FB_HVACRedundancyCtrlEx

FB_HVACRedundancyCtrlEx 1:

This function block serves to control a certain number of actuators, e.g. of pumps, from a pool of 8 actuators. From all enabled actuators, the logic searches for those with the shortest runtimes and switches them on according to the runtime order. This continues until the number specified via iCountCtrl is reached. The actuators are routed internally via a FIFO memory so that they can be switched off again in the same order. Changeover during operation can take place with the time specification uiMaxOnLevel, a change of iCountCtrl or by the trigger bForceChange. The actuator that has been switched on longest is switched off, and the one with the shortest runtime is switched on. In order to avoid a hydraulic stroke in the pumps, an overlap time can be set via tOverlap1Actuator. This applies only to cases where an exchange between two actuators takes place.
In contrast to FB_HVACRedundancyCtrl no internal timer is used for determining the runtimes. Instead, the times have to be specified externally as hourly values via Var_Input.

VAR_INPUT

eDataSecurityType       : E_HVACDataSecurityType;
bSetDefault             : BOOL;
iCountCtrl              : INT;
bEn1 - bEn8             : BOOL;
bFeedBack1 - bFeedBack8 : BOOL;
bForceChange            : BOOL;
rHours1-rHours8         : REAL;

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.

iCountCtrl: Number of actuators to be switched on (0..8). A change in the sequence of the actuators to be switched on is created by a change of iCountCtrl.

bEn1 - 8: Enables the corresponding actuator.

bFeedBack1 - 8: Operating feedback from the actuator. Evaluation only takes place if tNoFeedbActuator > t#0s.

bForceChange:  A positive edge at the input switches off the first actuator in the FIFO and switches on the actuator from the pool that has the shortest runtime.

rHours: Operating hours

VAR_OUTPUT

bQ1 - bQ8         : BOOL;
arrFiFo           : Array[1..8] of INT;
eErrorCode        : E_HVACErrorCodes;
bErrorGeneral     : BOOL;
bInvalidParameter : BOOL;

bQ1 - 8: Actuator feedback.

arrFiFo: Table containing the information showing which actuator is switched on (actuator number). The order specifies the switch-off sequence. arrFiFo[1] = no. of the actuator that will be switched off next.

eErrorCode: Indicates which actuator has not returned an operating feedback within the prespecified time interval (see E_HVACErrorCodes). The recognition of this group of errors is activated by a time greater than 0 in the variable tNoFeedbActuator.
eHVACErrorCodes_Error_NoFeedbackActuator1 := 15,
eHVACErrorCodes_Error_NoFeedbackActuator2 := 16,
eHVACErrorCodes_Error_NoFeedbackActuator3 := 17,
eHVACErrorCodes_Error_NoFeedbackActuator4 := 18,
eHVACErrorCodes_Error_NoFeedbackActuator5 := 19,
eHVACErrorCodes_Error_NoFeedbackActuator6 := 20,
eHVACErrorCodes_Error_NoFeedbackActuator7 := 21,
eHVACErrorCodes_Error_NoFeedbackActuator8 := 22,

bErrorGeneral: Error during evaluation of the operating feedback.

bInvalidParameter: TRUE if an error has occurred during the plausibility check. The message must be acknowledged with bReset.

VAR_IN_OUT

tOverlap1Actuator  : TIME;
uiMaxOnLevel       : UINT;
tNoFeedbActuator   : TIME;

tOverlap1Actuator: Overlap time for the case where an exchange between two actuators takes place (0ms..1min). The variable is saved persistently. Preset to 20 s.

uiMaxOnLevel: Max. time in hours that an actuator may be switched on (0h..1000h). Forces an actuator change only if an actuator is available to be switched on. The variable is saved persistently. Preset to 200 h.

tNoFeedbActuator: Time that is allowed to elapse before the lack of an operating feedback from the actuator leads to bErrorGeneral = TRUE (0ms..60s). There is no evaluation if the time = 0. The variable is saved persistently. Preset to 3 s

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