> 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/en/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

### **Representation**

<figure><img src="https://2592874069-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>Input for resetting the error outputs (eErrorCode,<br>byErrorUnitID) (on every rising edge)</p>  |                  |
| Output      | `iSerialPortFb`         | `INT`                     | 0                                         | Feedback of the number of the serial interface                                                      |                  |
| Output      | `eBaudrateFb`           | `SysCom.SYS_COM_BAUDRATE` | SysCom.SYS\_COM\_BAUDRATE.SYS\_BR\_4800   | <p>Feedback of the transmission speed of the serial<br>interface</p>                                |                  |
| Output      | `eParityFb`             | `SysCom.SYS_COM_PARITY`   | SysCom.SYS\_COM\_PARITY.SYS\_NOPARITY     | Feedback of the parity per `BYTE` of the serial interface                                           |                  |
| Output      | `eStopBitsFb`           | `SysCom.SYS_COM_STOPBITS` | SysCom.SYS\_COM\_STOPBITS.SYS\_ONESTOPBIT | <p>Feedback of the number of stop bits per byte of the serial<br>interface</p>                      |                  |
| Output      | `eState`                | Client\_RTU\_StateCode    | Client\_RTU\_StateCode.IDLE               | Current state of the state machine                                                                  |                  |
| Output      | `byErrorUnitID`         | `BYTE`                    | 0                                         | Unit ID of the last error (0 = no device)                                                           |                  |
| Output      | `xError`                | `BOOL`                    | FALSE                                     | <p>Display of the error state (FALSE = no error, TRUE =<br>error)</p>                               |                  |
| Output      | `eErrorCode`            | Client\_RTU\_ErrorCode    | Client\_RTU\_ErrorCode.NO\_ERROR          | Display of the cause of the last error                                                              |                  |
| Input Const | `eStopBits`             | `SysCom.SYS_COM_STOPBITS` | SysCom.SYS\_COM\_STOPBITS.SYS\_ONESTOPBIT | <p>Definition of the number of stop bits per byte of the serial<br>interface</p>                    |                  |
| Input Const | `eParity`               | `SysCom.SYS_COM_PARITY`   | SysCom.SYS\_COM\_PARITY.SYS\_NOPARITY     | Definition of the parity per byte of the serial interface                                           |                  |
| Input Const | `eBaudrate`             | `SysCom.SYS_COM_BAUDRATE` | SysCom.SYS\_COM\_BAUDRATE.SYS\_BR\_38400  | <p>Definition of the transmission speed of the serial<br>interface</p>                              |                  |
| Input Const | `iSerialPort`           | `INT`                     | 2                                         | Definition of the number of the serial interface                                                    |                  |
| Input Const | `tTimeCheckComPort`     | `TIME`                    | TIME#5s0ms                                | <p>Time period between two checks of the serial<br>interface in the idle state</p>                  |                  |
| Input Const | `tTimeoutDeviceReceive` | `TIME`                    | TIME#1s0ms                                | <p>Timeout period for monitoring the response telegram<br>(receive)</p>                             |                  |
| Input Const | `tTimeoutDeviceSend`    | `TIME`                    | TIME#1s0ms                                | <p>Timeout period for monitoring the<br>request telegram (send)</p>                                 |                  |
| Input Const | `tTimeoutComConnect`    | `TIME`                    | TIME#1s0ms                                | <p>Timeout period for monitoring the establishment of the<br>connection to the serial interface</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/en/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.
