> 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/burner2stage.md).

# Burner2Stage

## `Burner2Stage` (FB)

FUNCTION\_BLOCK Burner2Stage

### Short description

> Control of a heat generator (temperature control via binary control commands More / Less)\
> \
> Typical application: heat generation

### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2FHjR8EjW3UHQFMTH97BKm%2FBurner2Stage.png?alt=media&amp;token=b812c1bb-ea77-49bc-a937-e4bec110ad03" alt=""><figcaption></figcaption></figure>

### Functional description

#### General

This function block is used to control/regulate a heat generator depending on the heat generator demand *xEn*, the supply setpoint temperature *rSetPtTemp* and the supply temperature *rFdT*.\
Enable/disable of the heat generator is via output *xHB* (FALSE = lockout, TRUE = enable).\
The supply temperature control (also boiler temperature control in analog form) is performed by means of two power controllers (P controllers, slow and fast) via the outputs *xMoreHB* and *xLessHB*.\
The release of the control is delayed by two seconds (setpoint / parameter **udiWaitControl**) after the operating feedback (*xFb* = TRUE) of the heat generator.\
\
Essentially the following function blocks are used:

ControlP

Out3P

OperatingHours

ManBin

#### Enable / disable of the heat generator

The enabling of the heat generator (*xAB* = TRUE, *xHB* = TRUE (eManModeB = eManBin.Auto)) occurs if the supply temperature *rFdT* the sum of supply setpoint temperature *rSetPtTemp* and setpoint / parameter **rSwitchOnPoint** falls below, at the same time the general enable *xEn* is active (= TRUE) and the minimum off time is not active.\
The disabling of the heat generator (*xAB* = FALSE, *xHB* = FALSE (eManModeB = eManBin.Auto)) occurs if the supply temperature *rFdT* the sum of supply setpoint temperature *rSetPtTemp* and setpoint / parameter **rSwitchOffPoint** exceeds and at the same time the general enable *xEn* is active (= TRUE).\
Between two successive operating cycles, a minimum off time (duration = **udiTimeMinOff**, display - remaining time: *tOnDelay*) is inserted.\
The minimum off time begins each time with the falling edge (TRUE > FALSE) at input *xFb*.

#### Temperature control of the heat generator

The enabling of temperature control occurs with a time delay (duration = **udiWaitControl**, display - remaining time: *tOnControlDelay*)\
after the active operating message (*xFb* = TRUE) of the heat generator.\
The disabling of the temperature control occurs immediately after the inactive operating message (*xFb* = FALSE) of the heat generator (switch-off value: **rYDisabled**).\
The two internal power controllers ( P controllers, slow and fast, output range each -100.0 - 100.0 %) are enabled / locked at the same time. (Setpoint = supply setpoint temperature *rSetPtTemp*, actual value = supply temperature *rFdT*).\
The actuating signals of both power controllers are fed to the output controller in minimum value selection (forwarding of the signal with the lower value) in the range -100.0 - 100.0 %.\
The output controller finally generates output signals for a 3-point actuator (pulse-width modulation, integration interval = **tIntegration**) with the outputs *xMoreHB* or *xLessHB*.\
The constant pulse duration for the two outputs can each be set freely (**tImpulsOpen** or **tImpuls Close**), the variable pulse pauses are defined by the output controller.\
The two power controllers can be configured individually and independently of each other (P controller fast: gain factor **rKpBig**, P controller slow: gain factor **rKpTiny**).

#### Manual override of the digital outputs

All digital control outputs after manual override (*xHB*, xMoreHB\*, *xLessHB*) can be operated either in automatic mode (eMANBIN.Auto) or in one of the two manual operating modes (eMANBIN.ManOn, eMANBIN.ManOff).

| *xAB* | eMANBIN        | *xHB* | 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

#### Collective fault *xAlarm*

The collective fault *xAlarm* is active (= TRUE), if the fault message of the heat generator *xAlarmIn* is active (= TRUE).\
In all other situations, the collective fault *xAlarm* not active (= FALSE).

#### Collective automatic operation message *xAuto*

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

* Input *eAOO* = HVACTYPES.eManBin.Auto
* Input *eAOOMore* = HVACTYPES.eManBin.Auto
* Input *eAOOLess* = HVACTYPES.eManBin.Auto
* Setpoint / parameter **eManModeB** = eMANBIN.Auto
* Setpoint / parameter **eManModeBMore** = eMANBIN.Auto
* Setpoint / parameter **eManModeBLess** = eMANBIN.Auto

