FB_BA_DHW2P

FB_BA_DHW2P 1:

This function block FB_BA_DHW2P controls the charging (heating) of a hot water tank via an on-off controller. Tank heating is activated at input bEn. If tank heating is active the output bLd is TRUE. The variable fSp is used to transfer the setpoint for the service water temperature to the function block. A minimum selection is connected to the input fTMin, a maximum selection of all temperature sensors of the hot water tank is connected to the input fTMax.
Due to the temperature stratification in the hot water tank, the top sensor is generally the one with the highest temperature and the bottom one with the lowest.

The tank can be charged in two ways via the variables bKepFul:

bKepFul = FALSE

Charging is requested if fTMax falls below the value of fSp-fSpHys. The charge request is disabled if fTMin is above the setpoint for fSp.
Due to the fact that the sensor at the top generally measures the highest temperature, the heating is not switched on until the hot water tank has been discharged.

FB_BA_DHW2P 2:

bKepFul = TRUE

Charging is requested if fTMin falls below the value of fSp-fSpHys. The charge request is disabled once fTMin is above the setpoint again.
Selecting the minimum of all tank temperatures ensures that the coldest point of the tank is used for control purposes. Recharging takes place when the tank is no longer full.

FB_BA_DHW2P 3:

FB_BA_DHW2P 4: Inputs

VAR_INPUT
  bEn      : BOOL;
  fSp      : REAL;
  fSpHys   : REAL;
  fTMax    : REAL;
  fTMin    : REAL;
  bKepFul  : BOOL;
END_VAR

Name

Type

Description

bEn

BOOL

Enable boiler charging

fSp

REAL

Service water temperature setpoint [°C].

fSpHys

REAL

Hysteresis, recommended 1°K to 5°K.

fTMax

REAL

Maximum selection of all tank temperatures [°C].

fTMin

REAL

Minimum selection of all tank temperatures [°C].

bKepFul

BOOL

Control temperature selection:
FALSE = fTMax is used to request bLd, fTMin to switch off.
TRUE = fTMin alone controls the switching on/off of bLd.

FB_BA_DHW2P 5: Outputs

VAR_OUTPUT
  bLd     : BOOL;
  fSpOut  : REAL;
END_VAR

Name

Type

Description

bLd

BOOL

Enable charging mode.

fSpOut

REAL

Setpoint forwarding to charging circuit:
fSpOut = fSp (input) if the function block is enabled.
fSpOut = 0 if the function block is not enabled.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4024.22

Tc3_BA2 from v5.2.5.0