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

# CascadeExtractSupplyAirTemp2Setpt

## ![../../../\_images/CascadeExtractSupplyAirTemp2Setpt\_FB.png](file:///Users/kevinrohn/Development/general/extract-codesys-docs/hvac-library/html/_images/CascadeExtractSupplyAirTemp2Setpt_FB.png)`CascadeExtractSupplyAirTemp2Setpt` (FB)

FUNCTION\_BLOCK CascadeExtractSupplyAirTemp2Setpt

### Short description

> Formation of two supply air setpoints by means of two cascade controllers (PI controllers)\
> Additional functions: limiting the supply air setpoints\
> Typical application: supply air temperature control in a ventilation system with active cooling\\

### Representation

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

### Functional description

#### General

This function block corresponds to the block ‘CascadeExtractSupplyAirTemperature’, which here is extended by an additional cascade controller for forming a separate supply air setpoint for the cooler in active cooling operation.

CascadeExtractSupplyAirTemperature

This function block is used to form the supply air setpoint of a ventilation system from:<br>

1. Current setpoint temperature (exhaust air or room temperature) in °C

\
2\) Current actual temperature (exhaust air or room temperature) in °C\
\
taking into account the relative (rMinSUPTemp or rMaxSUPTemp) and absolute (rMinSUP or rMaxSUP) limits.\
In addition, when forming the supply air setpoint, the special operating modes ‘Rapid heating’ and ‘Free night cooling’ are taken into account.\
The supply air setpoint is formed with a delay (tDelayControl) after the controller is enabled / disabled (xEn = TRUE).\
\
The cascade controller is enabled if the following conditions described below are all met at the same time:\
\
1\) The special operating mode Rapid heating is disabled (xFastHeatEn = FALSE).\
\
2\) The special operating mode Free night cooling is disabled (xFNCEn = FALSE).\
\
3\) The current actual temperature rActTemp does not violate its absolute limit values (+5.0 - +50.0 °C).\
\
4\) Control is enabled (xEn = TRUE) and the switch-on delay (duration = tDelayControl) has ended.\
\
In all other situations, the cascade controller is disabled.

#### Control

The current actual temperature *rActTemp* is permanently compared with the current setpoint temperature when the cascade controller is enabled (PI controller, *xEn* = TRUE, expiration of the duration **tDelayControl**, no limit value violation at the input *rActTemp*) and depending on the amount / sign of the difference or on the controller settings ( *rSetPtTemp* compared and depending on the magnitude / sign of the difference or depending on the controller settings (**rPI\_Kp** or **rPI\_Tn**) a displacement temperature is generated in the cascade controller.\
\
In heating mode (*rActTemp* < *rSetPtTemp*) a positive displacement temperature is thus generated in the range 0.0 - **rMaxRelativeSUP**  K.\
In cooling mode (*rActTemp* > *rSetPtTemp*) a negative displacement temperature is thus generated in the range 0.0 - **rMinRelativeSUP**  K.\
In the fully regulated state (*rActTemp* = *rSetPtTemp*) the displacement temperature does not change.\
\
This displacement temperature is then added to the current setpoint temperature and, if necessary, limited to the calculated limits *rMinSUPTemp* or *rMaxSUPTemp* .\
\
At output *rMinSUPTemp* the calculated minimum supply air setpoint temperature (*rActTemp* + **rMinRelativeSUP**, absolutely limited to **rMinSUP** or **rMaxSUP**) is permanently displayed.\
At output *rMaxSUPTemp* the calculated maximum supply air setpoint temperature (*rActTemp* + **rMaxRelativeSUP**, absolutely limited to **rMinSUP** or **rMaxSUP**) is permanently displayed.\
\
The current actual temperature *rActTemp* is monitored for compliance with limit values.\
At every limit violation (*rActTemp* < +5.0 °C or *rActTemp* > +50.0 °C) the cascade controller is deactivated.

#### Selection of the supply air setpoint temperature

The selection of the supply air setpoint temperature is carried out according to the following function table.

| *xFastHeatEn* | *xFNCEn* | *rActTemp* within limit values | *xEn* | Supply air setpoint temperature         | Notes                                       |
| ------------- | -------- | ------------------------------ | ----- | --------------------------------------- | ------------------------------------------- |
| TRUE          | X        | X                              | X     | **rMaxSUP**                             | Special operating mode ‘Rapid heating’      |
| FALSE         | TRUE     | X                              | X     | **rMinSUP**                             | Special operating mode ‘Free night cooling’ |
| FALSE         | FALSE    | FALSE                          | X     | *rSetPtTemp*                            | Actual temperature limit violation          |
| FALSE         | FALSE    | X                              | FALSE | *rSetPtTemp*                            | Control lockout                             |
| FALSE         | FALSE    | TRUE                           | TRUE  | *rSetPtTemp* + displacement temperature | Normal operation                            |

Legend: X = any

#### Formation of the current supply air setpoint temperature *rSetPtSUPTemp*

The current supply air setpoint temperature *rSetPtSUPTemp* is formed from the supply air setpoint temperature, extended by a manual override module.

| Supply air setpoint temperature | **eManModeN** | *rSetPtSUPTemp*                 | Notes                                    |
| ------------------------------- | ------------- | ------------------------------- | ---------------------------------------- |
| X                               | eMANNUM.Auto  | Supply air setpoint temperature | Manual override module in automatic mode |
| X                               | eMANNUM.Man   | **rManValue**                   | Manual override module in manual mode    |

Legend: X = any

#### Cascade controller for active cooling operation (PI controller)

This cascade controller is used to form the supply air setpoint temperature for a cooling unit from<br>

1. Current setpoint temperature (maximum value from (*rSetPtTemp* + 1) and *rSetPtTempCool*)

\
2\) Current actual temperature (exhaust air or room temperature) in °C\
\
taking into account the following limits:\
\
Minimum value - output signal of the cascade controller: rMinSUPTemP - (maximum value from (rSetPtTemp + 1) and rSetPtTempCool)\
\
Maximum value - output signal of the cascade controller: rMaxSUPTemP - (maximum value from (rSetPtTemp + 1) and rSetPtTempCool)\
\
The supply air setpoint temperature is formed after enabling / disabling the main cascade controller, provided that the input xEnCool is active (= TRUE).\
\
The cascade controller for active cooling operation is enabled if the following conditions described below are all met at the same time:\
\
1\) The special operating mode Rapid heating is disabled (xFastHeatEn = FALSE).\
\
2\) The special operating mode Free night cooling is disabled (xFNCEn = FALSE).\
\
3\) The current actual temperature rActTemp does not violate its absolute limit values (+5.0 - +50.0 °C).\
\
4\) Control is enabled (xEn = TRUE) and the switch-on delay (duration = tDelayControl) has ended.\
\
5\) The input \*xEnCool\* is enabled (xEnCool = TRUE).\
\
In all other situations, the cascade controller for active cooling operation is disabled.

