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

# CrossVentilation\_Sulzer

## `CrossVentilation_Sulzer` (FB)

FUNCTION\_BLOCK CrossVentilation\_Sulzer

### Short description

> Control of cross ventilation via window elements using four separately adjustable characteristic curves\
> \
> Characteristic curve 1: Opening time as a function of outside temperature\
> Characteristic curve 2: Opening degree as a function of outside temperature\
> Characteristic curve 3: Opening degree as a function of wind speed\
> Characteristic curve 4: Waiting time as a function of outside temperature\
> \
> Typical application: Control of cross ventilation by the room CO2 actual value

### Representation

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

### Interfaces

#### Inputs

| Name                     | Data type | Value range | Initial value | Function                                                                                                                                                                         |
| ------------------------ | --------- | ----------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *xStartCrossVentilation* | BOOL      |             | FALSE         | Start of cross ventilation (on every rising edge)                                                                                                                                |
| *xAbortCrossVentilation* | BOOL      |             | FALSE         | Abort cross ventilation (on every rising edge)                                                                                                                                   |
| *xEn\_WT*                | BOOL      |             | FALSE         | Enable / disable waiting time (TRUE = enable)                                                                                                                                    |
| *xEnComplete\_OT*        | BOOL      |             | FALSE         | Enable / disable the input 'xComplete\_OT' (FALSE = disable) (\_OT = Opening Time)                                                                                               |
| *xComplete\_OT*          | BOOL      |             | FALSE         | Enable / disable manual abort of the opening duration (on every rising edge, if xEnComplete\_OT = TRUE) (e.g. abort based on CO2 content after the opening duration has elapsed) |
| *rOutsideTemp*           | REAL      |             | 0.0           | Outside temperature                                                                                                                                                              |
| *rOutsideWindSpeed*      | REAL      |             | 0.0           | Wind speed                                                                                                                                                                       |
| *xResError*              | BOOL      |             | FALSE         | Reset of outputs 'xError' and 'sErrorCode' (on every rising edge)                                                                                                                |
| *xValidData\_OT*         | BOOL      |             | FALSE         | Validity of the data of the curve 'Opening time - outside temperature' (\_OT = Opening Time) (TRUE = valid)                                                                      |
| *xValidData\_WDOO\_OT*   | BOOL      |             | FALSE         | Validity of the data of the curve 'Window opening degree - outside temperature' (\_WDOO = Windows Degree Of Opening, \_OT = OutsideTemp) (TRUE = valid)                          |
| *xValidData\_WDOO\_WS*   | BOOL      |             | FALSE         | Validity of the data of the curve 'Window opening degree - wind speed' (\_WDOO = Windows Degree Of Opening, \_WS = Wind Speed) (TRUE = valid)                                    |
| *xValidData\_WT*         | BOOL      |             | FALSE         | Validity of the data of the curve 'Waiting time - outside temperature' (\_WT = Waiting Time) (TRUE = valid)                                                                      |

#### Inputs and outputs

| Name               | Data type           | Value range | Initial value | Function                                                                                                                                           |
| ------------------ | ------------------- | ----------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| *arData\_OT*       | stCurve\_Real\_Time |             |               | Array with the support points for the curve 'Opening time - outside temperature' (\_OT = Opening Time)                                             |
| *arData\_WDOO\_OT* | stCurve\_Real\_Real |             |               | Array with the support points for the curve 'Window opening degree - outside temperature' (\_WDOO = Windows Degree Of Opening, \_OT = OutsideTemp) |
| *arData\_WDOO\_WS* | stCurve\_Real\_Real |             |               | Array with the support points for the curve 'Window opening degree - wind speed' (\_WDOO = Windows Degree Of Opening, \_WS = Wind Speed)           |
| *arData\_WT*       | stCurve\_Real\_Time |             |               | Array with the support points for the curve 'Waiting time - outside temperature' (\_WT = Waiting Time)                                             |

#### Outputs

