> 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 about `KNX_Read_DPT_xx`

The usage 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 necessary
4. **Configure initialization**:
   * Set `eInitOption` on `InitOption.PollingOnStartUp` or `InitOption.InitValue`
   * When `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 about `KNX_Write_DPT_xx`

The usage 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 transmit value**:
   * Set the value to send at 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 send behavior**:
   * For cyclic sending: Set `tTimeUpdateSetp` to the desired interval
   * For event-based sending: Set `xUpdateSetp` or `xWriteVisu` if necessary
   * Optional: Adjust `tPauseTimeUntilNextSend` to configure the send 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. **Consider 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.powerio.com/hub/codesys-hvac/en/hvac-knx-library/functionblocks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
