LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tcp/ip with another PC

Hi,

 

I am not very familiar with the tcp/ip set up. I followed an example and manage to do the write and read within the same machine using the localhost as the IP. Now i wish to write data from my PC (the one with LabVIEW) to another PC who will act as a client and receive data. I wish to know what are the methods i can work on to create a client to receive data from the server (LabVIEW PC) without having to use LabVIEW to create the client on the other PC. Please advise. Thank you.

0 Kudos
Message 1 of 11
(3,405 Views)

Hi Prince Boeing,

which language do you use to create your client? What type of data do you want to transfer? Is the explorer an option for you? With the explorer you can read data from a Webserver written in LabVIEW (your Server).

 

Mike

0 Kudos
Message 2 of 11
(3,396 Views)

Hi Mike,

 

Thank you for your reply. Can i use hyperterminal to act as the client? The data to be transferred is just some auto generated random numbers. I just tried using the hyperterminal where i set the host address as 172.0.0.2 and port 6000 but there is an error saying that it could not connect to host address 172.0.0.2. Do i have to go to control panel (of both machines) to set the IP address as 172.0.0.2 also? Or that hyperterminal is not an option for testing? Kindly advise. Thank you.

0 Kudos
Message 3 of 11
(3,386 Views)

Hi Price Boeing,

yes you can use hyperterminal. The pc with labview on it has to be 172.0.0.2 and the pc with hyperterminal has to use a different ip. You can connect to the labview pc, if there is a listener on port 6000 activated.

 

Mike

0 Kudos
Message 4 of 11
(3,376 Views)

1. Make sure that your IP is 172.0.0.1, not 127.0.0.1. 127.0.0.1 is local pc address. It'll not route to another PC.

2. If you connect PC to PC directly. Make sure you use cross cable.

3. Make sure no antivirus or firewall blocking your port, and it also a good idea to set both PCs to use the same subnet. 

0 Kudos
Message 5 of 11
(3,347 Views)

I usually ping the host pc before testing the networking code -> command line "ping <address>"

if this works, try the example code for connecting over TCPIP, it is a good start.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 11
(3,341 Views)

Hi all,

 

Thank you for all the replyI have made the configurations to the two PCs.

 

The one with labVIEW PC:

172.0.0.1

255.255.255.0

 

The one running hyperterminal PC:

172.0.0.2

255.255.255.0

 

I tried to ping on both PCs the address of the opposite PC successfully and i have also disabled the firewall on both PCs too.

 

In the hyperterminal, i set the address to call to 172.0.0.1 and port 6000 but i can't make any connection at all. In the labVIEW VI, i have set the address to call to 172.0.0.2 and port 6000. Please advise which part did i do wrongly. Thank you.

 

0 Kudos
Message 7 of 11
(3,272 Views)

Can you post the VI?

0 Kudos
Message 8 of 11
(3,266 Views)

Hi,

 

Attached is the VI. I have another VI to read the data being transmitted and it is working when i set the address to localhost.

Download All
0 Kudos
Message 9 of 11
(3,260 Views)

Have you tried Help>>Find Examples>>Search with "TCP">>Data Server.vi on server, and communicating from remote hyperterminal?

 

0 Kudos
Message 10 of 11
(3,256 Views)