# KNX\_Write\_DPT\_9x

## `KNX_Write_DPT_9x` (FB)

FUNCTION\_BLOCK KNX\_Write\_DPT\_9x EXTENDS SlaveBasicWr

#### Overview

Send function for DPT 9.x (2-byte floating point).

#### Inputs

| Inputs                    | Initial value | Description                          |
| ------------------------- | ------------- | ------------------------------------ |
| `xUpdateSetp`             | *FALSE*       | Trigger for setpoint update          |
| `rValue`                  | -             | REAL value to be sent                |
| `xWriteVisu`              | -             | Trigger for one-time send            |
| `rDelta`                  | *0.05*        | Threshold for value change detection |
| `eDPT_Format`             | -             | DPT 9.x format selection             |
| `byAdrGroup`              | *0*           | Group address (0-255)                |
| `byAdrMiddleGroup`        | *0*           | Middle group address (0-7)           |
| `byAdrMainGroup`          | *0*           | Main group address (0-31)            |
| `tTimeUpdateSetp`         | *T#0S*        | Cyclic update interval               |
| `tPauseTimeUntilNextSend` | *T#3S*        | Send pause                           |

#### Outputs

* `sUnit` (STRING\[10]): Unit of the value
* `tNextWrite` (TIME): Time until next write operation
* `rLastBusValue` (REAL): Last received value

#### Usage

1. Select the DPT 9.x format with `eDPT_Format`.
2. Set the value to be sent in `rValue`.
3. Configure the send options:
   * For cyclic sending: `tTimeUpdateSetp` > T#0S
   * For event-based sending: use `xUpdateSetp` or `xWriteVisu`
4. Adjust `rDelta` to set the sensitivity for value changes.
5. Monitor `rLastBusValue` for received values and `sUnit` for the unit.

InOut:

| Scope       | Name                      | Type            | Initial    | Comment                                                                                                                      | Inherited from |
| ----------- | ------------------------- | --------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------- | -------------- |
| Input       | `itfKnxConnector`         | `IKnxConnector` |            | <p>IMasterConnector interface input to register/unregister<br>the FB to the list on the Master</p>                           | SlaveBasicWr   |
| Input       | `xEnable`                 | `BOOL`          | TRUE       |                                                                                                                              | SlaveBasicWr   |
| Output      | `sPhysicallAddressDevice` | `STRING(15)`    |            |                                                                                                                              | SlaveBasicWr   |
| Output      | `sGroupAddress`           | `STRING(15)`    |            |                                                                                                                              | SlaveBasicWr   |
| Input       | `xUpdateSetp`             | `BOOL`          | FALSE      | <p>Update of setpoint values (on every rising edge<br>)</p>                                                                  |                |
| Input       | `rValue`                  | `REAL`          |            |                                                                                                                              |                |
| Input Const | `xWriteVisu`              | `BOOL`          |            | Single Read                                                                                                                  |                |
| Input Const | `rDelta`                  | `REAL`          | 0.05       | Specification of the delta value                                                                                             |                |
| Input Const | `eDPT_Format`             | DPT\_9x         |            | Enum DPT\_9x                                                                                                                 |                |
| Input Const | `byAdrGroup`              | `BYTE`          | 0          | Group address                                                                                                                |                |
| Input Const | `byAdrMiddleGroup`        | `BYTE`          | 0          | Middle group address                                                                                                         |                |
| Input Const | `byAdrMainGroup`          | `BYTE`          | 0          | Main group address                                                                                                           |                |
| Input Const | `tTimeUpdateSetp`         | `TIME`          | TIME#0ms   | <p>Update interval for operations influenced by the input<br>‘xUpdateSetp’ 0 = no automatic<br>update, > 0 cyclic update</p> |                |
| Input Const | `tPauseTimeUntilNextSend` | `TIME`          | TIME#3s0ms | Pause after sending 0 = no pause                                                                                             |                |
| Output      | `sUnit`                   | `STRING(10)`    |            |                                                                                                                              |                |
| Output      | `tNextWrite`              | `TIME`          |            |                                                                                                                              |                |
| Output      | `rLastBusValue`           | `REAL`          |            |                                                                                                                              |                |
