FB_HVACCirculationPump

FB_HVACCirculationPump 1:

Application

This function block serves to control pumps in HVAC systems.

VAR_INPUT

eDataSecurityType     : E_HVACDataSecurityType;
bSetDefault           : BOOL;
bEnable               : BOOL;
bAuto                 : BOOL;
eCtrlModeActuator     : E_HVACActuatorMode; 
rOutsideTemp          : REAL;
rValvePosition        : REAL;
bFeedbPump            : BOOL;
bPumpProtec           : BOOL;
bAntiBlocking         : BOOL;
bManSwitch            : BOOL;
bCtrlVoltage          : 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: FB_HVACCirculationPump 2: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 if bEnable = TRUE.

bAuto: input for the request from the automatic program. The request is overridden by eCtrlModeActuator.

eCtrlModeActuator: Enum that defines the operation mode.

rOutsideTemp: input for transmitting the outside temperature value.

rValvePosition: if there is a control valve in the hydraulic circuit of the pump, the position of the control valve must be applied here.

bFeedbPump: this input is for displaying the operating message in a visualization system and for monitoring the pump function.

bPumpProtec: a pump error message is connected to the input bPumpProtec. There is a pump error if the input bPumpProtec is FALSE. The output bPump becomes FALSE in the event of a fault. The pump can only be restarted after an acknowledgment on the input bReset.

bAntiBlocking: input for transferring the anti-blocking request, i.e. if TRUE the request is active.

bManSwitch: if the pump has a manual/emergency switch in the control cabinet, this can be connected to the input bManSwitch; the status of the manual/emergency switch will then be monitored. If bManSwitch = FALSE, then output bPump is disabled. The output bPump can only be switched on if bManSwitch = TRUE (quiescent current principle).

bCtrlVoltage: in order to suppress a torrent of messages, the error message from bPumpProtec is only acquired if the input bCtrlVoltage is TRUE.

bReset: acknowledge input in the event of a fault.

VAR_OUTPUT

bPump                 : BOOL;      
byState               : BYTE;                
bStateManSwitch       : BOOL;
bReqOutsideTemp       : BOOL;           
bReqValve             : BOOL;           
eStateModeActuator    : E_HVACActuatorMode;         
bErrorPumpProtec      : BOOL;
bErrorPumpFeedb       : BOOL;                 
bErrorGeneral         : BOOL;                
byError               : BYTE;                
bInvalidParameter     : BOOL;

bPump: output variable for controlling a pump.

byState: output of the pump state as byte.
byState.0 := bEnable
byState.1 := bPump
byState.2 := bReqOutsideTemp
byState.3 := bReqValve
byState.4 := bAntiblocking
byState.5 := bFeedbPump
byState.6 := NOT bManSwitch
byState.7 := bCtrlVoltage

bStateManSwitch: status message of the manual/emergency switch. A TRUE signals that the manual/emergency operating level is activated.

bReqOutsideTemp: if the condition to request the pump depending on the outside temperature is TRUE, the output variable bReqOutsideTemp becomes TRUE.

bReqValve: if the condition for requesting the pump depending on the valve position is reached, the variable bReqValve becomes TRUE.

eStateModeActuator: indicates in which operation mode the actuator is.

bErrorPumpProtec: error from the pump.

bErrorPumpFeedb: if the input bFeedbPump does not go TRUE within the time of tFeedbPumpDelay (tFeedbPumpDelay must be > t#0s) after setting the output bPump, this is recognized as a fault and this output is set to TRUE and the output bPump to FALSE. The error message must be acknowledged with bReset.

bErrorGeneral: there is a general error.

byError: output of the errors as byte.
byError.1 := bInvalidParameter
byError.2 := bErrorGeneral
byError.3 := bErrorPumpProtec
byError.4 := bErrorPumpFeedb

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

VAR_IN_OUT

tStopDelay           : TIME;
tFeedbPumpDelay      : TIME;
rOutsideTempLimit    : REAL;
rValvePositionLimit  : REAL;
eReqOutsideTemp      : E_HVACReqOutsideTemp;     
eReqValve            : E_HVACReqValve;

tStopDelay: the time tStopDelay [s] delays the switching off of the pump after the switch-on conditions are no longer fulfilled. The variable is saved persistently. Preset to 0 s.

tFeedbPumpDelay: the monitoring function of the pump feedback message [s] is only active if tFeedbPumpDelay is > t#0s. If tFeedbPumpDelay = t#0s the monitoring function is deactivated (0s..3600s). The variable is saved persistently. Preset to 0 s.

rOutsideTempLimit: value [°C] above or below which the pump is switched on or off depending on the outside temperature (-60 °C..60 °C). The variable is saved persistently. Preset to 10 °C.

rValvePositionLimit: threshold value for the position of a control valve associated with a pump, from which the pump should switch on automatically, e.g. heater pump (0%..100%). The variable is saved persistently. Preset to 3%.

eReqOutsideTemp: depending on the outside temperature, the pump can be compulsorily switched on, e.g. for frost protection purposes when the temperature limit value rOutsideTempLimit is undershot. The prerequisite is that bEnable = TRUE and that the pump is in automatic mode. The variable is saved persistently.

Notice

Manual off overrides the frost protection function!

eReqValve: depending on the position of the valve associated with the pump, the pump can be switched on when the threshold value rValvePositionLimit is exceeded. The ENUM activates the switch-on via the valve position. In addition, the ENUM determines whether the temperature-dependent and valve position-dependent switch-on conditions are ORed or ANDed together.

The table below shows a summary of all possible combinations:

eReqOutsideTemp

eReqValve

Function

Application

OTLowerLimit

NoRequest

outsidetemp lower limit

 

OTLowerLimit

OrValvePosHigherLimit

outsidetemp OR valve higher limit

Heating circuit, air heater

OTLowerLimit

AndValvePosHigherLimit

outsidetemp AND valve higher limit

 

OTHigherLimit

NoRequest

outsidetemp higher limit

 

OTHigherLimit

OrValvePosHigherLimit

outsidetemp OR valve higher limit

 

OTHigherLimit

AndValvePosHigherLimit

outsidetemp AND valve higher limit

Cooler pump

NoRequest

NoRequest

no request

Primary pump

NoRequest

OrValvePosHigherLimit

valve higher limit

 

NoRequest

AndValvePosHigherLimit

not valid

 

By means of various combinations of the two variables, eReqOutsideTemp and eReqValve, this function block can be adapted to the requirements of a heating circuit, an air heater, an air cooler or a feed pump.