LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with tcp communication in Labview 2011

We have a problem with tcp communication in Labview 2011 SP1. we've a Vi and two exe files. They exchange messages via tcp/IP. The VI is the listener and it keep waiting for a connection. When one of the exe files is launched by the VI, it try to connect to the port of the listener. Both are on the localhost. What seems to happen is that the listener keep waiting while the exe file considers the connection estabilished and it continues to run exchanging messages with the other exe file. This problem doesn't occur when all the partners are VIs.

Another problem is beetween the two exe beacuse I think that the connection fall down but the write TCP communication block returns error 56 instead of 63 or others. That is not a big problem because I put there a timeout to consider the connection broken.

What do you suggest to do?

Thank you.

0 Kudos
Message 1 of 2
(2,272 Views)

Have you checked that the selected port is not already used by something else on your system? Your exe listener might be failing to create the listener socket and you don't notice it, if you don't have proper error handling. Then your client connects to whatever was already using the port number and sends it most likely data this server only wonders about and not recognizing it, throwing it away.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 2
(2,223 Views)