> 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/hvac-library/functionblocks/monitoring/airshortage.md).

# AirShortage

## `AirShortage` (FB)

FUNCTION\_BLOCK AirShortage

### Kurzbeschreibung

> Erkennung einer Luftmangelsituation und Erzeugung einer Störmeldung\
> \
> Typische Anwendung: Luftmangelüberwachung an einem Ventilator mit einem Differenzdruckschalter

### Darstellung

<figure><img src="/files/Q4YaFAet32uCXK4xVpzB" alt=""><figcaption></figcaption></figure>

### Schnittstellen

#### Eingänge

| Name     | Datentyp | Wertebereich | Initialwert | Funktion                                                                |
| -------- | -------- | ------------ | ----------- | ----------------------------------------------------------------------- |
| *xPFb*   | BOOL     |              |             | Eingang Prozessrückmeldung (Differenzdruckschalter), FALSE = Luftmangel |
| *xFanFb* | BOOL     |              |             | Betriebsmeldung des Ventilators                                         |
| *xQuit*  | BOOL     |              | FALSE       | Rücksetzung der Störmeldung                                             |

#### Ausgänge

| Name           | Datentyp | Wertebereich | Initialwert | Funktion                                    |
| -------------- | -------- | ------------ | ----------- | ------------------------------------------- |
| *xAlarm*       | BOOL     |              |             | Ausgang - Störmeldung                       |
| *tTimeToAlarm* | TIME     |              |             | Zeitdauer bis zur Auslösung der Störmeldung |

#### Sollwerte / Parameter

| Name             | Datentyp | Wertebereich | Initialwert | Funktion                                    |
| ---------------- | -------- | ------------ | ----------- | ------------------------------------------- |
| *udiControlTime* | UDINT    | 1s … 3600s   | 30s         | Wartezeit bis Eingang xPFb ausgewertet wird |
| **xControl**     | BOOL     |              | TRUE        | Freigabe der Überwachung                    |

### Funktionsbeschreibung

#### Allgemeines

Dieser Funktionsbaustein dient zur Erkennung einer Luftmangelsituation an einem Ventilator durch die Auswertung der Signale Eingang - Differenzdruckschalter *xPFb* und Betriebsmeldung - Ventilator *xFanFb*.

#### Ausgang - Störmeldung *xAlarm*

Der Ausgang - Störmeldung *xAlarm* wird aktiviert (*xAlarm* = TRUE), falls die unten stehende Bedingungen 1 und 2 gleichzeitig erfüllt sind.\
\
Bedingung 1: Der Eingang für den Differenzdruckschalter *xPFb* befindet sich mindestens während Wartezeit *udiControlTime* permanent im Zustand FALSE (= Luftmangelsituation).\
Gleichzeitig ist die Überwachung generell freigegeben (**xControl** = TRUE).\
\
Bedingung 2: Die Betriebsmeldung für den Ventilator *xFanFb* befindet sich mindestens während Wartezeit *udiControlTime* permanent im Zustand TRUE (= Ventilator in Betrieb).\
Gleichzeitig ist die Überwachung generell freigegeben (**xControl** = TRUE).\
\
\
Der Ausgang - Störmeldung *xAlarm* wird in folgenden Fällen deaktiviert (*xAlarm* = FALSE):\
\
Fall 1: Die Bedingungen 1 und / oder 2 sind nicht erfüllt und die Rücksetzung der Störmeldung *xQuit* ist aktiv (= TRUE).\
\
Fall 2: Die Bedingungen 1 und / oder 2 sind nicht erfüllt und die Freigabe der Überwachung **xControl** ist nicht aktiv (= FALSE).

#### Zeitdauer bis zur Auslösung der Störmeldung *tTimeToAlarm*

Am Ausgang Zeitdauer bis zur Auslösung der Störmeldung *tTimeToAlarm* werden je nach Betriebssituation unterschiedliche Werte angezeigt.\
\
Situation 1: Ausgabe der Restzeitdauer bis zur Auslösung der Störmeldung (Bedingungen: *xPFb* = FALSE, **xControl** = TRUE, *xFanFb* = TRUE)\
\
Situation 2: Falls die Situation 1 nicht vorliegt, so wird permanent der Wert 0.0 ausgegeben.

### CODESYS

InOut:

| Scope       | Name             | Type    | Initial |
| ----------- | ---------------- | ------- | ------- |
| Input       | `xPFb`           | `BOOL`  |         |
| Input       | `xFanFb`         | `BOOL`  |         |
| Input       | `xQuit`          | `BOOL`  | FALSE   |
| Input Const | `udiControlTime` | `UDINT` | 30      |
| Input Const | `xControl`       | `BOOL`  | TRUE    |
| Output      | `xAlarm`         | `BOOL`  |         |
| Output      | `tTimeToAlarm`   | `TIME`  |         |


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.powerio.com/hub/codesys-hvac/hvac-library/functionblocks/monitoring/airshortage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
