LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help regarding Simple Data Client and Simple Data Server VIs

Hi everyone.

 

I have a simple objective. I just want to test the 2 example VIs, "Simple Data Client" and "Simple Data Server" between 2 computers. I just want to check whether is this working between the 2 computers.

 

What I have done for now is that I changed the "address", from "localhost" in the "Simple Data Client.vi" to the IP address of the computer running the "Simple Data Server". I runned the "Simple Data Server" VI in one of the computers first followed by the "Simple Data Client" in the other computer. Nothing is received and the client just timed out.

 

Can anyone please help me troubleshoot and tell me what are the possible problems for this? Are there any wires connections between 2 computers that I am missing or any other configurations I have to make before I can successfully do this?

 

Thanks.

 

 

Regards,

Jonathan

0 Kudos
Message 1 of 13
(4,201 Views)

Several possible problems :

- You were mistaken by typing server "Adress" in "Simple Data Client"

- Port number are not the same in "Simple Data Client" and "Simple Data Server" (they must be the same)

- You run the server, than you run the client, but the timeout in "Simple Data Server" is 1 minute for "TCP Listen" function : so if you run "Simple Data Server" and 3 minutes later "Simple Data Client", the server will have been stopped before you run the client ! (but I guess it shouln't timeout, so I think it's not the problem, but check it anyway...)

- Client and Server must be in a network of course (to check it, you can "ping" the server PC from the client PC, the server PC should answer : the instruction in DOS window is ping server_adress)

- Does anyone have other idea ???

0 Kudos
Message 2 of 13
(4,192 Views)

Adding to that..

- PC's should be connected with cross cable if connected directly and with straight cable if connected through a network hub.

- Try other port numbers apart from what you are using right now.  Coz., if the port number is already in use by other application you might get an error

- look into LAN configuration and see if it fire walled.  If so the server will refuse the connection. just rermove the security on LAN

 

Post back for queries .

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 3 of 13
(4,185 Views)

Thanks to both of you, krsone and JK1!! These tips have really been a big help. I have another question regarding the physical connection from computer to computer. What I did was that I connected the 2 computers with a RJ-45 cable. After this, then I conducted the TCP/IP "Data Client" and "Data Server" VIs on both computers. Then the "Error 60" (if I was correct..) appeared and once again, I wasn't successful.

 

So, I want to ask both of you guys, or anyone else in this forum, firstly, is my physical connection correct (or do I still need to do something else or what??) and secondly, what is with the "Error 60", I tried and tried for the whole day, but still to no avail. Could this really be caused by the computer being firewalled??

 

Thanks in advance! 

0 Kudos
Message 4 of 13
(4,173 Views)

It's been quite a few days ever since anyone replied to my questions. I am really in need of some help and I need it quick. I will repeat my question once more. Regarding the physical connection from computer to computer. What I did was that I connected the 2 computers with a RJ-45 cable. After this, then I conducted the TCP/IP "Data Client" and "Data Server" VIs on both computers. Then the "Error 60" (if I was correct..) appeared and once again, I wasn't successful.

 

So, I want to ask anyone  in this forum, firstly, is my physical connection correct (or do I still need to do something else or what??) and secondly, what is with the "Error 60", I tried and tried for the whole day, but still to no avail. Could this really be caused by the computer being firewalled??

 


0 Kudos
Message 5 of 13
(4,140 Views)

Hi Learnin,

 

Please understand that we are trying to HELP you. It is not the responsibility of any forum user to resolve your problem. If you want your problem to be solved asap, please contact the respectively NI office technical support.

 

1. Yes your physical connection seems correct.

 

2. Error 60 got an description indicating that 'The specified network address is currently in used.' For more Networking Error Codes, please refer here.

Can you try changing the port number?

 

Regards

Lee

 

0 Kudos
Message 6 of 13
(4,133 Views)

No, it is not clear that your physical connection is correct.  Did you use a normal RJ45 ethernet cable or a cross-over ethernet cable between the two PC's.  (Do you have any other networking hardware in between such as a hub or router?)

 

If you have just two PC's, you need to have a crossover ethernet cable.  Also make sure that the IP addresses on each PC are set statically.  Most networked PC's rely on DHCP to dynamically get their IP address from a central source such as a DHCP server or router.  If you pull such a PC off the network, then it doesn't have an IP address.  You will need to statically set the IP address on the 2 PC's (which are essentially make their own mini private network.)

 

Please clarify your connections between the PC's.  Also whether you have actually used the ping command to make sure  the "network" is working correctly between one and the other.

0 Kudos
Message 7 of 13
(4,131 Views)

Hi Ravens. Thanks for your reply. For physical connection wise, I am just purely using a RJ45 to connect 2 computers together. No, I did not use any crossover ethernet cable or any hubs or routers. As I am doing my project in school, all the computers are supposedly using the same(school) network. Is my way of the physical connection alright?

 

I have checked using the command prompt to check and both PCs do have their own IP addresses. I have tried pinging the 2 computers and all packets are sent and received. There does not seem to have any problems with pinging.

 

In short, I am using the LabVIEW examples so I think it should not be the software problem. Main thing is, is my hardware connections correct as mentioned earlier? Are there anything else I can do to troubleshoot this problem?  

0 Kudos
Message 8 of 13
(4,124 Views)

Hi Lee.P.

 

I understand that. I was just feeling frustrated about the project not working. Sincere apologies from me.

 

I was wrong about the error number. It is not Error 60. It is Error 59 - The network is down, unreachable, or has been reset.. Yes, I have tried changing the port numbers at the 2 computers when trying to send/receive.

 

Could anything else be the problem?

 

 

Regards,

Jonathan  

0 Kudos
Message 9 of 13
(4,123 Views)

No, you can't use a normal RJ45 ethernet cable to connect two computers directly to each other.  It has to be a crossover ethernet cable, or they have to be connected through a hub.  But then you say you have the computers using the same school network.  Which is it?  Are they on a network, or is it just 2 PC's connected by an ethernet cable?

 

Are you sure you know how the two computers are connected?  Do you know the difference between a normal ethernet cable and a cross-over cable?

 

You either have a cross-over cable or you have the two PC's on a network, otherwise you wouldn't be able to ping one from the other.

 

I suggest you talk to someone at your school who has more knowledge of PC's.

0 Kudos
Message 10 of 13
(4,115 Views)