# Burner3P

## `Burner3P` (FB)

FUNCTION\_BLOCK Burner3P

### 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%2Fgit-blob-e8af3e0c1d11d80fc8aaf53f9245bd66b49a9984%2FBurner3P_FB.png?alt=media" alt=""><figcaption></figcaption></figure>

### Function description

#### General

This function block is used to control / regulate a heat generator depending on the demand of the heat generator *xEn*, the flow setpoint temperature *rSetPtTemp* and the flow temperature *rFdT*.\
The enable / disable of the heat generator is done via the output *xHB* ( FALSE = disabled, TRUE = enabled ).\
The flow temperature control (analogously also boiler temperature control) is performed by two power controllers (P-controllers, slow and fast) via the outputs *xMoreHB* and *xLessHB*.\
The enabling of the control is delayed (setpoint / parameter **udiWaitControl** ) after the running feedback ( *xFb* = TRUE ) of the heat generator.\
\
The following function blocks are essentially 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 flow temperature *rFdT* the sum of flow setpoint temperature *rSetPtTemp* and setpoint / parameter **rSwitchOnPoint** falls below, at the same time the general enable *xEn* 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 flow temperature *rFdT* the sum of flow setpoint temperature *rSetPtTemp* and setpoint / parameter **rSwitchOffPoint** exceeds and at the same time the general enable *xEn* active ( = TRUE ).\
A minimum off time (duration = **udiTimeMinOff**, display - remaining time: *tOnDelay* ) is always inserted between two consecutive operating cycles.\
The minimum off time always begins with the falling edge ( TRUE > FALSE ) at the input *xFb*.

#### Temperature control of the heat generator

The enabling of the temperature control is delayed (duration = **udiWaitControl**, display - remaining time: *tOnControlDelay* )\
after the active running feedback ( *xFb* = TRUE ) of the heat generator.\
The disabling of the temperature control occurs immediately after the inactive running feedback ( *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 / disabled simultaneously. (Setpoint = flow setpoint temperature *rSetPtTemp*, actual value = flow temperature *rFdT* ).\
The control signals of both power controllers are forwarded to the output controller in a minimum-value selection (forwarding the signal with the smaller 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 is freely adjustable in each case ( **tImpulsOpen** or **tImpuls Close** ), the variable pulse pauses are determined 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 operation modes ( eMANBIN.ManOn, eMANBIN.ManOff ).

| *xAB* | eMANBIN        | *xHB* | Notes                                          |
| ----- | -------------- | ----- | ---------------------------------------------- |
| FALSE | eMANBIN.Auto   | FALSE | Manual override module in automatic            |
| TRUE  | eMANBIN.Auto   | TRUE  | Manual override module in automatic            |
| X     | eMANBIN.ManOn  | TRUE  | Manual override module in manual operation On  |
| X     | eMANBIN.ManOff | FALSE | Manual override module in manual operation Off |

Legend: X = don't care

#### Aggregate fault *xAlarm*

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

#### Collective automatic mode message *xAuto*

The collective automatic mode message *xAuto* is set active ( = TRUE ) if the following conditions are met simultaneously:\\

* 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 running feedback is active ( *xFb* = TRUE ).

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

#### Currently calculated output of the heat generator *rPos*

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

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

The current **actual** Output of the heat generator can be connected to the 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 = don't care

### CODESYS

InOut:

| Scope       | Name                | Type    | Initial      |
| ----------- | ------------------- | ------- | ------------ |
| Input       | `xEn`               | `BOOL`  |              |
| Input       | `rSetPtTemp`        | `REAL`  |              |
| Input       | `xFb`               | `BOOL`  |              |
| Input       | `rU`                | `REAL`  | 0            |
| Input       | `xAlarmIn`          | `BOOL`  |              |
| Input       | `eAOO`              | eManBin | eManBin.Auto |
| Input       | `eAOOMore`          | eManBin | eManBin.Auto |
| Input       | `eAOOLess`          | eManBin | eManBin.Auto |
| Input       | `rFdT`              | `REAL`  |              |
| Output      | `xHB`               | `BOOL`  |              |
| Output      | `xAB`               | `BOOL`  |              |
| Output      | `xMoreHB`           | `BOOL`  |              |
| Output      | `xMoreAB`           | `BOOL`  |              |
| Output      | `xLessHB`           | `BOOL`  |              |
| Output      | `xLessAB`           | `BOOL`  |              |
| Output      | `rPos`              | `REAL`  |              |
| Output      | `tOnDelay`          | `TIME`  |              |
| Output      | `tOnControlDelay`   | `TIME`  |              |
| Output      | `dtLastFb`          | `DT`    |              |
| Output      | `udiOperatingHours` | `UDINT` |              |
| Output      | `udiCountFb`        | `UDINT` |              |
| Output      | `xAlarm`            | `BOOL`  |              |
| Output      | `xAuto`             | `BOOL`  |              |
| Input Const | `udiTimeTOFxFb`     | `UDINT` | 7            |
| Input Const | `tDuration`         | `TIME`  | TIME#1m0s0ms |
| Input Const | `tIntegration`      | `TIME`  | TIME#100ms   |
| Input Const | `tImpulsClose`      | `TIME`  | TIME#1s0ms   |
| Input Const | `tImpulsOpen`       | `TIME`  | TIME#1s0ms   |
| Input Const | `rKpTiny`           | `REAL`  | 0.6          |
| Input Const | `rKpBig`            | `REAL`  | 4            |
| Input Const | `rOffset`           | `REAL`  | 0            |
| Input Const | `rYDisabled`        | `REAL`  | 0            |
| Input Const | `udiWaitControl`    | `UDINT` | 3            |
| Input Const | `rSwitchOffPoint`   | `REAL`  | 2.5          |
| Input Const | `rSwitchOnPoint`    | `REAL`  | -2.5         |
| Input Const | `udiTimeMinOff`     | `UDINT` | 3            |
| Input Const | `eManModeBLess`     | eMANBIN | eMANBIN.Auto |
| Input Const | `eManModeBMore`     | eMANBIN | eMANBIN.Auto |
| Input Const | `eManModeB`         | eMANBIN | eMANBIN.Auto |
