FB_HVACAntiBlockingPump

FB_HVACAntiBlockingPump 1:

Application

This function block relays the switch-on condition for a pump drive and can generate an additional switch-on pulse, depending on the mode and the switch-off time, in order e.g. to prevent the blockage of a pump.

VAR_INPUT

eDataSecurityType: E_HVACDataSecurityType;
bSetDefault      : BOOL;
bEnable          : BOOL;
bDisable         : BOOL;                    
bIn              : BOOL;
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: FB_HVACAntiBlockingPump 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 AntiBlocking is enabled with the input variable bEnable. If bEnable = FALSE, only the switch-on condition will be applied at the output; the AntiBlocking function is not active.

bDisable: resets the outputs bOut , bOutAndAntiBlocking and bQAntiBlocking to 0. (See example below)

bIn: switch-on condition that is passed on to the output bOut.

dtSystemTime: system time

bReset: acknowledge input in the event of a fault. Resets the flag bInvalidParameter.

VAR_IN_OUT

eAntiBlockingMode: E_HVACAntiBlockingMode;
iHoursDowntime   : INT;
iDayWeekly       : INT;
iHour            : INT;
iMinute          : INT;
iLengthImpulse   : INT;

eHVACAntiBlockingMode: enumeration value that specifies the type of Antiblocking method.

eHVACAntiBlockingMode_Off:= 0 : off

eHVACAntiBlockingMode_Downtime:= 1 : after the expiry of a standstill time in hours, the Antiblocking pulse will be passed on to the bOut output.

eHVACAntiBlockingMode_Weekly:= 2 : the antiblocking pulse is only generated on a certain day of the week and at a certain time, independent of how long the standstill has lasted.

The variable is saved persistently.

iHoursDowntime: for eHVACAntiBlockingMode_Downtime, the time in hours for which the input bIn may not be active until the AntiBlocking pulse is formed (0h..6000h). The variable is saved persistently. Preset to 24.

iDayWeekly: for eHVACAntiBlockingMode_Weekly,AntiBlocking pulse is formed on this day. Sun=0, Mon=1, Tue=2, Wed=3, Thu=4, Fri=5, Sat=6

The variable is saved persistently. Preset to 6.

iHour: switch-on time in hours (0h..23 h). The variable is saved persistently. Preset to 12.

iMinute: switch-on time in minutes (0min..23min). The variable is saved persistently. Preset to 0.

iLengthImpulse: switch-on time in seconds (0s..600s). The variable is saved persistently. Preset to 150.

VAR_OUTPUT

bOut               : BOOL;              
bOutAndAntiBlocking: BOOL;                   
bQAntiBlocking     : BOOL;                   
bInvalidParameter  : BOOL;

bOut: if TRUE, then the request comes from the pump function block. This output corresponds to the switch-on condition independent of the state of the Antiblocking pulse and the input bEnable.

bOutAndAntiBlocking: the output can go TRUE if the request comes from the pump function block OR from the antiblocking function. The pump is connected to this output.
This output corresponds to the switch-on condition independent of the state of the Antiblocking pulse and the inputs bEnable and bDisable. IfbEnable = FALSE the output corresponds to the output bOut. If bEnable = TRUE, then the output corresponds to the output bOut and is additionally Ored° with the Antiblocking pulse.

bQAntiBlocking: if TRUE, then the request comes from the antiblocking function. This output is independent of the switch-on signal and shows only the Antiblocking pulse.

bInvalidParameter: an error occurred during the plausibility check. It is deleted again by bReset.

Example of a combination of a pump block and the FB_HVACAntiBlocking:

FB_HVACAntiBlockingPump 3:

Example of the control of several pumps via one AntiBlocking instance:

FB_HVACAntiBlockingPump 4: