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

# AlarmingError

## `AlarmingError` (FB)

FUNCTION\_BLOCK AlarmingError EXTENDS AlarmingBase

### Brief description

> Individual alarm in the fault / warning alarm class. Reports the state of *xActive* to the alarm manager via the internal function block `HVACAlarming.AlarmingError` ; the alarm text is read from a text list according to the selected language.

### Interfaces

#### Inputs

| Name      | Data type | Value range | Initial value | Function                                                                        |
| --------- | --------- | ----------- | ------------- | ------------------------------------------------------------------------------- |
| *xActive* | `BOOL`    |             |               | Active fault alarm signal: TRUE activates the fault alarm, FALSE deactivates it |

#### Inherited inputs

| Name                  | Data type    | Value range | Initial value | Function                                                                                                              |
| --------------------- | ------------ | ----------- | ------------- | --------------------------------------------------------------------------------------------------------------------- |
| *itfMacroInfo*        | `IMacroInfo` |             |               | Optional macro information source: plant designation as Prefix1, collective alarm disabling via *xAlarmOff*; 0 = none |
| *sTextIndexDeviceTag* | `STRING(16)` |             | `''`          | Text index of the DeviceTag text (Prefix2); empty = no DeviceTag prefix                                               |
| *sTextListDeviceTag*  | `STRING(64)` |             | `''`          | Text list for the DeviceTag text; empty = `GV_Alarming.sTextList`                                                     |
| *sTextIndex*          | `STRING(16)` |             | `'0'`         | Text index of the alarm text                                                                                          |
| *sTextList*           | `STRING(64)` |             | `''`          | Text list for the alarm text; empty = `GV_Alarming.sTextList`                                                         |
| *xTextUpdate*         | `BOOL`       |             | FALSE         | Trigger an update of the alarm text; resets automatically                                                             |
| *xAlarmEn*            | `BOOL`       |             | TRUE          | Enable alarm                                                                                                          |

#### Inherited outputs

| Name            | Data type | Function                                                                          |
| --------------- | --------- | --------------------------------------------------------------------------------- |
| *xDefaultText1* | `BOOL`    | TRUE if the default text was returned for the alarm text (language not found)     |
| *xDefaultText2* | `BOOL`    | TRUE if the default text was returned for the DeviceTag text (language not found) |

#### Properties

| Property | Data type | Access | Function                                       |
| -------- | --------- | ------ | ---------------------------------------------- |
| *Err*    | `BOOL`    | GET    | Current fault state (corresponds to *xActive*) |

### Function description

#### General

The function block first calls the base function block `AlarmingBase` (`SUPER^()`), which checks the license, reads the alarm text and DeviceTag text from the text lists, binds the macro info, and determines the effective alarm enable. The internal function block `HVACAlarming.AlarmingError` is then called with the alarm text, both prefixes, the enable, and *xActive* The internal function block handles registering with and unregistering from the alarm manager only when the *xActive*.

#### alarm text

The displayed text is composed of Prefix1 (the system designation from the macro info), Prefix2 (the DeviceTag text, optionally with additional text), and the alarm text. For details, see Alarming → How it works.

The text is recalculated when *xTextUpdate*, `GV_Alarming.xTextUpdate`is triggered, when the text in the macro info changes (method `UpdateAlarmText`) or when `mPrefix2Ex`.

#### Instance path

Before each call, one level is removed from the instance path of the internal alarm function block (`DelLastInstanceName(iDelLastCount := 1)`). When instance path display is enabled (`HVACAlarming.GV_Alarming.xInstNameOn`), this displays the path of this instance rather than that of the internal `_FbAlarm`.

#### Macro info

If *itfMacroInfo* is bound, the function block automatically registers as a slave with the macro info. Using its parameter *xAlarmOff* the macro info can switch off all bound alarm function blocks together.

{% hint style="info" %}
The *Err* property returns the raw state of *xActive*, regardless of *xAlarmEn* or *xAlarmOff*. The macro info *Err* does not currently include it in its aggregate outputs.
{% endhint %}

#### Example

{% code overflow="wrap" %}

```pascal
VAR
    fbErrPumpe : AlarmingError := (sTextIndex := '201');
END_VAR

fbErrPumpe(itfMacroInfo := fbMacroInfo.itfMacroInfo, xActive := xPumpeStoerung);
```

{% endcode %}

### CODESYS

InOut:

| Scope    | Name      | Type   | Initial |
| -------- | --------- | ------ | ------- |
| Input    | `xActive` | `BOOL` |         |
| Property | `Err`     | `BOOL` |         |

Inherited from `AlarmingBase`:

| Scope          | Name                  | Type         | Initial |
| -------------- | --------------------- | ------------ | ------- |
| Input          | `itfMacroInfo`        | `IMacroInfo` |         |
| Input CONSTANT | `sTextIndexDeviceTag` | `STRING(16)` | `''`    |
| Input CONSTANT | `sTextListDeviceTag`  | `STRING(64)` | `''`    |
| Input CONSTANT | `sTextIndex`          | `STRING(16)` | `'0'`   |
| Input CONSTANT | `sTextList`           | `STRING(64)` | `''`    |
| Input CONSTANT | `xTextUpdate`         | `BOOL`       | FALSE   |
| Input CONSTANT | `xAlarmEn`            | `BOOL`       | TRUE    |
| Output         | `xDefaultText1`       | `BOOL`       |         |
| Output         | `xDefaultText2`       | `BOOL`       |         |


---

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