FB_HVACAntiBlockingPump

FB_HVACAntiBlockingPump 1:

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: 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 AntiBlocking function is enabled by 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 relayed 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 (see E_HVACAntiBlockingMode).

eHVACAntiBlockingMode_Off:=0 : Off

eHVACAntiBlockingMode_Downtime:=1 : After the expiry of a standstill time in hours, the Antiblocking-pulse will be routed 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..23h). 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 anti-blocking function. The pump is connected to this output.
This output corresponds to the switch-on condition and is dependent upon the state of the Antiblocking-pulse and the inputs bEnable and bDisable. If bEnable = FALSE, then 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 request comes from the anti-blocking 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 2:

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

FB_HVACAntiBlockingPump 3:

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