> 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-alarming-library/description.md).

# Description

The HVAC Alarming Library reports states of HVAC systems in five alarm classes via the CODESYS AlarmManager. The page lists the function and license.

{% columns %}
{% column width="25%" %}

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2FNFJZWlP7xK48PjnmbgFr%2FpowerIO%20Icon%20HVAC%20Alarming.png?alt=media&amp;token=b5460e0e-85b9-49ed-b112-dd629ba19e19" alt="Symbol der HVAC Alarming Library" width="100"><figcaption></figcaption></figure>
{% endcolumn %}

{% column width="75%" %}
The HVAC Alarming Library is a CODESYS library that reports the states of HVAC systems in five message classes via the CODESYS AlarmManager. The library handles adding entries to the alarm list, removing them, and preparing the message texts.
{% endcolumn %}
{% endcolumns %}

***

To help you get started right away, we offer the library as a download. The library is included in the HVAC Building Automation Package SL and is also available individually as HVAC Alarming SL in the CODESYS Store. If you need any further assistance, please don't hesitate to contact us.

<a href="https://support.powerio.com/hub/downloads/en/codesys-hvac-downloads/hvac-alarming-library.md" class="button primary" data-icon="up-right-from-square">Download</a> <a href="https://store.codesys.com/de/hvac-alarming-sl.html" class="button secondary" data-icon="seal">Purchase a license</a> <a href="https://www.powerio.com/de/kontakt" class="button secondary" data-icon="question">Get support</a>

{% hint style="info" %}
**Licensing:**

Without purchasing a license (only *Download*) the library runs for **30 minutes as an unrestricted demo version**. For productive use, a Single License (SL) / single-device license is required per controller.\
For instructions on installing licenses, please visit the page [Product Licensing](https://support.powerio.com/hub/codesys-hvac/en/overview/licensing.md).
{% endhint %}

## Overview

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-ada4176c02a7af9bc3b8c23513f6fdf58487916d%2FHVACAlarming%20Demo%20CFC.png?alt=media" alt="CFC Programm in CODESYS mit den Funktionsbausteinen AlarmingAlarm, AlarmingError, AlarmingHand, AlarmingHint, AlarmingService und Alarming. Die Texteingänge sind über ADR mit WSTRING Variablen verbunden."><figcaption><p>The HVAC Alarming Library function blocks in the CFC editor</p></figcaption></figure>

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-62cb01c460331bfb9888ddab1d80ffedd554f6b5%2FHVACAlarming%20Demo%20Alarmliste.png?alt=media" alt="CODESYS Visualisierung mit Alarmtabelle. Die Meldungen HK01 Pumpe Hand und HK01 Pumpe Alarm stehen mit Zeitstempel, Symbol und Meldeklasse in der Liste."><figcaption><p>Reported states in the CODESYS Visualization alarm table</p></figcaption></figure>

## How it works

The HVAC Alarming Library cyclically registers and unregisters system states with the CODESYS AlarmManager. A user function block only passes the active signal and a pointer to the message text. The library handles adding entries to and removing them from the alarm list, as well as formatting the display text.

There is a separate function block for each message class. The combined function block [`Alarming`](https://support.powerio.com/hub/codesys-hvac/en/hvac-alarming-library/funktionsbausteine/alarming.md) combines all five message classes and also provides priority control for alarms, faults, and notices.

## Message classes

Each message class corresponds to a fixed alarm ID in the alarm group `HVAC_Alarming`.

| Message class             | Alarm ID | Input to `Alarming` | Individual function block                                                                                                        |
| ------------------------- | -------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Alarm                     | ID\_0    | *xAlarm*            | [`AlarmingAlarm`](https://support.powerio.com/hub/codesys-hvac/en/hvac-alarming-library/funktionsbausteine/alarmingalarm.md)     |
| Fault / Warning           | ID\_1    | *xError*            | [`AlarmingError`](https://support.powerio.com/hub/codesys-hvac/en/hvac-alarming-library/funktionsbausteine/alarmingerror.md)     |
| Manual / Manual operation | ID\_2    | *xHand*             | [`AlarmingHand`](https://support.powerio.com/hub/codesys-hvac/en/hvac-alarming-library/funktionsbausteine/alarminghand.md)       |
| Notice / Info             | ID\_3    | *xHint*             | [`AlarmingHint`](https://support.powerio.com/hub/codesys-hvac/en/hvac-alarming-library/funktionsbausteine/alarminghint.md)       |
| Service / Maintenance     | ID\_4    | *xService*          | [`AlarmingService`](https://support.powerio.com/hub/codesys-hvac/en/hvac-alarming-library/funktionsbausteine/alarmingservice.md) |

## Message text

The HVAC Alarming Library assembles the text in the alarm list from up to four parts, each separated by a space:

1. Prefix 1 from *pwsPrefix1*, optional
2. Prefix 2 from *pwsPrefix2*, optional
3. Base text from *pwsText*
4. Instance path in the form `>>> Instance path <<<`, if `GV_Alarming.xInstNameOn` is set

Example: prefix 1 `HK01`, prefix 2 `Pumpe` and base text `Alarm` result in the message `HK01 Pumpe Alarm`.

The library calculates the text on the first call and after alarming is enabled again. A change to `GV_Alarming.xInstNameOn` and a rising edge on `GV_Alarming.xTextUpdate` or on the input *xTextUpdate* also triggers recalculation.

{% hint style="info" %}
The text inputs are pointers to `WSTRING` variables. The strings must exist permanently in the application. Therefore, pass variables such as `ADR(wsTxtAlarm)` and not temporary expressions.
{% endhint %}

## Disable alarming

Alarming can be disabled for an instance using *xAlarmEn* and globally using `GV_Alarming.xAlarmlistOFF` After alarming is disabled, the function block remains active for another 5 s and deregisters all message classes for the instance during this time. The alarm task needs this delay to register the removal from the alarm list. The constant `GC_Alarming.gc_tAlarmDisableDelay` sets the delay; the default value is 5 s.

{% hint style="warning" %}
Continue calling the instance cyclically for the entire 5-second delay. Otherwise, its messages will remain in the alarm list.
{% endhint %}

## System requirements and licensing

The HVAC Alarming Library is part of the [HVAC Building Automation Package SL](https://store.codesys.com/de/hvac-building-process-automation-sl.html). If this license is active on the controller, no additional license is required. Without the package, the library is available separately as [HVAC Alarming SL](https://store.codesys.com/de/hvac-alarming-sl.html) .

| **Documentation Version**      | <code class="expression">space.vars.HVACAlarming\_library\_latest</code>                                                                                                               |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Placeholder**                | `HVACAlarming`                                                                                                                                                                         |
| **Available in CODESYS Store** | *Yes*                                                                                                                                                                                  |
| **Programming system**         | *CODESYS V3.5.21.2 or higher*                                                                                                                                                          |
| **Runtime system**             | *CODESYS Control V4.10.0.0 or higher*                                                                                                                                                  |
| **Licensing**                  | *Single License (single-device license)*                                                                                                                                               |
| **License**                    | [HVAC Building Automation Package SL](https://store.codesys.com/de/hvac-building-process-automation-sl.html) or [HVAC Alarming SL](https://store.codesys.com/de/hvac-alarming-sl.html) |


---

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