LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Abort runing READ TCP VI

In my compiled application I'm using the Read TCP VI with a 30 minutes timeout constant. This works fine as during 30 minutes if not data activity is present on the port, the connection is still active as needed. But now the user should be able to abort this timeout, mean to abort the running read TCP vi, without aborting all the application... How can we implement such a function.

Thanks for your advice

Regards

HaemoPhil
0 Kudos
Message 1 of 4
(2,824 Views)
Don't use a long timeout. Instead, use a short timeout (100-1000 ms), and use a shift register to count the number of consecutive timeout errors. Once this is larger than a certain number, abort the connection. If there was no error, reset the counter.

___________________
Try to take over the world!
Message 2 of 4
(2,820 Views)
Thank you TST... that was the right thing to do... 🙂
0 Kudos
Message 3 of 4
(2,814 Views)
If you don't need the connection to stay alive, another solution is to close the connection. The waiting Read TCP node will resume immediatly.


LabVIEW, C'est LabVIEW

Message 4 of 4
(2,809 Views)