> For the complete documentation index, see [llms.txt](https://support.powerio.com/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.powerio.com/hub/codesys-hvac/en/hvac-library/functionblocks/components/duopump.md).

# DuoPump

## `DuoPump` (FB)

FUNCTION\_BLOCK DuoPump

### Short description

> Redundant control of two identical circulation pumps with anti-seizure protection function\
> Additional functions: energy generation request, manual overrides, pump overrun, operating hours counter, operating monitoring\
> Typical application: redundant control of a twin pump in a heating circuit

### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-94e243e6980318a64c6af67c13242f8875b3f5f7%2FDuoPump_FB.png?alt=media" alt=""><figcaption></figcaption></figure>

### Interfaces

#### Inputs

| Name        | Data type         | Value range                                                               | Initial value          | Function                                                        |
| ----------- | ----------------- | ------------------------------------------------------------------------- | ---------------------- | --------------------------------------------------------------- |
| *xEnOne*    | BOOL              |                                                                           |                        | Request for the lead pump                                       |
| *xEnTwo*    | BOOL              |                                                                           |                        | Request for the lead and lag pump                               |
| *xFb1*      | BOOL              |                                                                           |                        | Operating message of circulation pump 1                         |
| *xFb2*      | BOOL              |                                                                           |                        | Operating message of circulation pump 2                         |
| *xAlarmIn1* | BOOL              |                                                                           |                        | Fault message of circulation pump 1                             |
| *xAlarmIn2* | BOOL              |                                                                           |                        | Fault message of circulation pump 2                             |
| *eAOO1*     | HVACTYPES.eManBin | HVACTYPES.eManBin.Auto, HVACTYPES.eManBin.ManOff, HVACTYPES.eManBin.ManOn | HVACTYPES.eManBin.Auto | Operating mode of manual override - hardware circulation pump 1 |
| *eAOO2*     | HVACTYPES.eManBin | HVACTYPES.eManBin.Auto, HVACTYPES.eManBin.ManOff, HVACTYPES.eManBin.ManOn | HVACTYPES.eManBin.Auto | Operating mode of manual override - hardware circulation pump 2 |
| *xQuit*     | BOOL              |                                                                           | FALSE                  | Reset of the fault message of the operating monitoring systems  |

#### Outputs

| Name                 | Data type       | Value range | Initial value | Function                                                                        |
| -------------------- | --------------- | ----------- | ------------- | ------------------------------------------------------------------------------- |
| *xHB1*               | BOOL            |             |               | Enable - circulation pump 1 after manual override                               |
| *xHB2*               | BOOL            |             |               | Enable - circulation pump 2 after manual override                               |
| *xAB1*               | BOOL            |             |               | Enable - circulation pump 1 before manual override                              |
| *xAB2*               | BOOL            |             |               | Enable - circulation pump 2 before manual override                              |
| *xEnergyRequest*     | BOOL            |             |               | Request for energy generation                                                   |
| *xAlarmFb1*          | BOOL            |             |               | Fault message - operating monitoring - circulation pump 1                       |
| *xAlarmFb2*          | BOOL            |             |               | Fault message - operating monitoring - circulation pump 2                       |
| *tOffDelay*          | TIME            |             |               | Remaining run-on time of the circulation pump                                   |
| *dtLastFb1*          | DATE\_AND\_TIME |             |               | Date / time of the last operation of circulation pump 1                         |
| *dtLastFb2*          | DATE\_AND\_TIME |             |               | Date / time of the last operation of circulation pump 2                         |
| *dtAbsLastOn1*       | DATE\_AND\_TIME |             |               | Date / time of the last anti-seizure protection operation of circulation pump 1 |
| *dtAbsLastOn2*       | DATE\_AND\_TIME |             |               | Date / time of the last anti-seizure protection operation of circulation pump 2 |
| *udiOperatingHours1* | UDINT           |             |               | Operating hours of circulation pump 1                                           |
| *udiOperatingHours2* | UDINT           |             |               | Operating hours of circulation pump 2                                           |
| *udiCountFb1*        | UDINT           |             |               | Number of switch-ons of circulation pump 1                                      |
| *udiCountFb2*        | UDINT           |             |               | Number of switch-ons of circulation pump 2                                      |
| *xAlarm1*            | BOOL            |             |               | Collective fault - circulation pump 1                                           |
| *xAlarm2*            | BOOL            |             |               | Collective fault - circulation pump 2                                           |
| *xAlarm*             | BOOL            |             |               | Collective fault                                                                |
| *xAuto*              | BOOL            |             |               | Collective automatic operation message                                          |

#### Setpoints / Parameters

| Name                  | Data type         | Value range                                                                                  | Initial value          | Function                                                 |
| --------------------- | ----------------- | -------------------------------------------------------------------------------------------- | ---------------------- | -------------------------------------------------------- |
| **eManModeB1**        | eMANBIN           | eMANBIN.Auto, eMANBIN.ManOff, eMANBIN.ManOn                                                  | eMANBIN.Auto           | Operating mode of manual override for circulation pump 1 |
| **eManModeB2**        | eMANBIN           | eMANBIN.Auto, eMANBIN.ManOff, eMANBIN.ManOn                                                  | eMANBIN.Auto           | Operating mode of manual override for circulation pump 2 |
| **udiOffDelay**       | UDINT             | 0 to 600s                                                                                    | 60s                    | Overrun time of the circulation pumps                    |
| **eOffDelayTimeBase** | eTime             | eTime.Second, eTime.Minute, eTime.Hour                                                       | eTime.Second           | Scaling of the run-on time (seconds / minutes / hours)   |
| **eAbsDay**           | eDoW              | eDoW\.Monday to eDoW\.Sunday                                                                 | eDoW\.Monday           | Day of the week of the anti-blocking operation           |
| **todAbsStartTime**   | TOD               | 00:00:00 - 23:59:59                                                                          | 08:00:00               | Time of the anti-blocking operation                      |
| **tAbsTime**          | UDINT             | 0 to 3600s                                                                                   | 120s                   | Duration of the anti-blocking operation                  |
| **xFbControl**        | BOOL              |                                                                                              | TRUE                   | Enable operating monitoring                              |
| **udiFbControlTime**  | UDINT             | 0 to 300s                                                                                    | 60s                    | Duration of the operating supervision                    |
| **eModeRedundance**   | eOpModeRedundance | eOpModeRedundance.Auto, eOpModeRedundance.ForceComponent1, eOpModeRedundance.ForceComponent2 | eOpModeRedundance.Auto | Redundancy mode                                          |

### Functional description

#### General

This function block controls two identical circulation pumps in redundant operation.\
The selection of the number of required circulation pumps is made via the inputs *xEnOne* and *xEnTwo*\
The enables of circulation pumps 1 and 2 are provided via the outputs *xHB1* and *xHB2* or *xAB1* and *xAB2*.\
\
The following function blocks are mainly used:

* Redundance2
* AbsB
* OperatingHours
* ManBin

> **Prerequisite for using the DuoPump function block**
>
> For correct operation, the use of the TimeRead2 function block is required.

#### Redundant control

It serves to redundantly control the two circulation pumps depending on the influencing variables requests (*xEnOne* and *xEnTwo*), operating hours (*uxiOperatingHours1* and *uxiOperatingHours2*), operating states (*xFb1* and *xFb2*), fault states (*xAlarm1* and *xAlarm2*) and the operating mode for sequence selection (**eModeRedundance**).\
The enable for the lead pump and, if necessary, the lag pump is determined internally and, taking the current sequence into account, transferred to the internal outputs *xCmd1* or *xCmd2* transferred.\
\
The lead pump is requested when it is requested by the input *xEnOne* and/or while the pump overrun time is active.\
The lead and lag pumps are requested when they are requested by the input *xEnTwo* are requested.\
Requests at input *xEnTwo* have priority over requests at input *xEnOne*.\
\
The selection of the lead or lag pump is made with high priority based on the states of the fault messages of the circulation pumps *xAlarm1* or *xAlarm2* (fault = TRUE).\
\
The selection of the lead or lag pump is made with low priority via the parameter *eModeRedundance*.\
At *eModeRedundance* = Auto, the selection is made based on the current number of operating hours of the circulation pumps.\
The time difference for switching via operating hours is 100 hours. Switching takes place according to different criteria, which are described in detail in FB Redundance2.\
The options **xConOperatingHours** as well as **xEnFb** are enabled (= TRUE).\
In the case *eModeRedundance* = ForceComponent1 or *eModeRedundance* = ForceComponent2, circulation pump 1 or circulation pump 2 is the lead pump accordingly.

#### Enable - circulation pump 1 before manual override *xAB1*

The output *xAB1* is determined by the redundant control, the output *xAlarm1*, the run-on module and the anti-blocking protection module.

| Redundant control | *xAlarm1* | Run-on module | Anti-blocking protection module | *xAB1* | Notes                                 |
| ----------------- | --------- | ------------- | ------------------------------- | ------ | ------------------------------------- |
| X                 | TRUE      | X             | X                               | FALSE  | Shutdown via collective fault enabled |
| FALSE             | X         | FALSE         | FALSE                           | FALSE  | Lockout via redundant control         |
| TRUE              | X         | FALSE         | FALSE                           | TRUE   | Enable via redundant control          |
| X                 | X         | TRUE          | X                               | TRUE   | Run-on operation                      |
| X                 | X         | X             | TRUE                            | TRUE   | Anti-blocking operation               |

Legend: X = any

#### Enable - circulation pump 2 before manual override *xAB2*

The output *xAB2* by the redundant control, the output *xAlarm2*, the run-on module and the anti-blocking protection module.

| Redundant control | *xAlarm2* | Run-on module | Anti-blocking protection module | *xAB2* | Notes                                 |
| ----------------- | --------- | ------------- | ------------------------------- | ------ | ------------------------------------- |
| X                 | TRUE      | X             | X                               | FALSE  | Shutdown via collective fault enabled |
| FALSE             | X         | FALSE         | FALSE                           | FALSE  | Lockout via redundant control         |
| TRUE              | X         | FALSE         | FALSE                           | TRUE   | Enable via redundant control          |
| X                 | X         | TRUE          | X                               | TRUE   | Run-on operation                      |
| X                 | X         | X             | TRUE                            | TRUE   | Anti-blocking operation               |

Legend: X = any

#### Enable - circulation pump 1 after manual override *xHB1*

Enable - circulation pump 1 after manual override *xHB1* corresponds to Enable - circulation pump 1 before manual override *xAB1*, additionally expanded by a manual override module.

| *xAB1* | eMANBIN        | *xHB1* | Notes                                     |
| ------ | -------------- | ------ | ----------------------------------------- |
| FALSE  | eMANBIN.Auto   | FALSE  | Manual override module in automatic mode  |
| TRUE   | eMANBIN.Auto   | TRUE   | Manual override module in automatic mode  |
| X      | eMANBIN.ManOn  | TRUE   | Manual override module in manual mode On  |
| X      | eMANBIN.ManOff | FALSE  | Manual override module in manual mode Off |

Legend: X = any

#### Enable - circulation pump 2 after manual override *xHB2*

Enable - circulation pump 2 after manual override *xHB2* corresponds to Enable - circulation pump 2 before manual override *xAB2*, additionally expanded by a manual override module.

| *xAB2* | eMANBIN        | *xHB2* | Notes                                     |
| ------ | -------------- | ------ | ----------------------------------------- |
| FALSE  | eMANBIN.Auto   | FALSE  | Manual override module in automatic mode  |
| TRUE   | eMANBIN.Auto   | TRUE   | Manual override module in automatic mode  |
| X      | eMANBIN.ManOn  | TRUE   | Manual override module in manual mode On  |
| X      | eMANBIN.ManOff | FALSE  | Manual override module in manual mode Off |

Legend: X = any

#### Operating messages *xFb1* and *xFb2*

Circulation pump 1 in operation: *xFb1* = TRUE\
Circulation pump 1 not in operation: *xFb1* = FALSE\
\
Circulation pump 2 in operation: *xFb2* = TRUE\
Circulation pump 2 not in operation: *xFb2* = FALSE

#### Fault messages *xAlarmIn1* and *xAlarmIn2*

Circulation pump 1 faulty: *xAlarmIn1* = TRUE\
Circulation pump 1 not faulty: *xAlarmIn1* = FALSE\
\
Circulation pump 2 faulty: *xAlarmIn2* = TRUE\
Circulation pump 2 not faulty: *xAlarmIn2* = FALSE

#### Reset of the fault message of the operating monitoring systems *xQuit*

The reset of the fault message of the operating monitoring systems *xAlarmFb1* and *xAlarmFb2* takes place as long as the reset of the fault message of the operating monitoring systems *xQuit* is active (= TRUE).

#### Request - energy generation *xEnergyRequest*

The request - energy generation *xEnergyRequest* is influenced by the anti-seizure protection modules, the overrun modules, and the operation feedback signals of circulation pumps 1 and 2 *xFb1* and *xFb2* influenced.\
\
The request - energy generation *xEnergyRequest* is active when\
\
from circulation pump 1 the operating message *xFb1* is present and at the same time anti-seizure protection module 1 is not active\
and/or\
from circulation pump 2 the operating message *xFb2* is present and at the same time anti-seizure protection module 2 is not active\
and\
the overrun module is not active

#### Run-on module

The overrun module is realized by a switch-off delay with adjustable duration **udiOffDelay** realized. The overrun module is activated if no request is present via the inputs *xEnOne* or *xEnTwo* any longer.\
The pump overrun takes place only on the lead pump.

#### Anti-seizure protection modules

The anti-seizure protection modules are realized by the binary anti-seizure protection module with adjustable duration.\
The duration **tAbsTime**, the time **tAbsStartTime** and the weekday **eAbsDay** is adjustable for the first pump.\
The time for the second pump is the time of the first pump offset by twice the duration of the first pump **tAbsTime**.\
The timestamp (date/time) of the last anti-seizure protection operation is available, separately for each circulation pump, at the outputs *dtAbsLastOn1* or *dtAbsLastOn2* .

#### Collective fault - circulation pump 1 *xAlarm1*

The collective fault - circulation pump 1 *xAlarm1* is active (= TRUE) if the fault message of circulation pump 1 *xAlarmIn1* is active (= TRUE) and/or a fault message - operating monitoring - circulation pump 1 *xAlarmFb1* (= TRUE) is present.\
In all other situations, the collective fault - circulation pump 1 *xAlarm1* not active (= FALSE).

#### Collective fault - circulation pump 2 *xAlarm2*

The collective fault - circulation pump 2 *xAlarm2* is active (= TRUE) if the fault message of circulation pump 2 *xAlarmIn2* is active (= TRUE) and/or a fault message - operating monitoring - circulation pump 2 *xAlarmFb2* (= TRUE) is present.\
In all other situations, the collective fault - circulation pump 2 *xAlarm2* not active (= FALSE).

#### Collective fault *xAlarm*

The collective fault *xAlarm* is active (= TRUE) if the collective fault - circulation pump 1 *xAlarm1* is active or the collective fault - circulation pump 2 *xAlarm2* is active.\
In all other situations, the collective fault *xAlarm* not active (= FALSE).

#### Operating hours counter - circulation pump 1

The operating hours counter for circulation pump 1 is active when the operating message *xFb1* = TRUE and at the same time the collective fault *xAlarm1* = FALSE.

#### Operating hours counter - circulation pump 2

The operating hours counter for circulation pump 2 is active when the operating message *xFb2* = TRUE and at the same time the collective fault *xAlarm2* = FALSE.

> **Write access to the counter values**
>
> Via the path ‘Instanzname.\_OperatingHours\[1].udiOperatingHours’ or ‘Instanzname.\_OperatingHours\[1].udiCountFb’, write access to both counter values is possible.\
> Via the path ‘Instanzname.\_OperatingHours\[2].udiOperatingHours’ or ‘Instanzname.\_OperatingHours\[2].udiCountFb’, write access to both counter values is possible.

#### Operating monitoring - circulation pump 1

The operating monitoring monitors the correct function of circulation pump 1.\
The monitoring can generally be enabled (**xFbControl** = TRUE) or locked (**xFbControl** = FALSE) be disabled.\
The operating mode of manual override - hardware circulation pump 1 must be in automatic mode (*eAOO1* = HVACTYPES.eManBin.Auto).\
\
The fault message - operating monitoring - circulation pump 1 *xAlarmFb1* is activated (= TRUE) if, during the duration of the operating monitoring **udiFbControlTime** the states of the input *xFb1* and the output *xHb1* are not equal.\
\
The fault message - operating monitoring - circulation pump 1 *xAlarmFb1* is deactivated (= FALSE) if at least one of the following conditions is active:\
\
\&#xNAN;*eAOO1* = HVACTYPES.eManBin.Auto (switching to automatic mode of manual override - hardware).\
Reset of the fault message of the operating monitoring systems *xQuit* = TRUE\
Enable operating monitoring **xFbControl** = FALSE

#### Operating monitoring - circulation pump 2

The operating monitoring monitors the correct function of circulation pump 2.\
The monitoring can generally be enabled (**xFbControl** = TRUE) or locked (**xFbControl** = FALSE) be disabled.\
The operating mode of manual override - hardware circulation pump 2 must be in automatic mode (*eAOO2* = HVACTYPES.eManBin.Auto).\
\
The fault message - operating monitoring - circulation pump 2 *xAlarmFb2* is activated (= TRUE) if, during the duration of the operating monitoring **udiFbControlTime** the states of the input *xFb2* and the output *xHb2* are not equal.\
\
The fault message - operating monitoring - circulation pump 2 *xAlarmFb2* is deactivated (= FALSE) if at least one of the following conditions is active:\
\
\&#xNAN;*eAOO2* = HVACTYPES.eManBin.Auto (switching to automatic mode of manual override - hardware).\
Reset of the fault message of the operating monitoring systems *xQuit* = TRUE\
Enable operating monitoring **xFbControl** = FALSE

#### Collective automatic operation message *xAuto*

The collective automatic operation message *xAuto* is activated (= TRUE) if the following conditions are simultaneously met:

* Input *eAOO1* = HVACTYPES.eManBin.Auto
* Input *eAOO2* = HVACTYPES.eManBin.Auto
* Setpoint / parameter **eManModeB1** = eMANBIN.Auto
* Setpoint / parameter **eManModeB2** = eMANBIN.Auto

### CODESYS

InOut:

| Scope       | Name                 | Type              | Initial                |
| ----------- | -------------------- | ----------------- | ---------------------- |
| Input       | `xEnOne`             | `BOOL`            |                        |
| Input       | `xEnTwo`             | `BOOL`            |                        |
| Input       | `xFb1`               | `BOOL`            |                        |
| Input       | `xFb2`               | `BOOL`            |                        |
| Input       | `xAlarmIn1`          | `BOOL`            |                        |
| Input       | `xAlarmIn2`          | `BOOL`            |                        |
| Input       | `eAOO1`              | eManBin           | eManBin.Auto           |
| Input       | `eAOO2`              | eManBin           | eManBin.Auto           |
| Input       | `xQuit`              | `BOOL`            | FALSE                  |
| Output      | `xHB1`               | `BOOL`            |                        |
| Output      | `xHB2`               | `BOOL`            |                        |
| Output      | `xAB1`               | `BOOL`            |                        |
| Output      | `xAB2`               | `BOOL`            |                        |
| Output      | `xEnergyRequest`     | `BOOL`            |                        |
| Output      | `xAlarmFb1`          | `BOOL`            |                        |
| Output      | `xAlarmFb2`          | `BOOL`            |                        |
| Output      | `tOffDelay`          | `TIME`            |                        |
| Output      | `dtLastFb1`          | `DT`              |                        |
| Output      | `dtLastFb2`          | `DT`              |                        |
| Output      | `dtAbsLastOn1`       | `DT`              |                        |
| Output      | `dtAbsLastOn2`       | `DT`              |                        |
| Output      | `udiOperatingHours1` | `UDINT`           |                        |
| Output      | `udiOperatingHours2` | `UDINT`           |                        |
| Output      | `udiCountFb1`        | `UDINT`           |                        |
| Output      | `udiCountFb2`        | `UDINT`           |                        |
| Output      | `xAlarm1`            | `BOOL`            |                        |
| Output      | `xAlarm2`            | `BOOL`            |                        |
| Output      | `xAlarm`             | `BOOL`            |                        |
| Output      | `xAuto`              | `BOOL`            |                        |
| Input Const | `eModeRedundance`    | eOpModeRedundance | eOpModeRedundance.Auto |
| Input Const | `udiFbControlTime`   | `UDINT`           | 60                     |
| Input Const | `xFbControl`         | `BOOL`            | TRUE                   |
| Input Const | `udiAbsTime`         | `UDINT`           | 120                    |
| Input Const | `todAbsStartTime`    | `TOD`             | TIME\_OF\_DAY#9:0      |
| Input Const | `eAbsDay`            | eDoW              | eDow\.Monday           |
| Input Const | `eOffDelayTimeBase`  | eTime             | eTime.Second           |
| Input Const | `udiOffDelay`        | `UDINT`           | 60                     |
| Input Const | `eManModeB2`         | eMANBIN           | eMANBIN.Auto           |
| Input Const | `eManModeB1`         | eMANBIN           | eMANBIN.Auto           |

Methods:

> mQuit

> mResetOperatingHours

Structure:

* mQuit (Method)
* mResetOperatingHours (Method)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.powerio.com/hub/codesys-hvac/en/hvac-library/functionblocks/components/duopump.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
