LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting Error #59 while using TCP Read.vi

I am using the TCP Read.vi to read data from a TCP connection. However, I need to know from the vi when the connection is lost, dropped, or reset. According to LabVIEW help, this should return back to me as Error #59. However, when I purposefully drop the connection on the server side, the TCP Read.vi does not return any errors.
0 Kudos
Message 1 of 7
(2,956 Views)
I am using version 7.0, and I get error 66 when I do this, which is correct. What version are you using?

Rich
0 Kudos
Message 2 of 7
(2,956 Views)
I am using 6.1. I believe I get the same problem when I use 7 too. I'm not sure which is correct, but I can't even get that error to come up when I cut the connection on my network.
0 Kudos
Message 3 of 7
(2,956 Views)
Can you post an example so people can examine it?

Rich
0 Kudos
Message 4 of 7
(2,956 Views)
Here is my example. Its a small vi that simulates what I am trying to do. Let me know if you have questions.
0 Kudos
Message 5 of 7
(2,956 Views)
I couldn't test it because I couldn't connect to the server. I didn't see anything obvious, though. When you say "cut the connection to the server" does that mean the server closes the socket? If so, you should get an error 66. If you mean you unplug the cable, then you will only get timeout errors. I am leaving town for awhile, so I can't help anymore.

Rich
0 Kudos
Message 6 of 7
(2,956 Views)
DMN;

The error you should get is 66.

There is a VI included in the LabVIEW examples that is exactly to detect that error. If you open the "Date Server" example, you will find a small VI called "No EOC Error", which checks to see if a connection closed error occurred and resets it to no error.

Regards;
Enrique
www.security.com
www.vartortech.com
0 Kudos
Message 7 of 7
(2,956 Views)