#### Operating hours counter - heat generator

The operating hours counter (*udiOperatingHours*, *udiCountFb*) for the heat generator is active when the operating message is active (*xFb* = TRUE).

> **Write access to the counter values**
>
> Via the path ‘InstanceName.\_OperatingHours.udiOperatingHours’ or ‘InstanceName.\_OperatingHours.udiCountFb’, write access to both counter values is possible.
>
> **Prerequisite for the use of function block Burner3P**
>
> For correct operation, the use of the TimeRead2 function block is required.

#### Current calculated power of the heat generator *rPos*

The current **calculated power** of the heat generator is displayed at output *rPos* in the range 0.0 - 100.0 %.\
For this, the correct specification of the actuator running time between minimum and maximum power (**tDuration**) is required.\
No repositioning to a reference position takes place.

#### Feedback of the heat generator power *rU*

The current **actual** power of the heat generator can be connected at input *rU* .\
This input is currently not used for control and regulation purposes.

#### Inactive state (*xEn* = FALSE)

| *xHB*                            | *xAB* | *xMoreHB*                            | *xMoreAB* | *xLessHB*                            | *xLessAB* | *rPos* | *tOnDelay* | *tOnControlDelay* | *dtLastFb* | *udiOperatingHours* | *udiCountFb* | *xAlarm*            | *xAuto*   | Notes         |
| -------------------------------- | ----- | ------------------------------------ | --------- | ------------------------------------ | --------- | ------ | ---------- | ----------------- | ---------- | ------------------- | ------------ | ------------------- | --------- | ------------- |
| FALSE (eManModeB = eManBin.Auto) | FALSE | FALSE (eManModeBMore = eManBin.Auto) | FALSE     | FALSE (eManModeBLess = eManBin.Auto) | FALSE     | 0.0 %  | old value  | old value         | old value  | old value           | old value    | State of *xAlarmIn* | old value | *xEn* = FALSE |

Legend: X = any

### CODESYS

InOut:

| Scope       | Name                 | Type    | Initial      |
| ----------- | -------------------- | ------- | ------------ |
| Input       | `xEn`                | `BOOL`  |              |
| Input       | `rSetPtTemp`         | `REAL`  |              |
| Input       | `xFb1`               | `BOOL`  |              |
| Input       | `xFb2`               | `BOOL`  |              |
| Input       | `xAlarmIn`           | `BOOL`  |              |
| Input       | `eAOO1`              | eManBin | eManBin.Auto |
| Input       | `eAOO2`              | eManBin | eManBin.Auto |
| Input       | `rFdT`               | `REAL`  |              |
| Output      | `xHB1`               | `BOOL`  |              |
| Output      | `xAB1`               | `BOOL`  |              |
| Output      | `xHB2`               | `BOOL`  |              |
| Output      | `xAB2`               | `BOOL`  |              |
| Output      | `tOnDelay`           | `TIME`  |              |
| Output      | `tOn2Delay`          | `TIME`  |              |
| Output      | `dtLastFb`           | `DT`    |              |
| Output      | `udiOperatingHours`  | `UDINT` |              |
| Output      | `udiCountFb`         | `UDINT` |              |
| Output      | `dtLastFb2`          | `DT`    |              |
| Output      | `udiOperatingHours2` | `UDINT` |              |
| Output      | `udiCountFb2`        | `UDINT` |              |
| Output      | `xAlarm`             | `BOOL`  |              |
| Output      | `xAuto`              | `BOOL`  |              |
| Input Const | `udiTimeTOFxFb`      | `UDINT` | 7            |
| Input Const | `udiWait2`           | `UDINT` | 3            |
| Input Const | `rSwitchOffPoint1`   | `REAL`  | 2.5          |
| Input Const | `rSwitchOffPoint2`   | `REAL`  | -1           |
| Input Const | `rSwitchOnPoint1`    | `REAL`  | -2.5         |
| Input Const | `rSwitchOnPoint2`    | `REAL`  | -1.5         |
| Input Const | `udiTimeMinOff`      | `UDINT` | 3            |
| Input Const | `eManModeB2`         | eMANBIN | eMANBIN.Auto |
| Input Const | `eManModeB1`         | eMANBIN | eMANBIN.Auto |


---

# 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/burner2stage.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.
