02-11-2011 11:15 AM
I'm sure this is a total noob question, but here it goes.
I have a test device that spits out data on a serial line after every test (about 1 or 2 minutes). This device is not close to my pc so it has a serial to ethernet converter connected to it. All is well with the data getting to my pc but I dont know when the test is completed.
My only solution is to stay connected while having TCP Read.vi in a loop and ignoring the timeout error (56). I don't want the timeout input to be set to infinity because if, for some reason, the test never completes, my program is stuck.
Any ideas? Your input is greatly appreciated.
Solved! Go to Solution.
02-11-2011 11:42 AM
I'm not clear what you're asking here. Why not just set the timeout value to slightly more than 2 minutes? Otherwise, there's nothing wrong with putting the TCP Read in a loop.
02-11-2011 12:12 PM
@programmindragon wrote:
My only solution is to stay connected while having TCP Read.vi in a loop and ignoring the timeout error (56). I don't want the timeout input to be set to infinity because if, for some reason, the test never completes, my program is stuck.
Any ideas? Your input is greatly appreciated.
I have an idea...it's the same as your idea . Set some timeout and clear errors if you get error 56. I would not suggest setting it to 2 minutes though, because, like you said, in that case your program could potentially take 2 minutes to stop. I'd set it to something like 200 ms (random value I picked.).
02-11-2011 04:16 PM
Thanks for confirming my thoughts, imstuck. I guess thats my only good option.