Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

HeatpumpGasboilerSelection

HeatpumpGasboilerSelection (FB)

FUNCTION_BLOCK HeatpumpGasboilerSelection

Short description

Release of the gas boiler or the heat pump depending on various influencing factors. Influencing factors:

  1. Current COP value of the heat pump

  2. Costs for electrical energy (heat pump) in euros per kWh

  3. Costs for natural gas purchase (gas boiler) in euros per kWh

  4. Efficiency of the heat pump (0.0 - 1.0)

  5. Efficiency of the gas boiler (0.0 - 1.0)

The preset values of the internal characteristic curve correspond to the COP characteristic curve W35 heating case of the WP Remeha E-HP AW 84. Typical application: Decision on releasing the gas boiler or the heat pump depending on the operating situation

Representation

Interfaces

Inputs

Name
Data type
Value range
Initial value
Function

xEn

BOOL

TRUE

Release / locking of the function block (TRUE = release)

eCOPSource

eHeatpumpGasboilerSelection_COPSource

eHeatpumpGasboilerSelection_COPSource.Internal_Curve

Selection of the COP source (Internal_Curve, External_Input)

rSourceTempCOP

REAL

2.0

Current temperature of the heat source for the heat pump (air-to-water heat pump: outdoor temperature)

rExtCOP

REAL

4.0

External value of the 'Coefficient of Performance' (COP) of the heat pump (typical: 2.0 - 7.0)

xExtError

BOOL

FALSE

External error state (FALSE = no error, TRUE = error)

xExtValidData

BOOL

FALSE

External input for the validity of the characteristic curve data (n) (FALSE = invalid)

Outputs

Name
Data type
Value range
Initial value
Function

tRemainingTimeTestIntervall

TIME

T#0s

Remaining time until the next test time

rCOPLimit

REAL

0.0

Limit value of the COP for releasing the heat pump (rCOP >= rCOPLimit: release of the heat pump)

rCOP

REAL

0.0

Current value of the 'Coefficient of Performance' (COP) of the heat pump (typical: 2.0 - 7.0)

xCmdGasboiler

BOOL

FALSE

Release / locking of the gas boiler (TRUE = release)

xCmdHeatpump

BOOL

FALSE

Release / locking of the heat pump (TRUE = release)

xError

BOOL

FALSE

Error state (FALSE = no error, TRUE = error)

Setpoints / Parameters

Name
Data type
Value range
Initial value
Function

rEfficiencyGasboiler

REAL

0.9

Overall efficiency of heat generation with the gas boiler

rEfficiencyHeatpump

REAL

0.9

Overall efficiency of heat generation with the heat pump

rEnergyPriceGasboiler

REAL

0.20

Energy costs - gas (in euros / kWh of generated thermal energy)

rEnergyPriceHeatpump

REAL

0.45

Energy costs - electricity (in euros / kWh)

tTimeTestIntervall

TIME

T#30M

Duration of the test interval

rCOP_Subst

REAL

3.5

Substitute value for the COP in case of error

rCOP_Min

REAL

1.0

Absolute minimum value of the COP

rCOP_Max

REAL

10.0

Absolute maximum value of the COP

rSP1_X

REAL

1.0

Support point 1 - X value

rSP1_Y

REAL

2.0

Support point 1 - Y value

rSP2_X

REAL

2.0

Support point 2 - X value

rSP2_Y

REAL

4.0

Support point 2 - Y value

rSP3_X

REAL

3.0

Support point 3 - X value

rSP3_Y

REAL

6.0

Support point 3 - Y value

rSP4_X

REAL

4.0

Support point 4 - X value

rSP4_Y

REAL

8.0

Support point 4 - Y value

rSP5_X

REAL

5.0

Support point 5 - X value

rSP5_Y

REAL

10.0

Support point 5 - Y value

rSP6_X

REAL

6.0

Support point 6 - X value

rSP6_Y

REAL

12.0

Support point 6 - Y value

rSP7_X

REAL

7.0

Support point 7 - X value

rSP7_Y

REAL

14.0

Support point 7 - Y value

rSP8_X

REAL

8.0

Support point 8 - X value

rSP8_Y

REAL

16.0

Support point 8 - Y value

rSP9_X

REAL

9.0

Support point 9 - X value

rSP9_Y

REAL

18.0

Support point 9 - Y value

rSP10_X

REAL

10.0

Support point 10 - X value

rSP10_Y

REAL

20.0

Support point 10 - Y value

Functional description

