Data not Transferred Between Modbus Master and Slave VIs

Updated Nov 2, 2018

Reported In

Software

  • LabVIEW Datalogging and Supervisory Control Module

Issue Details

I am using the Modbus API included in the LabVIEW DSC Module and am trying to communicate between two VIs running on my computer: one configured as a slave and the other as a master. When I run the VIs, no error is thrown, but the correct data is not being read.

Solution

  • Ensure that you are using the correct Modbus data type. The Modbus API can be used to write and read four kinds of data: Coils, discrete inputs, input registers, and holding registers. You must make sure you are writing and reading the same data type in both your slave and master VIs. For example, if you are using the Write Single Holding Register VI in your master VI, you should use the Read Single Holding Register VI in your slave VI. Holding registers and input registers use separate address banks in LabVIEW and are not compatible with each other.
  • Ensure that you are writing to and reading from the correct address. 

Additional Information

For more information on the Modbus Protocol, please refer to this White Paper .

WAS THIS ARTICLE HELPFUL?

Not Helpful