LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data socket open?

I have one computer with a data socket that I write some waveforms to at ~ 1Hz.  I have another computer that reads out that data, and logs it.  My problem is that sometimes, I have to stop the vi on the data socket server machine, at which point, the second machine running the "data socket read vi" stops and gives an error, since the datasocket no longer exists.  Is there some way for the reader machine to test to see if the datasocket exists, and if not, I'll just write zeros or keep testing until it's open again?  I don't want to have to go over to the other machine and restart the vi every time this happens.

thanks.

Jesse Wodin

0 Kudos
Message 1 of 2
(2,725 Views)
Hello,
 
One way to do it would be to simply check for that error in your loop.  If it occurs, you know the connection was lost, otherwise you're receiving data!
 
Will this work for your application?
 
Thank you,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 2 of 2
(2,703 Views)