LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus RTU over TCP/IP

I am trying to develop a LabVIEW code to read data from a device that uses Modbus RTU over TCP/IP: The setup looks something like this: A Gateway provide IP network (physical layer Ethernet) to XBee networks using Modbus RTU.

E.G. 8 Zbee device (address 1 to 😎 connected to the gateway device. a pc running labview will need to interface with the gateway over TCP (ethernet). How do I write a simple code to facility this?

0 Kudos
Message 1 of 9
(3,758 Views)

Search the forums and NI.com regarding Modbus.  There are several Modbus libraries available that take care of most of the programming for you.

0 Kudos
Message 2 of 9
(3,747 Views)

Thanks for replying. I am able to develop code for Modbus rtu or TCP/IP but only as stand alone. I am not able to combine the two protocols. 

0 Kudos
Message 3 of 9
(3,742 Views)

Is it Modbus RTU   OR   TCP/IP.   RTU means serial.  TCP/IP means ethernet.   The heart of the protocol is the same, the difference is the way the messages are packaged and what kind of physical port is being used.  (serial vs. ethernet).

 

 

0 Kudos
Message 4 of 9
(3,739 Views)

Thanks for responding .let me try and map the communication flow: PC to gateway physical layer is Ethernet, protocol tcp/ip. Gateway to devices is modbus rtu over zigbee up 10 devices . How write a simple code that will allow me to read data from each of the end devices?

0 Kudos
Message 5 of 9
(3,716 Views)

Hi,

 

The computer communicates with the gateway. The gateway communicates with the devices through ModBus RTU. My guess is that the gateway talks ModBus TCP. What happens behind the gateway has nothing to do with the protocol between the computer and the gateway.

It would help if you tell us which gateway you are using. Like RavensFan wrote there are many example and libraries here.

 

Kees

 

 

0 Kudos
Message 6 of 9
(3,707 Views)

The gateway I am using is ConnectPort X2. IP network to XBee networks. 

0 Kudos
Message 7 of 9
(3,690 Views)

Thanks for help. can you point me to some of the examples you are talking about? 

0 Kudos
Message 8 of 9
(3,686 Views)

Download the NI ModBUS library from the Tools Networks using VI Package Manager. The library works very well.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 9 of 9
(3,680 Views)