How to connect a Modbus devices?

How to connect a Modbus devices?

This guide will help you connect a modbus device with the Zoho IoT Application.

Perquisite

  • Access to a Zoho IoT application
  • connected gateway either using Zoho IoT Agent or using Manufacturer Application
  • A modbus device physically connected to the gateway either through RS485 or Ethernet

Connecting a Modbus Device

A Modbus device cannot send data directly to the Zoho IoT application. It requires an intermediary master application, like a gateway device that collects the data and forwards it to the cloud application. Therefore, you must first connect the gateway to the Zoho IoT application before configuring and receiving data from the Modbus device. Once the gateway is connected, you need to add and associate a device instance for the Modbus device.

Adding a Modbus Device

There are two ways to add a modbus device:

Adding a Modbus Device using the Device Gallery Option

The device product gallery includes both supported and supportable devices. Supported devices come with key datapoints and their corresponding Modbus registry that can be used for configuring the communication with the Zoho IoT Edge agent and the Modbus device. You can simply import the required device product from the gallery and then proceed to add a device.
  1. Access the End Application.



  2. Select Devices > Devices in the left navigation pane.



  3. Click Add Device.



  4. Select Add Using Product Gallery (Devices) and click Proceed.



  5. In the device gallery, browse, filter, or search for your device.



  6. Click the required device product. For this example, TM7400 is selected.



  7. On the device product information page, click Import and Proceed.



  8. In the Add Device form, provide the required information in the relevant fields.
    Example:
    Model Type: Create New Model (This toggle appears only if a device model already exists)
    Model: Energy Meter
    Name: MyTM7400
    Edge Key: tm_001



    Notes
    Learn more about each field.
  1. Click Proceed. A new device with the give name will be added.



  2. Click View Device. You'll be redirected to the peripheral device's information page.



  3. In the Onboard Assistance, click Proceed.


In the Onboarding Assistant, you can update the Edge Key and associate a gateway if this wasn’t done during the Add Device Instance stage.



If a gateway hasn’t been added yet, click Add Device and follow this guide on how to connect a gateway device.

If the gateway device is already connected and associated with the Modbus device, you can now proceed to remotely configuring the modbus device from the Zoho IoT application to start receiving data.


Adding a Modbus Device using the  By Defining your own device product option

If your device is not available in the gallery, you can create it manually. With this option, you define the required datapoints of your device and specify the Modbus registry mappings for each datapoint.
To add a modbus device by defining your own device product
  1. Access the End Application.



  2. Select Devices > Devices in the left navigation pane.



  3. Click Add Device.



  4. Select Add by Defining Your Device Product and click Proceed.



  5. In the Product Details section, provide information about the device product.
    Example:

    Name: EM 8000


    Device Type: Peripheral Sensor


    Peripheral Protocols: Modbus RTU, Modbus TCP

    Notes
    Learn more about the fields.
    NotesNotes:
    Before filling in the details, it is highly recommended to read Understanding Device Product document.
    This step defines a device product, not a device instance
    For Modbus devices, Peripheral Sensor must be selected as the device type.

  6. Click Add. The device product will now be created.Next, add datapoint definitions and configure Modbus registry mappings for each datapoint:
  7. Click Add Datapoint Definitions to open the Import Datapoint form.
  8. Click Add New Datapoint Group.
  9. Select Import from Gallery and click Next.
  10. Choose the group containing datapoints relevant to your peripheral device’s parameters (for example, Energy Monitoring) and click Import.
  11. Select the required datapoint definitions and click Import. For this illustration, only Active Power is imported.
  12. Once the datapoint definitions are imported, the Modbus registry mappings become available.
  13. Select the datapoint that requires registry updates and click Edit.
  14. Enter the necessary details (usually found in your device’s data sheet) and click Update.
  15. After updating the registry, click Proceed.
  16. In the new device form, provide the required details.
    Example:
    Model Type: Create New Model (This toggle appears only if a device model already exists)
    Model Name: Energy Meter
    Edge Key: em_001
    Notes
    Learn more about each field.
  17. For the Connected Gateway field, select the gateway device you added in the application to represent the actual gateway in your setup.
  18. Click Add. A new device with the give name will be added.
  19. Click View Device. You'll be redirected to the peripheral device's information page.
  20. In the Onboard Assistant, click Proceed.
In the Onboarding Assistant, you can update the Edge Key and associate a gateway if this wasn’t done during the Add Device Instance stage.
If a gateway hasn’t been added yet, click Add Device and follow this guide on how to connect a gateway device.
If the gateway device is already connected and associated with the Modbus device, you can now proceed to remotely configuring the modbus device from the Zoho IoT application to start receiving data.