Configuring Modbus RTU

Configuring Modbus RTU

Zoho IoT applications allow you to remotely configure the RS485 port settings of a connected gateway and the required Modbus registry mapping for the slave devices, then deploy them to the gateway.

Prerequisite

  • The gateway or computer must be running Edge Lite.
  • The device added for the gateway in the Zoho IoT application must have Edge Agent as the device application.
  • A device based on the device product of the connected sensor/hardware, with the required Modbus registry mapping, must be added to the application.
  • The master application must communicate with the connected sensor using the Modbus RTU protocol.
  • The gateway/computer must be live and connected to the application over the internet.

Steps to send Modbus Configuration from the application

NotesNote: If the device running the Edge Lite is not connected to the application, deployment will fail and configurations will not be saved.
For this illustration, we will consider a TRB245 as the gateway (master) device and a CONZERV6400 as the connected peripheral (slave) device.
  1. Access the End Application.



  2. Go to Devices > Devices in the left navigation pane.



  3. Click on the Gateway device to which the configuration must be sent. For this illustration, a device named My TRB245 is selected.



  4. In the selected device's information page, go to Actions > Scroll Down > Edge Agent Configuration.



    NotesNote: The Edge Agent Configuration option will be available only if you selected Edge Agent as the device application when adding the device.
  5. Click Configure.



  6. Click Next.



  7. Click Map Peripheral.



  8. In the Peripheral Addition form, select RS 485 as the connectivity between the gateway and the peripheral device.



  9. Provide the port details of the RS 485 port in the gateway.
    Example:
    Serial Port Name : /dev/tty
    Baud Rate : 9600
    Parity : none
    Data bit : 8
    Stop bit : 1



    NotesNote: These port settings must match the setting of the connected peripheral device.
    Notes
    Note: Learn more about each field.
  10. Select Modbus RTU as the protocol used for communication between the gateway and the peripheral.



  11. Click Next.



  12. Select the device product representing the connected peripheral. For this illustration, CONZERV6400 is selected so the connected peripheral will have the corresponding modbus registry mapping.




    NotesNote: The required device product will be available only after you add a device instance based on that product using the “Add Using Device Gallery” option.

  13. Provide the details of the connected peripheral.

    Example:
    Name : Electric Meter 1
    Slave Id : 1
    Edge Key : em_001
    Timeout : 500



    Notes
    Learn more about each filed.
  14. Click Add.



  15. The configuration will be added. These configurations and the modbus registry mapping of the device product apply only to the slave device with Slave ID 1. If you have more than one slave device, click Add Peripheral and repeat the steps above and create separate configurations for each one accordingly.



  16. Click Deploy to send the configuration to the connected gateway.

 
Mapping a new peripheral after deployment
Once a configuration has been deployed, the Edge Agent configuration form will display the success or failure status of the deployment. To map a new peripheral, click Actions > Update Edge configuration settings and repeat the steps above to deploy it.