| Name                     | Data type | Value range | Initial value | Function                                                                                                                                              |
| ------------------------ | --------- | ----------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| *tTimeCurve\_OT*         | TIME      |             | T#0s          | Current opening time duration from the curve (\_OT = Opening Time)                                                                                    |
| *tRemainingTime\_OT*     | TIME      |             | T#0s          | Remaining time of the active opening time duration (\_OT = Opening Time)                                                                              |
| *xActive\_OT*            | BOOL      |             | FALSE         | Feedback - Active opening time duration (TRUE = active) (\_OT = Opening Time)                                                                         |
| *rDegreeCurve\_WDOO\_OT* | REAL      |             | 0.0           | Current window opening degree \[ % ] as a function of the outside temperature from the curve (\_WDOO = Windows Degree Of Opening, \_OT = OutsideTemp) |
| *rDegreeCurve\_WDOO\_WS* | REAL      |             | 0.0           | Current window opening degree \[ % ] as a function of the wind speed from the curve (\_WDOO = Windows Degree Of Opening, \_WS = Wind Speed)           |
| *rDegree\_WDOO*          | REAL      |             | 0.0           | Current window opening degree \[ % ] (\_WDOO = Windows Degree Of Opening)                                                                             |
| *xActive\_WDOO*          | BOOL      |             | FALSE         | Feedback - Active window opening (TRUE = active) (\_WDOO = Windows Degree Of Opening)                                                                 |
| *tTimeCurve\_WT*         | TIME      |             | T#0s          | Current waiting time from the curve (\_WT = Waiting Time)                                                                                             |
| *tRemainingTime\_WT*     | TIME      |             | T#0s          | Remaining time of the active waiting time (\_WT = Waiting Time)                                                                                       |
| *xActive\_WT*            | BOOL      |             | FALSE         | Feedback - Active waiting time (TRUE = active) (\_WT = Waiting Time)                                                                                  |
| *xError*                 | BOOL      |             | FALSE         | Error state (FALSE = no error, TRUE = error)                                                                                                          |
| *sErrorCode*             | STRING    |             | ‘’            | String with the numbers of the active errors                                                                                                          |

#### Setpoints / Parameters

| Name                  | Data type | Value range | Initial value | Function                                                                           |
| --------------------- | --------- | ----------- | ------------- | ---------------------------------------------------------------------------------- |
| **rOutsideTempLimit** | REAL      |             | -15           | Outside temperature threshold value below which no more window opening is started. |

### Functional description

#### Characteristic curves

All four freely adjustable characteristic curves (each with 10 support points, FB 'Curve\_10XY\_Reaö\_Real' or FB 'Curve\_10XY\_Real\_Time')\
are connected to the corresponding data inputs (arData\_XX), as are the outputs of the characteristic curves that signal the validity\
of the data (xValidData\_XX).\
The assignment of the characteristic curves to the inputs is fixed:

1. Index \_OT (Opening Time): Characteristic curve 'Opening time as a function of outside temperature'
2. Index \_WDOO\_OT (\_WDOO = Windows Degree Of Opening, \_OT = Outside Temp): Characteristic curve 'Opening time as a function of outside temperature'
3. Index \_WDOO\_WS (\_WDOO = Windows Degree Of Opening, \_WS = Wind Speed): Characteristic curve 'Opening time as a function of the outside wind speed
4. Index \_WT (Waiting Time): Characteristic curve 'Waiting time as a function of outside temperature'

If an input value (= X value) outside the range defined by support points 1 and 10 is passed to a characteristic curve, the Y value of the nearest support point is returned (example: support point 1 (1, 10), support point 10 (10, 100), X value = -5 — Y value = 10)

#### Sequence

The cross ventilation is started with a rising edge at the input 'xStartCrossVentilation'. The opening time duration is calculated from characteristic curve 1.\
The opening degree is determined and output from characteristic curves 2 and 3. After the completion of the window opening, the waiting time, calculated from characteristic curve 4,\
is started, which temporarily prevents another cross ventilation.

#### Start of cross ventilation

The cross ventilation is started with a rising edge at the input 'xStartCrossVentilation', if all of the following conditions are met:

1. The waiting time is not active (xActive\_WT = FALSE)
2. The opening time is not active (xActive\_OT = FALSE)
3. All four characteristic curves contain valid data (xValidData\_XX = TRUE)
4. The outside temperature exceeds the absolute minimum limit (rOutsideTemp > rOutsideTempLimit)

#### Opening duration

After the successful start of the cross ventilation, the opening time duration is calculated once from characteristic curve 1 depending on the current\
outside temperature. During the opening time duration, the status indicator 'xActive\_OT' is active and the remaining time duration is output at the 'tRemainingTime\_OT' output.

#### Abort

The active cross ventilation can be aborted at any time by a rising edge at the input 'xAbortCrossVentilation'.

#### Opening degree

After the successful start of the cross ventilation, the opening degree is determined once from characteristic curves 2 and 3 depending on the current outside temperature\
or the current outside wind speed:\
\
Variable Z = ((value from characteristic curve 2) X (value from characteristic curve 3)) / 100\
The variable Z is now compared with fixed range limits and the opening degree assigned to the respective range is output:\
\
0 <= Z < 15: Opening degree = 0%\
15 <= Z < 25: Opening degree = 25%\
25 <= Z < 50: Opening degree = 50%\
50 <= Z < 75: Opening degree = 75%\
Z > 75 : Opening degree = 100%\
\
The opening degree determined in this way is output at the 'rDegree\_WDOO' output, while the 'xActive\_WDOO' output signals an active window opening (= TRUE).

#### Waiting time

Immediately after completion of the opening duration, an optional waiting time until the next activation of the cross ventilation begins. For this, the waiting time duration\
must generally be enabled (xEn\_WT = TRUE). At the beginning of the waiting time, the duration is determined once from characteristic curve 4 depending on the outside temperature.\
During the active waiting time, the status indicator 'xActive\_WT' is active and the remaining time duration is output at the 'tRemainingTime\_WT' output.\
The waiting time ends when the duration expires or when the waiting time is disabled (xEn\_WT = FALSE).

