> 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="/files/10aa9f6ba22b73266a1cf8f3d2befde8a8fbc5cc" 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>Specification 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     | Specification of the parity per byte of the serial interface                                        |                  |
| Input Const | `eBaudrate`             | `SysCom.SYS_COM_BAUDRATE` | SysCom.SYS\_COM\_BAUDRATE.SYS\_BR\_38400  | <p>Specification of the transmission speed of the serial<br>interface</p>                           |                  |
| Input Const | `iSerialPort`           | `INT`                     | 2                                         | Specification of the number of the serial interface                                                 |                  |
| Input Const | `tTimeCheckComPort`     | `TIME`                    | TIME#5s0ms                                | <p>Time interval between two checking operations for the serial<br>interface in idle state</p>      |                  |
| Input Const | `tTimeoutDeviceReceive` | `TIME`                    | TIME#1s0ms                                | <p>Timeout period for monitoring the response telegram<br>(receiving)</p>                           |                  |
| Input Const | `tTimeoutDeviceSend`    | `TIME`                    | TIME#1s0ms                                | <p>Timeout period for monitoring the request telegram<br>(sending)</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 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/en/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.
