> 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/energy/hxchart.md).

# hxChart

## `hxChart` (FB)

FUNCTION\_BLOCK hxChart

### Short description

> Calculation of state variables of moist air based on the Mollier h,x diagram\
> Quantities: enthalpy, dew point temperature, absolute humidity\
> Typical application: calculation of the dew point temperature in a zone

### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2Fgit-blob-906072320167f8c1fe8ee104657d5c457c8d5019%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Interfaces

#### Inputs

| Name  | Data type | Value range    | Initial value | Function                       |
| ----- | --------- | -------------- | ------------- | ------------------------------ |
| *rT*  | REAL      | -20.0 to +50.0 |               | Temperature in degrees Celsius |
| *rRH* | REAL      | 0.1 to 100.0   |               | Relative humidity in percent   |

#### Outputs

| Name   | Data type | Value range | Initial value | Function                                                        |
| ------ | --------- | ----------- | ------------- | --------------------------------------------------------------- |
| *rH*   | REAL      |             |               | Enthalpy in kJ/kg                                               |
| *rX*   | REAL      |             |               | Absolute humidity in grams of water vapor / kilogram of dry air |
| *rDP*  | REAL      |             |               | Dew point temperature in degrees Celsius                        |
| *xErr* | BOOL      |             |               | Collective fault                                                |

#### Setpoints / Parameters

| Name   | Data type | Value range     | Initial value | Function             |
| ------ | --------- | --------------- | ------------- | -------------------- |
| **rP** | REAL      | 800.0 to 1200.0 | 980           | Air pressure in mbar |

### Functional description

#### General

This function block is used to calculate essential state variables of moist air based on the Mollier h,x diagram.\
For this, the current values of air temperature in degrees Celsius and relative humidity in percent must be provided.\
Ideally, for high accuracy, the current air pressure in mbar is available; however, it can be replaced by a constant adjusted to the altitude of the measuring location (barometric formula).

| Sea level (m) | Air pressure (mbar) | Constant |
| ------------- | ------------------- | -------- |
| 0             | 1013                | 10130    |
| 300           | 980                 | 9800     |
| 400           | 966                 | 9660     |
| 600           | 943                 | 9430     |
| 800           | 921                 | 9210     |
| 1000          | 899                 | 8990     |
| 1500          | 842                 | 8420     |
| 2000          | 795                 | 7950     |

> **Temperature range in degrees Celsius&#x20;*****rT***
>
> The temperature in degrees Celsius may only take values between -20.0 and +50.0 degrees Celsius (inclusive).\
> Values outside the range are automatically corrected to the appropriate limit.
>
> **Relative humidity range in percent&#x20;*****rRH***
>
> Relative humidity in percent may only take values between +0.1 and +100.0 percent (inclusive).\
> Values outside the range are automatically corrected to the appropriate limit.

#### Collective fault *xErr*

This output is used to indicate exceedances of the permitted value ranges.\
It is activated (= TRUE) if the temperature in degrees Celsius falls below the limit -20.0 and/or exceeds the limit\
+50.0. It is also activated if the relative humidity in percent falls below the limit +0.1 and/or exceeds the limit +100.0.\
In all other situations the output is not active (= FALSE).

### CODESYS

InOut:

| Scope       | Name   | Type   | Initial |
| ----------- | ------ | ------ | ------- |
| Input       | `rT`   | `REAL` |         |
| Input       | `rRH`  | `REAL` |         |
| Input Const | `rP`   | `REAL` | 980.0   |
| Output      | `rH`   | `REAL` |         |
| Output      | `rX`   | `REAL` |         |
| Output      | `rDP`  | `REAL` |         |
| Output      | `xErr` | `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/energy/hxchart.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.
