# KNX\_Write\_DPT\_1x

## `KNX_Write_DPT_1x` (FB)

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

#### Inputs

<table><thead><tr><th>Inputs</th><th width="426">Initial value</th><th>Description</th></tr></thead><tbody><tr><td><code>xUpdateSetp</code></td><td><em>FALSE</em></td><td>Trigger for setpoint update</td></tr><tr><td><code>xValue</code></td><td>-</td><td>BOOL value to send</td></tr><tr><td><code>xWriteVisu</code></td><td>-</td><td>Trigger for one-time send</td></tr><tr><td><code>eDPT_Format</code></td><td>-</td><td>DPT 1.x format selection</td></tr><tr><td><code>byAdrGroup</code></td><td><em>0</em></td><td>Group address (0-255)</td></tr><tr><td><code>byAdrMiddleGroup</code></td><td><em>0</em></td><td>Middle group address (0-7)</td></tr><tr><td><code>byAdrMainGroup</code></td><td><em>0</em></td><td>Main group address (0-31)</td></tr><tr><td><code>tTimeUpdateSetp</code></td><td><em>T#0S</em></td><td>Cyclic update interval</td></tr><tr><td><code>tPauseTimeUntilNextSend</code></td><td><em>T#3S</em></td><td>Send pause</td></tr></tbody></table>

#### Outputs

* `Encoding` (STRING\[15]): Textual representation of the value
* `tNextWrite` (TIME): Time until next write operation
* `xLastBusValue` (BOOL): Last received value

#### Usage

1. Select the DPT 1.x format with `eDPT_Format`.
2. Set the value to be sent in `xValue`.
3. Configure the send options:
   * For cyclic sending: `tTimeUpdateSetp` > T#0S
   * For event-based sending: use `xUpdateSetp` or `xWriteVisu`
4. Monitor `xLastBusValue` for received values.
5. Note `Encoding` for the textual interpretation of the value.

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       | `xValue`                  | `BOOL`          |            |                                                                                                                              |                |
| Input Const | `xWriteVisu`              | `BOOL`          |            | Single Read                                                                                                                  |                |
| Input Const | `eDPT_Format`             | DPT\_1x         |            | Enum DPT\_1x                                                                                                                 |                |
| 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      | `Encoding`                | `STRING(15)`    |            |                                                                                                                              |                |
| Output      | `tNextWrite`              | `TIME`          |            |                                                                                                                              |                |
| Output      | `xLastBusValue`           | `BOOL`          |            |                                                                                                                              |                |