#### Termination of the opening time

The opening time ends immediately when the duration expires (xEnComplete\_OT = FALSE).\
The opening time ends after the duration expires (xEnComplete\_OT = TRUE), if a rising edge has been detected at the input 'xComplete\_OT'.\
This serves to extend the opening duration until an acceptable CO2 level is reached.

#### Blocking of cross ventilation based on outside temperature

Cross ventilation is started only when the current outside temperature at the start time exceeds the adjustable threshold value 'rOutsideTempLimit'.

#### Input 'xResError'

Every rising edge at this input resets the outputs 'xError' and 'sErrorCode' to the respective non-error state.

#### Output 'xError'

The output is active (= TRUE) if at least one error has been detected ('sErrorCode <> '').

#### Output 'sErrorCode'

This output signals the current error status. An empty string '' indicates that no error is present.\
The following error states are currently defined:\
'1': xValidData\_OT = FALSE (Characteristic curve 1 without valid data)\
'2': xValidData\_WDOO\_OT = FALSE (Characteristic curve 2 without valid data)\
'3': xValidData\_WDOO\_WS = FALSE (Characteristic curve 3 without valid data)\
'4': xValidData\_WT = FALSE (Characteristic curve 4 without valid data)

#### Typical application

The output 'xActive\_WDOO' (= TRUE) signals the request to open the windows by cross ventilation, the output 'rDegree\_WDOO'\
indicates the window opening degree in the range 0.0 - 100.0% (0.0% = closed).\
This function block can be used as follows:

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

### CODESYS

InOut:

| Scope       | Name                     | Type                           | Initial  |
| ----------- | ------------------------ | ------------------------------ | -------- |
| Input       | `xStartCrossVentilation` | `BOOL`                         | FALSE    |
| Input       | `xAbortCrossVentilation` | `BOOL`                         | FALSE    |
| Input       | `xEn_WT`                 | `BOOL`                         | TRUE     |
| Input       | `xEnComplete_OT`         | `BOOL`                         | FALSE    |
| Input       | `xComplete_OT`           | `BOOL`                         | FALSE    |
| Input       | `rOutsideTemp`           | `REAL`                         | 0.0      |
| Input       | `rOutsideWindSpeed`      | `REAL`                         | 0.0      |
| Input       | `xResError`              | `BOOL`                         | FALSE    |
| Input       | `xValidData_OT`          | `BOOL`                         | FALSE    |
| Input       | `xValidData_WDOO_OT`     | `BOOL`                         | FALSE    |
| Input       | `xValidData_WDOO_WS`     | `BOOL`                         | FALSE    |
| Input       | `xValidData_WT`          | `BOOL`                         | FALSE    |
| Input       | `arData_OT`              | POINTER TO stCurve\_Real\_Time |          |
| Input       | `arData_WDOO_OT`         | POINTER TO stCurve\_Real\_Real |          |
| Input       | `arData_WDOO_WS`         | POINTER TO stCurve\_Real\_Real |          |
| Input       | `arData_WT`              | POINTER TO stCurve\_Real\_Time |          |
| Output      | `tTimeCurve_OT`          | `TIME`                         | TIME#0ms |
| Output      | `tRemainingTime_OT`      | `TIME`                         | TIME#0ms |
| Output      | `xActive_OT`             | `BOOL`                         | FALSE    |
| Output      | `rDegreeCurve_WDOO_OT`   | `REAL`                         | 0.0      |
| Output      | `rDegreeCurve_WDOO_WS`   | `REAL`                         | 0.0      |
| Output      | `rDegree_WDOO`           | `REAL`                         | 0.0      |
| Output      | `xActive_WDOO`           | `BOOL`                         | FALSE    |
| Output      | `tTimeCurve_WT`          | `TIME`                         | TIME#0ms |
| Output      | `tRemainingTime_WT`      | `TIME`                         | TIME#0ms |
| Output      | `xActive_WT`             | `BOOL`                         | FALSE    |
| Output      | `xError`                 | `BOOL`                         | FALSE    |
| Output      | `sErrorCode`             | `STRING`                       | ‘’       |
| Input Const | `rOutsideTempLimit`      | `REAL`                         | -15.0    |

Methods:

> mCalculateCurveSectionValue\_Real\_Real

> mCalculateCurveSectionValue\_Real\_Time

> mCalculateCurveValue\_Real\_Real

> mCalculateCurveValue\_Real\_Time

> mResData

Structure:

* mCalculateCurveSectionValue\_Real\_Real (Method)
* mCalculateCurveSectionValue\_Real\_Time (Method)
* mCalculateCurveValue\_Real\_Real (Method)
* mCalculateCurveValue\_Real\_Time (Method)
* mResData (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/crossventilation_sulzer.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.
