# KNX\_Read\_DPT\_1x

## `KNX_Read_DPT_1x` (FB)

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

#### Überblick

Lesefunktion für DPT 1.x (1-Bit).

#### Eingänge

| Eingänge           | Initialwert | Beschreibung                                  |
| ------------------ | ----------- | --------------------------------------------- |
| `xRequest`         | *FALSE*     | Trigger für einmaliges Lesen                  |
| `xRequestVisu`     | *FALSE*     | Trigger für einmaliges Lesen (Visualisierung) |
| `tRequestTime`     | *T#0S*      | Intervall für zyklisches Lesen                |
| `eDPT_Format`      | -           | DPT 1.x Format-Auswahl                        |
| `byAdrGroup`       | *0*         | Gruppenadresse (0-255)                        |
| `byAdrMiddleGroup` | *0*         | Mittlere Gruppenadresse (0-7)                 |
| `byAdrMainGroup`   | *0*         | Hauptgruppenadresse (0-31)                    |
| `xInitValue`       | *FALSE*     | Initialwert bei `InitOption.InitValue`        |
| `eInitOption`      | -           | Initialisierungsoption                        |

#### Ausgänge

* `xValue` (BOOL): Empfangener Boolescher Wert
* `Encoding` (STRING\[15]): Textuelle Darstellung des Wertes
* `tNextRequest` (TIME): Zeit bis zum nächsten Lesevorgang

#### Verwendung

1. Wählen Sie das DPT 1.x Format mit `eDPT_Format`.
2. Konfigurieren Sie die Leseoptionen:
   * Für zyklisches Lesen: `tRequestTime` > T#0S
   * Für ereignisbasiertes Lesen: Nutzen Sie `xRequest` oder `xRequestVisu`
3. Setzen Sie `eInitOption` und ggf. `xInitValue` für die Initialisierung.
4. Überwachen Sie `xValue` für empfangene Werte und `Encoding` für die textuelle Darstellung.

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`          |          | Einmal Lessen                                                                                      |                |
| Input Const | `xRequestVisu`            | `BOOL`          |          | Einmal Lessen                                                                                      |                |
| Input Const | `tRequestTime`            | `TIME`          | TIME#0ms | Überwachungszeit                                                                                   |                |
| Input Const | `eDPT_Format`             | DPT\_1x         |          | Enum DPT\_1x                                                                                       |                |
| Input Const | `byAdrGroup`              | `BYTE`          | 0        | Groupaddress                                                                                       |                |
| Input Const | `byAdrMiddleGroup`        | `BYTE`          | 0        | Middle-Group-Address                                                                               |                |
| Input Const | `byAdrMainGroup`          | `BYTE`          | 0        | Main-Group-Adress                                                                                  |                |
| Input Const | `xInitValue`              | `BOOL`          |          |                                                                                                    |                |
| Input Const | `eInitOption`             | InitOption      |          |                                                                                                    |                |
| Output      | `xValue`                  | `BOOL`          |          |                                                                                                    |                |
| Output      | `Encoding`                | `STRING(15)`    |          |                                                                                                    |                |
| Output      | `tNextRequest`            | `TIME`          |          |                                                                                                    |                |
