# KNX\_Read\_DPT\_19x

## `KNX_Read_DPT_19x` (FB)

FUNCTION\_BLOCK KNX\_Read\_DPT\_19x EXTENDS SlaveBasic

#### Overview

Read function for DPT 19.x (date and time).

#### Inputs

| Inputs             | Initial value | Description                             |
| ------------------ | ------------- | --------------------------------------- |
| `xRequest`         | *FALSE*       | Trigger for single read                 |
| `xRequestVisu`     | *FALSE*       | Trigger for single read (visualization) |
| `tRequestTime`     | *T#0S*        | Interval for cyclic reading             |
| `eDPT_Format`      | -             | DPT 19.x format selection               |
| `byAdrGroup`       | *0*           | Group address (0-255)                   |
| `byAdrMiddleGroup` | *0*           | Middle group address (0-7)              |
| `byAdrMainGroup`   | *0*           | Main group address (0-31)               |
| `dtInitValue`      | -             | Initial value (not effective)           |
| `eInitOption`      | -             | Initialization option                   |

#### Outputs

* `wYear` (WORD): year
* `wMonth` (WORD): month
* `wDayOfMonth` (WORD): day of the month
* `wDayOfWeek` (WORD): day of the week
* `wHourOfDay` (WORD): hour
* `wMinutes` (WORD): minutes
* `wSeconds` (WORD): seconds
* `tNextRequest` (TIME): Time until next read operation

#### Usage

1. Select the DPT 19.x format with `eDPT_Format`.
2. Configure the read options:
   * For cyclic reading: `tRequestTime` > T#0S
   * For event-based reading: use `xRequest` or `xRequestVisu`
3. Set `eInitOption` for initialization (note that `dtInitValue` is not effective).
4. Monitor the individual time components (wYear, wMonth, etc.) for received values.

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> | SlaveBasic     |
| Input       | `xEnable`                 | `BOOL`          | TRUE     |                                                                                                    | SlaveBasic     |
| Output      | `sPhysicallAddressDevice` | `STRING(15)`    |          |                                                                                                    | SlaveBasic     |
| Output      | `sGroupAddress`           | `STRING(15)`    |          |                                                                                                    | SlaveBasic     |
| Input       | `xRequest`                | `BOOL`          |          | Single Read                                                                                        |                |
| Input Const | `xRequestVisu`            | `BOOL`          |          | Single Read                                                                                        |                |
| Input Const | `tRequestTime`            | `TIME`          | TIME#0ms | Monitoring time                                                                                    |                |
| Input Const | `eDPT_Format`             | DPT\_19x        |          | Enum DPT\_19x                                                                                      |                |
| 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 | `dtInitValue`             | `DT`            |          | not effective                                                                                      |                |
| Input Const | `eInitOption`             | InitOption      |          |                                                                                                    |                |
| Output      | `wYear`                   | `WORD`          |          |                                                                                                    |                |
| Output      | `wMonth`                  | `WORD`          |          |                                                                                                    |                |
| Output      | `wDayOfMonth`             | `WORD`          |          |                                                                                                    |                |
| Output      | `wDayOfWeek`              | `WORD`          |          |                                                                                                    |                |
| Output      | `wHourOfDay`              | `WORD`          |          |                                                                                                    |                |
| Output      | `wMinutes`                | `WORD`          |          |                                                                                                    |                |
| Output      | `wSeconds`                | `WORD`          |          |                                                                                                    |                |
| Output      | `tNextRequest`            | `TIME`          |          |                                                                                                    |                |
