05-21-2010 07:05 PM
Hey everyone,
I'm trying to set up Modbus communications with a particle counter, Hach MET ONE 3400, through an ethernet connection. I'm completely green in Modbus, and most communication protocols for that matter, so I've been reading for a day, trying to get this thing communicating, and I'm having no luck.
I'm attaching a very simple VI that I thought should work. I'm also attaching the manual for the machine, which lists the addresses in the very last section.
The VI runs, and appears to set up TCP communications, but gets hung up in the Modbus query, and times out. The machine shows a display that says "modbus TCP" while the vi runs, but nothing comes back to me, and like I said it times out.
Not sure what I'm missing here. The addresses in the manual seem funny to me, because most of the articles I've read have shown an address like 30000, and the manual says the addresses are from 0 up. Anyway, any help here would be appreciated.
Thank You
05-23-2010 08:48 PM
05-24-2010 02:29 AM - edited 05-24-2010 02:31 AM
Hi!
Could you post please a 8.5 version of your VI?
Thanks in advance,
Marco
05-24-2010 05:54 AM
05-24-2010 07:07 AM
Hi!
Everything seems fine...
But:
1) Remember to close TCP connection
2) Are you sure the network conficurations of the instrument are ok?
3) Remove MBAP header in the vi if youi are not using it
10-04-2011 10:08 AM
Maybe you have fixed this already, but here goes.
Firstly your intuition about the addresses is correct. The addresses given in the appendix E will not work for the LabVIEW Modbus functions.
Modbus maps values into 4 register address ranges. 0, 10000, 30000, and 40000. The 0 and 10000 are for binary data. The 30000 and 40000 ranges are 16 bit registers although some values with more bits then that may require reading several registers together.
So right off the bat we know the addresses given in Appendix E have to refer to the 30000 or 40000 address range.
So an address 14 given in the appendix is probably 30014 or 40014.
What's more you will probably have to add 1 to the address. So 14 becomes 30015.
Welcome to modbus addressing.
Last thing, The manual you posted is not THE manual you need. Appendix E refers to another document which specifically describes the modbus registers. Go get that one.