> 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-alarming-library/funktionsbausteine/alarming.md). Agents can also search and read this documentation through its [MCP server](https://support.powerio.com/hub/~gitbook/mcp).

# Alarming

## `Alarming` (FB)

FUNCTION\_BLOCK Alarming EXTENDS Alarming\_Base

### Kurzbeschreibung

> Kombinierter Alarmierungsbaustein mit fünf Meldeklassen und optionaler Prioritätssteuerung.

### Schnittstellen

#### Eingänge

| Name       | Datentyp | Wertebereich | Initialwert | Funktion                                                                                                                            |
| ---------- | -------- | ------------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| *xPrio*    | `BOOL`   |              | FALSE       | Prioritätssteuerung: TRUE unterdrückt Störung und Hinweis, solange ein Alarm ansteht, und den Hinweis, solange eine Störung ansteht |
| *xHint*    | `BOOL`   |              |             | Anstehender Hinweis (Info): TRUE aktiviert die Hinweis-Meldung                                                                      |
| *xError*   | `BOOL`   |              |             | Anstehende Störung/Warnung: TRUE aktiviert die Störmeldung                                                                          |
| *xAlarm*   | `BOOL`   |              |             | Anstehender Alarm: TRUE aktiviert die Alarm-Meldung                                                                                 |
| *xHand*    | `BOOL`   |              |             | Anstehende Hand-Meldung (Handbetrieb): TRUE aktiviert die Hand-Meldung                                                              |
| *xService* | `BOOL`   |              |             | Anstehende Service-Meldung (Wartung): TRUE aktiviert die Service-Meldung                                                            |

#### Geerbte Eingänge

| Name          | Datentyp                                           | Wertebereich | Initialwert | Funktion                                                                                                                          |
| ------------- | -------------------------------------------------- | ------------ | ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
| *pwsText*     | `POINTER TO WSTRING(GC_Alarming.gc_iMaxLenText)`   |              |             | Zeiger auf den Meldungstext (Basistext), der in der Alarmliste angezeigt wird                                                     |
| *pwsPrefix1*  | `POINTER TO WSTRING(GC_Alarming.gc_iMaxLenPrefix)` |              |             | Zeiger auf den ersten optionalen Präfix, der dem Basistext mit Leerzeichen vorangestellt wird (`""` = kein Präfix1)               |
| *pwsPrefix2*  | `POINTER TO WSTRING(GC_Alarming.gc_iMaxLenPrefix)` |              |             | Zeiger auf den zweiten optionalen Präfix, wird mit Leerzeichen nach Präfix1 und vor dem Basistext eingefügt (`""` = kein Präfix2) |
| *xAlarmEn*    | `BOOL`                                             |              | TRUE        | Freigabe der Alarmauswertung (TRUE = aktiv, FALSE = alle Meldungen dieser Instanz werden ausgetragen)                             |
| *xTextUpdate* | `BOOL`                                             |              | FALSE       | Steigende Flanke erzwingt die Neuberechnung des Meldungstextes dieser Instanz (zusätzlich zu `GV_Alarming.xTextUpdate`)           |

### Funktionsbeschreibung

#### Allgemeines

Kombinierter Alarmierungsbaustein mit fünf Meldeklassen:

| Eingang    | Meldeklasse       | Alarm-ID |
| ---------- | ----------------- | -------- |
| *xAlarm*   | Alarm             | ID\_0    |
| *xError*   | Störung / Warnung | ID\_1    |
| *xHand*    | Handbetrieb       | ID\_2    |
| *xHint*    | Hinweis / Info    | ID\_3    |
| *xService* | Service           | ID\_4    |

Jede Meldeklasse wird zyklisch anhand ihres Eingangs am Alarmmanager an- bzw. abgemeldet.

#### Prioritätssteuerung

Über *xPrio* wird eine Rangfolge zwischen Alarm, Störung und Hinweis wirksam: bei anstehendem Alarm werden Störung und Hinweis unterdrückt, bei anstehender Störung zusätzlich der Hinweis. Hand und Service sind von *xPrio* unabhängig und werden immer gemeldet.

| *xPrio* | *xAlarm* | *xError* | *xHint* | Gemeldet wird           |
| ------- | -------- | -------- | ------- | ----------------------- |
| FALSE   | TRUE     | TRUE     | TRUE    | Alarm, Störung, Hinweis |
| TRUE    | TRUE     | TRUE     | TRUE    | Alarm                   |
| TRUE    | FALSE    | TRUE     | TRUE    | Störung                 |
| TRUE    | FALSE    | FALSE    | TRUE    | Hinweis                 |

#### Meldungstext und Abschaltung

Meldungstext, Präfixe, Instanzpfad und Freigabe (*xAlarmEn*) werden vom Basisbaustein `Alarming_Base` geerbt. Beim Abschalten sorgt der dortige Puls-Timer (5 s) für das saubere Austragen aus der Alarmliste.

### CODESYS

InOut:

| Scope | Name       | Type   | Initial |
| ----- | ---------- | ------ | ------- |
| Input | `xPrio`    | `BOOL` | FALSE   |
| Input | `xHint`    | `BOOL` |         |
| Input | `xError`   | `BOOL` |         |
| Input | `xAlarm`   | `BOOL` |         |
| Input | `xHand`    | `BOOL` |         |
| Input | `xService` | `BOOL` |         |

Geerbt von `Alarming_Base`:

| Scope | Name          | Type                                               | Initial |
| ----- | ------------- | -------------------------------------------------- | ------- |
| Input | `pwsText`     | `POINTER TO WSTRING(GC_Alarming.gc_iMaxLenText)`   |         |
| Input | `pwsPrefix1`  | `POINTER TO WSTRING(GC_Alarming.gc_iMaxLenPrefix)` |         |
| Input | `pwsPrefix2`  | `POINTER TO WSTRING(GC_Alarming.gc_iMaxLenPrefix)` |         |
| Input | `xAlarmEn`    | `BOOL`                                             | TRUE    |
| Input | `xTextUpdate` | `BOOL`                                             | FALSE   |


---

# 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/hvac-alarming-library/funktionsbausteine/alarming.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.
