# How To Onboard Modbus Devices

:tv: Do you prefer watching instead of reading the walkthrough, then check the video below.

{% embed url="<https://youtu.be/1OYqfeX5iQ8>" %}

## **Step-by-Step Walkthrough**

**1.** Go to the portal ([panel.bace-iot.com](https://panel.bace-iot.com/)) and log in with your username and password:

<figure><img src="/files/7QQnwmSnbfYv804Bd4RX" alt=""><figcaption></figcaption></figure>

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

Press **continue** when prompted to access BACE Cloud:

<figure><img src="/files/100It2QyIQuzjJThYH9Q" alt=""><figcaption></figcaption></figure>

**2.** Once you are on the home screen, click on the “**Modbus Devices**” button to add a new device to your dashboard:

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

**3.** Click the “**Add new gateway**” button:

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

**4.** Read the overall steps and click **“Let's Start”** to proceed:

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

**5.** Select the gateway you want to connect your Modbus device to. Corresponding **IoT ID** is on the sticker located on BACE gateway housing. Then press on the “Next > Set Gateway” button:

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

**6.** Set a name for the template label:

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

Select the Modbus Mode. Choose between **Modbus RTU** and **Modbus TCP**. You can find this information in the manual of your Modbus Device:

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

Select the **Baud Rate**. You can find this information in the manual of your Modbus Device:

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

Select the interval. The interval is the time frequency in which every register will be read by BACE gateway and sent to BACE IoT Platform. Press the “Next > Set Modbus Devices” button to proceed:

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

**7.** Set a Slave ID for your Modbus Device.

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

Set the Byte order and the Word order. For both, choose between Little Endian and Big Endian. You can find this information in the manual of your Modbus Device:

{% hint style="info" %}
If you don't know the [endianness](https://en.wikipedia.org/wiki/Endianness) of the device, leave it at default. You can change this setting later if you are getting ambiguous readings
{% endhint %}

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

You can add another Modbus device by clicking **(+)** below Slave ID. When you are finished with adding devices, click the “Next > Add Registers” button:

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

**8.** Here you can define registers for your Modbus Device.

First, set the Label and the Unit to be shown on your dashboard. You can find the appropriate values to set the Register Start and Scale magnitudes in the manual of your Modbus Device.

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

Then, set **Register Type** (Holding or Input), **Data Type** and **Access Mode**. Fill this information per instruction per your Modbus Device manual:

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

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

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

You can also add a new register, and/or duplicate one of the registers that you already have. When you are finished with the registers, press “Apply”:

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

**9.** You can instantly review the information you just set. If anything needs to be changed, you can press the “Edit” button. You can return to the Modbus Devices overview by clicking on the “Go to Modbus Devices” button. If you click the “**click here**” link (as shown in the picture), you will go to the overview of the Modbus Device you just connected:

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

**10.** You can now see that your Modbus Device is linked. Click on the Modbus Devices area to see the details:<br>

<figure><img src="/files/7dfn3oQFFTBoRYZsoWVe" alt=""><figcaption></figcaption></figure>

11. Congrats! You have just connected a Modbus Device to BACE gateway and you should be able to see information from the Modbus device! If you want to make some changes click **Configure,** or you can connect a new Modbus Device to another gateway by clicking **Add New Gateway**:

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


---

# 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://docs.bace-iot.com/bace-panel/how-to-onboard-modbus-devices.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.