The release of the heat generators gas boiler or heat pump is based on a calculation taking into account the following influencing factors: 1) Current COP value of the heat pump 2) Costs for electrical energy (heat pump) in euros per kWh 3) Costs for natural gas purchase (gas boiler) in euros per kWh 4) Efficiency of the heat pump (0.0 - 1.0) 5) Efficiency of the gas boiler (0.0 - 1.0) Only one heat generator is ever enabled; the other is automatically locked. This calculation is performed (condition: xEn = TRUE) if at least one of the following situations applies: 1) Cyclically in the interval tTimeTestIntervall 2) Once on a rising edge at input xEn 3) Once after each restart 4) Once whenever the selection of the COP source eCOPSource changes The COP value of the heat pump can be determined by an internally stored characteristic curve with 10 pairs of values (eCOPSource = Internal_Curve, temperature of the heat source rSourceTempCOP) or the external input rExtCOP (eCOPSource = External_Input, xExtError = FALSE, xExtValidData = TRUE). It is limited by the absolute limits rCOP_Min or rCOP_Max and, when error-free, output at rCOP and used for the calculation. In case of an error (eCOPSource = Internal_Curve: error in entering the pairs of values) or (eCOPSource = External_Input: xExtError = TRUE or xExtValidData = FALSE), the substitute value rCOP_Subst is used. The X values of the 10 support points of the internal COP characteristic curve must satisfy the following conditions: 1) The X values must be continuously either strictly ascending or strictly descending 2) Each X value may occur only once 3) Two adjacent support points are connected by a straight line each At the output tRemainingTimeTestIntervall, the remaining time until the next cyclic calculation is available. At the output rCOPLimit, the limit value for switching to the gas boiler is available (rCOP < rCOPLimit: release of the gas boiler) When locked (xEn = FALSE), the outputs assume sensible, constant values; no further calculation takes place. At the output *xError* the current error state is available (xError = TRUE: error active). It is active if either the internal COP characteristic curve is faulty or the external error input xExtError is active (= TRUE).

CODESYS

InOut:

Scope
Name
Type
Initial

Input

xEn

BOOL

TRUE

Input

eCOPSource

eHeatpumpGasboilerSelection_COPSource

eHeatpumpGasboilerSelection_COPSource.Internal_Curve

Input

rSourceTempCOP

REAL

2.0

Input

rExtCOP

REAL

4.0

Input

xExtError

BOOL

FALSE

Input

xExtValidData

BOOL

FALSE

Output

tRemainingTimeTestIntervall

TIME

TIME#0ms

Output

rCOPLimit

REAL

0.0

Output

rCOP

REAL

0.0

Output

xCmdGasboiler

BOOL

FALSE

Output

xCmdHeatpump

BOOL

FALSE

Output

xError

BOOL

FALSE

Input Const

rSP10_Y

REAL

6.8

Input Const

rSP10_X

REAL

20.0

Input Const

rSP9_Y

REAL

5.85

Input Const

rSP9_X

REAL

16.1

Input Const

rSP8_Y

REAL

5.25

Input Const

rSP8_X

REAL

12.2

Input Const

rSP7_Y

REAL

4.65

Input Const

rSP7_X

REAL

8.3

Input Const

rSP6_Y

REAL

4.2

Input Const

rSP6_X

REAL

4.4

Input Const

rSP5_Y

REAL

3.7

Input Const

rSP5_X

REAL

0.5

Input Const

rSP4_Y

REAL

3.35

Input Const

rSP4_X

REAL

-3.3

Input Const

rSP3_Y

REAL

3.1

Input Const

rSP3_X

REAL

-7.2

Input Const

rSP2_Y

REAL

2.95

Input Const

rSP2_X

REAL

-11.1

Input Const

rSP1_Y

REAL

2.8

Input Const

rSP1_X

REAL

-15.0

Input Const

rCOP_Max

REAL

10.0

Input Const

rCOP_Min

REAL

1.0

Input Const

rCOP_Subst

REAL

3.5

Input Const

tTimeTestIntervall

TIME

TIME#30m0s0ms

Input Const

rEnergyPriceHeatpump

REAL

0.45

Input Const

rEnergyPriceGasboiler

REAL

0.2

Input Const

rEfficiencyHeatpump

REAL

0.9

Input Const

rEfficiencyGasboiler

REAL

0.9

Methods:

mCalculateCurveSectionValue_Real_Real

mCalculateCurveValue_Real_Real

Structure:

  • mCalculateCurveSectionValue_Real_Real (Method)

  • mCalculateCurveValue_Real_Real (Method)

Last updated