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

# AlarmingHandB

## `AlarmingHandB` (FB)

FUNCTION\_BLOCK AlarmingHandB EXTENDS AlarmingBase

### Brief description

> Manual alarm for binary manual controls. Reports active manual operation (*eManB* ≠ `eManBin.Auto`) to the alarm manager via the internal function block `HVACAlarming.AlarmingHand` ; the alarm text is read from a text list according to the language.

### Interfaces

#### Inputs

| Name    | Data type | Value range               | Initial value | Function                                                                                            |
| ------- | --------- | ------------------------- | ------------- | --------------------------------------------------------------------------------------------------- |
| *eManB* | `eManBin` | `Auto`, `ManOff`, `ManOn` |               | Operating mode of the binary manual control; any value other than `Auto` activates the manual alarm |

#### 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                                              |
| -------- | --------- | ------ | ----------------------------------------------------- |
| *Manual* | `BOOL`    | GET    | TRUE if manual operation is active (*eManB* ≠ `Auto`) |

### 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, connects the macro info, and determines the effective alarm enable. The internal active signal is derived from *eManB* (`eManB <> eManBin.Auto`), which is used to call the internal function block `HVACAlarming.AlarmingHand` together with the alarm text, prefixes, and enable signal.

| *eManB*  | Manual alarm |
| -------- | ------------ |
| `Auto`   | inactive     |
| `ManOff` | active       |
| `ManOn`  | active       |

#### 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

Is *itfMacroInfo* connected, the function block automatically registers as a slave with the macro info. The macro info cyclically reads the *Manual* property and derives its aggregate automatic status from it (*xAutoOut* = no connected instance is in manual mode); using its *xAlarmOff* parameter, it can switch off all connected alarm function blocks together.

#### Example

{% code overflow="wrap" %}

```pascal
VAR
    fbHandPumpe : AlarmingHandB := (sTextIndex := '301');
END_VAR

fbHandPumpe(itfMacroInfo := fbMacroInfo.itfMacroInfo, eManB := eManPumpe);
```

{% endcode %}

### CODESYS

InOut:

| Scope    | Name    | Type      | Initial |
| -------- | ------- | --------- | ------- |
| Input    | `eManB` | `eManBin` |         |
| Property | `Hand`  | `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/alarminghandb.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.
