LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

connect two computers using modbus TCP/IP

Hi everybody,
I am trying connect two computers using modbus TCP/IP. I used the example similar to the topic "Using Touch Screens with LabVIEW through Modbus Serial Devices" http://zone.ni.com/devzone/cda/tut/p/id/4722
I tested both cases in the same computer with IP address 127.0.0.1 and on two different computers with the IP address of the Slave device. But I can not connect the master and slave program. Because I have just working on the modbus communication so I don't know whether there are some presteps requirement to set up the connection or not. 
Please tell me how to test the connection between two computer using modbus TCP/IP.
I do very appreciate all the reply.
Thang Nguyen
0 Kudos
Message 1 of 9
(8,862 Views)

Hello Thang,

I am assuming you tried using the Ethernet version of the Master and Slave examples, right?  Seems to work fine for me.  Just make sure you run the Ethernet Slave example VI first.  Wait for a few seconds, and then start the Master VI.  The slave VI has to dynamically launch some VIs so you need to give it some time. 

Thanks,

-Khalid

0 Kudos
Message 2 of 9
(8,855 Views)

Dear Khalid,

Thank you for your reply. I spent whole day to run this examle, and as your recommendation, but they still do not connet. I understand how they work but just don't understand why they can not connect. I use the IP 127.0.0.1 and port 502. Could you send me your example? I don't sure about mine.

my email is airthang@yahoo.com .

Thank you very much,

Thang Nguyen

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

I am using the NI Modbus library as-is -- am not modifying anything.  You can find my versions here (scroll down all the way): 

http://forums.ni.com/ni/board/message?board.id=170&message.id=86164

Regards,

-Khalid

0 Kudos
Message 4 of 9
(8,847 Views)

Dear Khalid,

Thank you for your examples. I run these examples on another computer, and they run smoothly Smiley Very Happy . But they can not run on my computer. I don't know if that is the reason of the version of labview, my computer labview is 8.0, or because I did something stupid on my computer, so it can not run.

Anyway, thank you so much ^__^

Sincerely,

Thang Nguyen

0 Kudos
Message 5 of 9
(8,841 Views)
Dear Khalid,
I am a newbie in the LabView world, but I want to explore the interesting features of LabView. Would you mind tell me from where I should read, so I can write the library as yours modbus library. How to write the files such as "MB Ethernet Slave Demon.vi", "MB Global.vi", etc.
Thank you so much ^_^
Thang Nguyen
0 Kudos
Message 6 of 9
(8,829 Views)
Thang,
 
Please see the following on how to learn more about LabVIEW:  http://forums.lavag.org/knowledgebase.html&showarticle=3
 
Also, these discussion forums can be a good resource for learning LabVIEW -- not just by asking questions, but by browsing through others' questions, answers, and trying to answer them yourself.
 
By the way, the NI Modbus library is not written by me. 
 
-Khalid
 
0 Kudos
Message 7 of 9
(8,816 Views)

Hello Thang,

 

You can also refer to this link to get your hands on some quick tutorials on getting started with LabVIEW.

 

http://www.ni.com/academic/lv_training/how_learn_lv.htm.

 

Khalid, thanks for helping out Thang with his issue.

 

Regard,

Chetan K

Application Engineering

National Instruments

 

Message 8 of 9
(8,790 Views)
Thank you so much!
I very appreciate your helps. ^__^
Thang Nguyen
0 Kudos
Message 9 of 9
(8,782 Views)