> 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-knx-library/functionblocks.md).

# Function blocks

### General information about `KNX_Read_DPT_xx`

The use of all KNX\_Read\_DPT\_xx function blocks follows a similar pattern:

1. **Configure group address**:
   * Set `byAdrMainGroup` (0-31)
   * Set `byAdrMiddleGroup` (0-7)
   * Set `byAdrGroup` (0-255)
2. **Select DPT format**:
   * Select the desired format via `eDPT_Format`
3. **Configure read behavior**:
   * For cyclic reading: Set `tRequestTime` to the desired interval
   * For event-based reading: Use `xRequest` or `xRequestVisu` if needed
4. **Configure initialization**:
   * Set `eInitOption` on `InitOption.PollingOnStartUp` or `InitOption.InitValue`
   * For `InitOption.InitValue`: Set the corresponding initial value:
     * DPT\_13x: `diInitValue`
     * DPT\_14x: `rInitValue`
     * DPT\_19x: `dtInitValue` (not effective)
5. **Monitor outputs**:
   * Check `tNextRequest` for the time of the next read operation
   * Monitor the corresponding value outputs:
     * DPT\_13x: `diValue`, `rValue`
     * DPT\_14x: `rValue`
     * DPT\_19x: `wYear`, `wMonth`, `wDayOfMonth`, `wDayOfWeek`, `wHourOfDay`, `wMinutes`, `wSeconds`
   * For DPT\_13x and DPT\_14x: Note `sUnit` for the unit
6. **Error handling**:
   * Monitor the error outputs of the parent SlaveBasic block

### General information about `KNX_Write_DPT_xx`

The use of all KNX\_Write\_DPT\_xx function blocks follows a similar pattern:

1. **Configure group address**:
   * Set `byAdrMainGroup` (0-31)
   * Set `byAdrMiddleGroup` (0-7)
   * Set `byAdrGroup` (0-255)
2. **Select DPT format**:
   * Select the desired format via `eDPT_Format`
3. **Set send value**:
   * Set the value to be sent in the corresponding input:
     * DPT\_1x: `xValue` (BOOL)
     * DPT\_2x: `xValue` (BOOL) and `xPrio` (BOOL)
     * DPT\_6x: `iValue` (INT)
     * DPT\_9x: `rValue` (REAL)
     * DPT\_13x: `diValue` (DINT)
     * DPT\_14x: `rValue` (REAL)
4. **Configure sending behavior**:
   * For cyclic sending: Set `tTimeUpdateSetp` to the desired interval
   * For event-based sending: Set `xUpdateSetp` or `xWriteVisu` if needed
   * Optional: Adjust `tPauseTimeUntilNextSend` to configure the sending pause
5. **Monitor outputs**:
   * Check `tNextWrite` for the time of the next send operation
   * Monitor the corresponding `*LastBusValue`-output for the last received value
   * For DPT\_1x: Also note `Encoding` for the textual representation
   * For DPT\_2x: Also note `xControlBit` for the priority status
6. **Note unit**:
   * For DPT\_6x, DPT\_9x, DPT\_13x, DPT\_14x: Check `sUnit` for the current unit
7. **Error handling**:
   * Monitor the error outputs of the parent SlaveBasicWr block


---

# 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-knx-library/functionblocks.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.
