05-30-2019 03:16 AM
Hi everybody
I am beginner in modbus field of Labview. Please help me to find solution.
I want to read some parameters of a device by RS485 communication. but I don't know how to code the registration section of MB-serial Master block. so I attached the mentioned device data-sheet book and need to know how to write code in alluded places. suppose that I want to read frequency parameter. please illustrate what I should put inside questioned section inside image called "modbus".
thank you so much.
Solved! Go to Solution.
05-31-2019 10:57 AM
Hi sina.seifi,
Are you using this Modbus example library? That library hasn't been updated since 2008. I'd recommend either using the Modbus API that installs with the LabVIEW Real-Time module or the DSC Module (if you have a license) or this updated free library.
It looks like the Frequency parameter is an input register. So you would want to set the modbus mode to Read Input Register. The datasheet shows both a register address and a Modbus Starting Address Hex, and I'm not really sure why. I'd probably try reading address 30070 or 30071 (since Modbus addresses can be off by 1 between LabVIEW and the instrument).
-Jordan
06-01-2019 07:34 AM
Thanks to response elcalverado
I will install the free update of that library for sure.
I don't know why both register address and starting address is included in datasheet too. but I will try both of your suggestions in my code. if its work I will reply the result.
thank you.
06-03-2019 11:56 AM
sina.seifi,
Just a quick clarification. The register you want to read is 30071, but the starting address you would use when calling the Modbus Read Input Register VI would be 70 or 71. You don't need to specify the entire address because the VI already knows that it is trying to read a register in the range of 30001-39999.
Jordan