LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP

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

Jeremy Backer
CLAD
Download All
0 Kudos
Message 1 of 6
(3,949 Views)
Bump... Anyone?  I worked on this all weekend, need to figure it out or I'll have to source it out.
Jeremy Backer
CLAD
0 Kudos
Message 2 of 6
(3,916 Views)

Hi!

Could you post please a 8.5 version of your VI?

Thanks in advance,

Marco

Message Edited by MarcoMauri on 05-24-2010 02:31 AM
0 Kudos
Message 3 of 6
(3,894 Views)
Gladly Marco, thanks for your time.
Jeremy Backer
CLAD
0 Kudos
Message 4 of 6
(3,878 Views)

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

 

 

0 Kudos
Message 5 of 6
(3,864 Views)

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.

0 Kudos
Message 6 of 6
(3,250 Views)