> 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/hvac-modbus-library/functionblocks/generic/modbusclient_rtu.md).

# ModbusClient\_RTU

## `ModbusClient_RTU` (FB) <a href="#modbusclient_rtu-fb" id="modbusclient_rtu-fb"></a>

`FUNCTION_BLOCK` ModbusClient\_RTU EXTENDS ModbusClientBase

### **Darstellung**

<figure><img src="https://879424349-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2FfKOCm9p0LoyFqsZ2lrYj%2FModbusClient_RTU.png?alt=media&amp;token=114c8806-9951-4c22-84b0-6361f60fd17b" alt=""><figcaption></figcaption></figure>

InOut:

| Scope       | Name                    | Type                      | Initial                                   | Comment                                                                                                          | Inherited from   |
| ----------- | ----------------------- | ------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------- |
| Output      | `xConnected`            | `BOOL`                    |                                           | TRUE if connection has been established                                                                          | ModbusClientBase |
| Output      | `xLicenceValid`         | `BOOL`                    |                                           | TRUE if a valid licence was found                                                                                | ModbusClientBase |
| Input       | `xResError`             | `BOOL`                    | FALSE                                     | <p>Eingang zur Rücksetzung der Fehlerausgänge (eErrorCode,<br>byErrorUnitID) (bei jeder ansteigenden Flanke)</p> |                  |
| Output      | `iSerialPortFb`         | `INT`                     | 0                                         | Rückmeldung der Nummer der seriellen Schnittstelle                                                               |                  |
| Output      | `eBaudrateFb`           | `SysCom.SYS_COM_BAUDRATE` | SysCom.SYS\_COM\_BAUDRATE.SYS\_BR\_4800   | <p>Rückmeldung der Übertragungsgeschwindigkeit der seriellen<br>Schnittstelle</p>                                |                  |
| Output      | `eParityFb`             | `SysCom.SYS_COM_PARITY`   | SysCom.SYS\_COM\_PARITY.SYS\_NOPARITY     | Rückmeldung der Parität pro `BYTE` der seriellen Schnittstelle                                                   |                  |
| Output      | `eStopBitsFb`           | `SysCom.SYS_COM_STOPBITS` | SysCom.SYS\_COM\_STOPBITS.SYS\_ONESTOPBIT | <p>Rückmeldung der Anzahl der Stoppbits pro Byte der seriellen<br>Schnittstelle</p>                              |                  |
| Output      | `eState`                | Client\_RTU\_StateCode    | Client\_RTU\_StateCode.IDLE               | Aktueller Zustand der Zustandsmaschine                                                                           |                  |
| Output      | `byErrorUnitID`         | `BYTE`                    | 0                                         | Unit-ID des letzten Fehlers (0 = kein Gerät)                                                                     |                  |
| Output      | `xError`                | `BOOL`                    | FALSE                                     | <p>Anzeige des Fehlerzustandes (FALSE = kein Fehler, TRUE =<br>Fehler)</p>                                       |                  |
| Output      | `eErrorCode`            | Client\_RTU\_ErrorCode    | Client\_RTU\_ErrorCode.NO\_ERROR          | Anzeige der Ursache des letzten Fehlers                                                                          |                  |
| Input Const | `eStopBits`             | `SysCom.SYS_COM_STOPBITS` | SysCom.SYS\_COM\_STOPBITS.SYS\_ONESTOPBIT | <p>Festlegung der Anzahl der Stoppbits pro Byte der seriellen<br>Schnittstelle</p>                               |                  |
| Input Const | `eParity`               | `SysCom.SYS_COM_PARITY`   | SysCom.SYS\_COM\_PARITY.SYS\_NOPARITY     | Festlegung der Parität pro Byte der seriellen Schnittstelle                                                      |                  |
| Input Const | `eBaudrate`             | `SysCom.SYS_COM_BAUDRATE` | SysCom.SYS\_COM\_BAUDRATE.SYS\_BR\_38400  | <p>Festlegung der Übertragungsgeschwindigkeit der seriellen<br>Schnittstelle</p>                                 |                  |
| Input Const | `iSerialPort`           | `INT`                     | 2                                         | Festlegung der Nummer der seriellen Schnittstelle                                                                |                  |
| Input Const | `tTimeCheckComPort`     | `TIME`                    | TIME#5s0ms                                | <p>Zeitdauer zwischen zwei Prüfvorgängen für die serielle<br>Schnittstelle im Zustand Leerlauf</p>               |                  |
| Input Const | `tTimeoutDeviceReceive` | `TIME`                    | TIME#1s0ms                                | <p>Time-Out-Zeitdauer für die Überwachung des Antworttelegramms<br>(Empfangen)</p>                               |                  |
| Input Const | `tTimeoutDeviceSend`    | `TIME`                    | TIME#1s0ms                                | <p>Time-Out-Zeitdauer für die Überwachung des<br>Anforderungstelegramms (Senden)</p>                             |                  |
| Input Const | `tTimeoutComConnect`    | `TIME`                    | TIME#1s0ms                                | <p>Time-Out-Zeitdauer für die Überwachung der Herstellung der<br>Verbindung zur seriellen Schnittstelle</p>      |                  |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.powerio.com/hub/codesys-hvac/hvac-modbus-library/functionblocks/generic/modbusclient_rtu.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
