# Modbus with Wandelbots NOVA

> Get started with Modbus communication protocol supported by Wandelbots NOVA. Learn how to set up Modbus and connect to Wandelbots NOVA.

Wandelbots NOVA supports the Modbus communication protocol, allowing integration with various industrial devices and systems.

Modbus is a widely used protocol in industrial automation for connecting electronic devices.
It operates on a client-server architecture, where the client requests data and the server responds.

## Supported

Wandelbots NOVA only supports Modbus TCP.
Modbus RTU is not supported.

A Wandelbots NOVA instance can act as both a Modbus **server** and a Modbus **client**,
provided that the devices it communicates with also support Modbus TCP.

Data types supported by Modbus TCP in Wandelbots NOVA include:

- Coils (read/write)
- Discrete Inputs (read-only)
- Holding Registers (read/write)
- Input Registers (read-only)

## Set up Modbus communication

> **Info:** This page describes the current Setup. Some installations still show the previous version, with a `Communication Protocols` tab instead of `I/O` → `Bus signals`.
> See the [FAQ](/nova/26.9/faq#setup-still-displays-a-previous-version-after-updating) to confirm which version your installation is on and how to update.

> **Warning:** Per cell, you can only activate one communication protocol at a time: either PROFINET or Modbus.
> To add a Modbus connection to a cell that has a PROFINET connection, you must delete the PROFINET connection first.
> Deleting a connection deletes all its bus signals and can't be undone.

1. Ensure that the device you want to connect to Wandelbots NOVA supports Modbus TCP.
2. Connect the Wandelbots NOVA instance and the Modbus device with an ethernet cable.
3. In the Setup app, select your cell and open `I/O` → `Bus signals`.
4. Select `Add bus connection` and the tab `Modbus`.
5. Select the `Role` of your NOVA instance: `Server`, `Client` or `Virtual`.\
   A virtual connection needs no further configuration and is enough to test signals without a device.

### NOVA as server

### Step 1: Configure the server

1. Enter the `Port`.\
   Default: 502
   > **Info:** Each Modbus server on a NOVA instance needs its own port. Setup refuses a port that the Modbus server of another cell uses.
2. Optional: Open `Advanced options` and set:
   - `Connections`: the number of clients that can connect at the same time, from 1 to 255. Default: 25.
   - `Coils size`, `Discrete inputs size (read-only)`, `Holding register size (write and read)` and `Input register size`: the size of each area, from 0 to 65535. Default: 65535.
   - `Network interface`: a port of its own for the server.
3. Select `Add`.

→ The connection appears as a card above the signal table. The card shows `Connecting…` until the first client connects.

![The panel Add bus connection with the Modbus tab open. The role Server, the port 502 and the advanced options with the number of connections, the area sizes and the network interface are shown.](/assets/nova/signals-v2/bus-add-modbus-server.webp)

### NOVA as client

### Step 1: Connect to the server

1. Enter the `IP address` of the Modbus server. A host name works as well.
2. Enter the `Port`.\
   Default: 502
3. Select `Add`.

→ The connection appears as a card above the signal table.

If NOVA can't reach the server, the card shows the address and the port it tried. Check that the server runs and that the NOVA instance can reach this address.

![The panel Add bus connection with the Modbus tab open. The role Client with the fields IP address and port 502 is shown.](/assets/nova/signals-v2/bus-add-modbus-client.webp)

## Add Modbus signals

Signals give the Modbus addresses names that your robot programs and apps use.

### Step 1: Add a signal

1. Enter a name in the last row of the table on the page `Bus signals`.
2. Select the `Area`: `Coil`, `Discrete input`, `Holding register` or `Input register`.
3. Select the `Data type`.\
   For `FLOAT32`, the data type also sets the byte order, e.g. `FLOAT32 CDAB`.
4. Enter the `Address`.\
   The address is the number of the coil or register, counted from 0. The table shows it as `Bit 10` or `Register 10`.
5. Optional: Enter a description and select a group.

→ The signal is saved and appears in the table. You can read and write it in `Monitoring`.

A Modbus connection holds at most 1024 signals.
To add several signals with counting names and addresses, drag the handle at the end of a row downwards.

![The page Bus signals with a virtual Modbus connection and three signals: a coil, a holding register and an input register, each with its data type and address.](/assets/nova/signals-v2/bus-signals-modbus.webp)

## Further reading

For more detailed instructions on the Modbus architecture and configuration options,
refer to the original Modbus [messaging implementation guide](https://www.modbus.org/file/secure/messagingimplementationguide.pdf)
