LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem reconnecting to 2 TCP servers

Solved!
Go to solution

Hi,

 

I'm a relative LabVIEW novice and a complete TCP novice, so bear with my ignorance.

 

I have VI which acts as two clients sending data to two different servers (Arudino microcontrollers).

 

If I send data to only one of the servers, everthing works fine.

 

However, if I send data to both servers, I am only able to do so once. Resending the data causes the TCP Open Connection to time out.

 

Examining the packets being sent with Wireshark, I see that the client sends the SYN request, but the server never responds with a SYN ACK. (The VI continues to resend the SYN request until it times out.)

 

I'm fairly convinced there is not a problem with the VI, but I'm hoping someone with more knowledge than me will have an idea of how to fix it.

 

Thanks in advance,

-A.

 

(P.S. I apologize for the state of the code; it's no excuse, but I didn't write most of it. The relevant part of the subVI just contains several calls of TCP Write.)

0 Kudos
Message 1 of 6
(2,818 Views)

What does that yellow VI do?

Why don't you keep the connections open for the duration or the run?

0 Kudos
Message 2 of 6
(2,775 Views)

That VI calls TCP write N times (in a for-loop), which writes the majority of the data to the server.

 

This is actually a subVI of a main VI which controls an experimental apparatus. The way it is written, one run of the VI is one experimental run, so it's from one run to the next that the connection problems occur.

 

-A

0 Kudos
Message 3 of 6
(2,767 Views)

How do you stop the VI between runs?

0 Kudos
Message 4 of 6
(2,762 Views)

For the main VI, we simply hit the Run button to so a single run, and when it's done it stops. The subVI I attached is called by the main VI. (Sorry if this is not a useful answer, as I said I'm very much a non-expert.)

0 Kudos
Message 5 of 6
(2,757 Views)
Solution
Accepted by topic author mucramwerdna

The issue has been resolved. It was due to a trivial mis-assignment of MAC addresses.

0 Kudos
Message 6 of 6
(2,743 Views)