LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicate Modbus RTU over TCP

Hello, I would like to know if anybody has developed a communication from a Modbus RTU Device trhough Internet (GPRS) to a TCP application.

 

For a better explanation I attach a layout and Modbus VI. I'm trying to run a slave application that is continouslly asking for data to a Master. 

 

I would like to know in first place if this kind of communication is possible. be noted that the modem works transparently because it sends and receives data that come from the serial port. 

 

Hope anyone could give me some more information to solve this problem.

 

Thankyou in advance

 

 

 

 

 

 

Download All
0 Kudos
Message 1 of 4
(4,341 Views)

Hello there;

 

There is some info on how the Modbus protocol is used from LabVIEW; it uses the  Modbus for LabVIEW Library which includes a basic API for MODBUS communication across Ethernet and Serial. Here is an example....

 

Comunicando su PC con dispositivos remotos a través de la biblioteca de Modbus (Ethernet) en LabVIEW

 

Hope this info helps

 

Greetings

0 Kudos
Message 2 of 4
(4,303 Views)
Spoiler
 

Thank you very much MarisoIM for your answer, Just another question. On the last example, does it apply for communication with PLC, Módem or another device that runs Modbus RTU?

 

I'm trying to stablish communication between one device running Modbus TPC and other running Modbus RTU over internet. 

 

Thank you

0 Kudos
Message 3 of 4
(4,279 Views)

Hello Lenin_7;

 

Short answer is .... Yes you can.,....

 

"Once you installed the library, you’ll find the Modbus Vis in User Libraries > NI MOdbus. You can place the MB Ethernet Example Master.vi and the MB Ethernet Example Slave.vi to test that everything is fine, even you can run the slave in a different computer.

But if you need to build your own code, you have to use MB Ethernet Master Query (poly).vi which you can configure to write or to read. First you need to consider if you want to write or to read coils, discrete inputs, holding registers, etc. Because you have to address the register depending of the range you want to work."f

 

However you need to consult you device's manual to get a full knowledge on how to adress the full registers.

 

Hope this helps

 

Cheers

0 Kudos
Message 4 of 4
(4,262 Views)