# Modbus (Pro)

{% hint style="warning" %}
Please note, that this Interface is only available in realvirtual.io Professional
{% endhint %}

### Introduction <a href="#introduction" id="introduction"></a>

Modbus is a data communications protocol originally published by Modicon (now Schneider Electric) in 1979 for use with its programmable logic controllers (PLCs). Modbus has become a de facto standard communication protocol and is now a commonly available means of connecting industrial electronic devices (Source <https://en.wikipedia.org/wiki/Modbus>).

Modbus is a very simple standard which is transfering discrete inputs and outputs or registers (double word).

{% hint style="info" %}
Currently realvirtual.io can be only used as a Modbus master. Client support will be added in one of the next releases.
{% endhint %}

### Modbus master

If realvirtual.io is acting as a Modbus master the clients need to poll and write their values to realvirtual.io. The modbus master is not acting actively on his own. The Modbus server is always on the computers IP adress woth the standard port 502.

### Interface configuration

The Modbus interface is added to the Scene by selecting *Tools > realvirtual > Add Component > Interface > Modbus* or by adding the script *ModbusInterface* to an empty GameObject.

Because Modbus is only transferring discrete inputs or outputs or words and because there is no standard data structure for describing the content inside these data you need to define how to interpret the Modbus data inside realvirtual.io.

Each PLCInput or PLCOuput signal needs to hava an attached ModbusData component. This component is defining with its properties how the bits and bytes should be interpreted by realvirtual.io.

<figure><img src="/files/a1XpmxdCt8VXwH9BV9NG" alt=""><figcaption></figcaption></figure>

© 2025 realvirtual GmbH [https://realvirtual.io](https://realvirtual.io/) - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.\\


---

# Agent Instructions: 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:

```
GET https://doc.realvirtual.io/components-and-scripts/interfaces/modbus.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
