> 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="/files/uswMfOXJspsD7BJ15BFy" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
