Modbus on RB

Stage 1 : Testing ModBus Communication (RS485) using modpoll

Step 1: Connect the A & B of energy meter to A & B pin in RuggedBoard RS485 port respectively.

For demonstration purpose I have used RISH LM-1360 meter. If you are having any other meter then you have to read the datasheet of the meter vendor and provide proper parameters.

Step 2: Download the modpoll ARM execulatble binary and save it into your work directory. To download the file click below.

Step 3: Save the following code in .sh format on your working directory and name is as

./modpoll.bin -m rtu -a 1 -r 1 -c 4 -t 4:float -b 9600 -d 8 -n 4 -p none /dev/ttyUSB1

The above script has the following components:

  • m : communication mode

  • a : Slave address

  • t : data types of the slave holding register

  • r : Start Reference

  • b : Baud Rate

  • s : Stop Bits

  • p : Parity Bit

  • SERIALPORT : Serial port node of the RS485

Step 4: Run the above code to test ModBus communication


If everything is correct your code will run without any error. and you can proceed to next stage.

Last updated