NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
fliphkd778
Posts: 10
0 Kudos
Accepted Solution

Ethernet I/O between two computers

I have two computers running labview. I am attempting to generate a signal on one, and read it on the other. Connection between the two computers is ethernet. The problem is that NI MAX cannot detect a network device. I have successfully pinged the signal sending computer through command prompt. Any ideas on why MAX cannot detect the signaling computer?

Member
Quintin
Posts: 61

Re: Ethernet I/O between two computers

Have you tried running the TCP client and server examples that ship with LabVIEW?  You could run the client VI on one machine and the server VI on the other.

Member
fliphkd778
Posts: 10
0 Kudos

Re: Ethernet I/O between two computers

Good point. I tried running the Data Server VI on the generation machine, and the Data Client on the other. The error recieved was "Network connection refused by Server." I used the default port input in the VI's, how would I know the port number?

Member
Quintin
Posts: 61
0 Kudos

Re: Ethernet I/O between two computers

You just need to make sure the port number matches between the two VIs.  If you kept them as the default values, then next I would check my firewall settings, or even temporarily turn off the firewall to see if that allows the connection to be made between the two VIs.

Member
fliphkd778
Posts: 10
0 Kudos

Re: Ethernet I/O between two computers

The first issue I discovered is that I was using a standard ethernet cable, not a crossover cable. After switching to the correct cable, I was able to see the files on the other machine. I then disabled all firewalls, and tried running the Client/Server VI's pair on each machine. The error was still the same. NI MAX was unable to set up an ethernet connection as well. Not sure what to try next.

Active Participant
Charles_CLA
Posts: 290

Re: Ethernet I/O between two computers

Try running the examples on the same machine first. If you can't get the example to work between two different application instances on the same machine, then you are definitely not going to get it working on two different machines. Once that is working, try using the IP address instead of the hostname of the computer. If still no luck, try disconnecting all other networks on both machines.

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
Member
fliphkd778
Posts: 10
0 Kudos

Re: Ethernet I/O between two computers

It worked! Even with the firewall enabled on both machines. Thanks for all the help!

Member
fliphkd778
Posts: 10
0 Kudos

Re: Ethernet I/O between two computers

Just an update, I was successful using a standard ethernet cable as well as a cross-over. 

Active Participant
Charles_CLA
Posts: 290
0 Kudos

Re: Ethernet I/O between two computers

Could you be more specific as to what appeared to fix your problem? Also, regarding the crossover vs non-crossover cable, at some point in time the ethernet chip makers got creative and started making auto-sensing ethernet cards that could sense if you were using a crossover cable or not and would automatically swap the tx and rx lines to compensate. If you get two really old computers, you will probably have to use the crossover cable.

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
Member
fliphkd778
Posts: 10

Re: Ethernet I/O between two computers

[ Edited ]

Sorry for the ambuiguity. 

 

  • I first connected the conputers with an ethernet cable. 
  • From there, I ran the command "ipconfig" in the windows command prompt to acquire the ip address for the server machine. 
  • I then changed the ethernet connection properties in Window's Network and Sharing Center to use the address from the step above. 
  • Next, I launchd LabVIEW on both machines. On the server machine, I ran the NI example VI "Data Server.vi." This VI may be found by searching "TCP" in the examples search. Run the server vi before the client vi. 
  • I ran the example "Data Client.vi" on the client machine, using the ip address from step 2 in the "address" input on the front panel. 

From there, data from the server began to be displayed on the client vi.