#### Control

The current actual temperature *rActTemp* is permanently compared with the current setpoint temperature (maximum value from (*rSetPtTemp* + 1) and *rSetPtTempCool*) and depending on the magnitude / sign of the difference or depending on the controller settings (**rPI\_Kp** or **rPI\_Tn**) a displacement temperature for active cooling operation is generated in the cascade controller.\
\
In heating mode (*rActTemp* < current setpoint temperature) a positive displacement temperature is thus generated in the range 0.0 - minimum value - output signal of the cascade controller for active cooling operation K.\
In cooling mode (*rActTemp* > current setpoint temperature) a negative displacement temperature is thus generated in the range 0.0 - maximum value - output signal of the cascade controller for active cooling operation K.\
In the fully regulated state (*rActTemp* = current setpoint temperature) the displacement temperature does not change.\
\
This displacement temperature is then added to the current setpoint temperature and, if necessary, limited to the calculated limit values *rMinSUPTemp* or *rMaxSUPTemp* .\
\
The current actual temperature *rActTemp* is monitored for compliance with limit values.\
At every limit violation (*rActTemp* < +5.0 °C or *rActTemp* > +50.0 °C) the cascade controller is deactivated.

#### Selection of the supply air setpoint temperature

The selection of the supply air setpoint temperature is carried out according to the following function table.

| Enable cascade controller for active cooling operation | *rActTemp* within limit values | Supply air setpoint temperature                            | Notes                 |
| ------------------------------------------------------ | ------------------------------ | ---------------------------------------------------------- | --------------------- |
| FALSE                                                  | X                              | Maximum value from (*rSetPtTemp* + 1) and *rSetPtTempCool* | Controller disabled   |
| X                                                      | FALSE                          | Maximum value from (*rSetPtTemp* + 1) and *rSetPtTempCool* | Limit value violation |
| TRUE                                                   | TRUE                           | Current setpoint temperature + displacement temperature    | Normal operation      |

Legend: X = any

#### Formation of the current supply air setpoint temperature *rSetPtSUPTempCool*

The current supply air setpoint temperature *rSetPtSUPTempCool* is formed from the supply air setpoint temperature, extended by a manual override module.

| Supply air setpoint temperature | **eManModeNCool** | *rSetPtSUPTempCool*             | Notes                                    |
| ------------------------------- | ----------------- | ------------------------------- | ---------------------------------------- |
| X                               | eMANNUM.Auto      | Supply air setpoint temperature | Manual override module in automatic mode |
| X                               | eMANNUM.Man       | **rManValueCool**               | Manual override module in manual mode    |

Legend: X = any\\

### CODESYS

InOut:

| Scope       | Name                | Type    | Initial      |
| ----------- | ------------------- | ------- | ------------ |
| Input       | `xEn`               | `BOOL`  |              |
| Input       | `rActTemp`          | `REAL`  | 0            |
| Input       | `rSetPtTemp`        | `REAL`  | 21           |
| Input       | `rSetPtTempCool`    | `REAL`  | 24           |
| Input       | `xEnCool`           | `BOOL`  |              |
| Input       | `xFastHeatEn`       | `BOOL`  | FALSE        |
| Input       | `xFNCEn`            | `BOOL`  | FALSE        |
| Output      | `rSetPtSUPTemp`     | `REAL`  |              |
| Output      | `rSetPtSUPTempCool` | `REAL`  |              |
| Output      | `rMinSUPTemp`       | `REAL`  |              |
| Output      | `rMaxSUPTemp`       | `REAL`  |              |
| Input Const | `rPI_Tn`            | `REAL`  | 600          |
| Input Const | `rPI_Kp`            | `REAL`  | 1            |
| Input Const | `rMaxSUP`           | `REAL`  | 26           |
| Input Const | `rMaxRelativeSUP`   | `REAL`  | 6            |
| Input Const | `rMinSUP`           | `REAL`  | 16           |
| Input Const | `rMinRelativeSUP`   | `REAL`  | -8           |
| Input Const | `tDelayControl`     | `TIME`  | TIME#5m0s0ms |
| Input Const | `rManValueCool`     | `REAL`  |              |
| Input Const | `eManModeNCool`     | eManNum | eManNum.Auto |
| Input Const | `rManValue`         | `REAL`  |              |
| Input Const | `eManModeN`         | eManNum | eManNum.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/control/cascadeextractsupplyairtemp2setpt.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.
