Modbus Is Not Working

Modbus Is Not Working

SmartConnect is available with SmartServer 4.2 and higher. 

If Modbus is not working, then follow the steps below to troubleshoot the problem.

  1.  Verify that the RS-485 Configuration page is configured for the Modbus RS-485 port. Only one RS-485 port can be configured for Modbus.

  2. Verify that the Modbus service is running by issuing the following console/SSH command (depends on SmartServer version):  

    1. For SmartServer 4.0 and higher, look for modbus.

      SmartServer 4.0 and higher

      smartserverctl status
    2. For SmartServer 3.6 and prior, look for echmodbus.

      SmartServer 3.6 and prior releases

      sudo supervisorctl status

       

  3. In most cases, if you can add a device and the datapoints are not showing up properly, then it is likely that there is a problem with the .MOD file.

  4. Verify that datapoints are being updated.

    Example SSH/console command to see "temperature" datapoint updates

    mosquitto_sub -v -t glp/0/+/ev/data/# | grep "temperature/value"

    Example SSH/Console command to see same datapoint from a single device

    mosquitto_sub -v -t glp/0/+/ev/data/# | grep "dev/bacnet/4/if/Temperature/0"

     

  5. Log Modbus operations (logging should only be enabled for a short period of time due to high CPU and memory demand). 

    1. Enable Modbus logging using the following SSH command (not the console):

      mosquitto_pub -t idl/rq/modbus/debugMode -m 1
    2. View real-time data using the following command:

      SmartServer 4.0 and higher

      sudo tail -f /var/log/syslog | grep "modbus"

      SmartServer 3.6 and prior releases

      tail -f /var/log/supervisor/modbus.log
    3. Disable Modbus logging using the following command:

      mosquitto_pub -t idl/rq/modbus/debugMode -m 0
    4. View the entire modbus log using the following command:

      SmartServer 4.0 and higher

      sudo grep "modbus" /var/log/syslog

      SmartServer 3.6 and prior releases

      cat /var/log/supervisor/modbus.log