06-08-2013 03:54 AM
Hi all,
I just started using labview. I am working on UDP communication.
I have some question. How can I pop up some dialog to show the user when the "udp open block" is timeout? (in the picture show 5000ms)
For example if the udp cannot open in 5000ms, the labview will show "cannot connect" dialog box to the user.
please help thank you in advance.
06-08-2013 04:20 AM
Hi machinez,
you should open the context help (with ctrl-h). Then read the help for the function and maybe also the advanced help linked to by the context help!
When you have done so, you should wire all outputs of the UDP function. That way you can use the error output of "UDP Read" and react on TimeOut errors. Those errors are given by a distinct error number and it's up to you to show a message. You may use the Simple or GeneralErrorHandler as well...
06-12-2013 05:00 AM
Thank you GerdW,
I tried checking from the error out node (yellow line) by cluster. it has shown no error (error code=0) even the udp was time out.
I dont know how to do next so. How to get the error code from the block?
Thank for your great support
06-12-2013 05:33 AM
Thats because you have not connected the error out from the first block. Connect all the error out / error in connection then check for the timeout error value.
Thanks
06-13-2013 10:45 PM
Hi Ranjeet,
I connected the error out and got the same result, error=0 even the udp is timeout.
06-13-2013 10:57 PM
Can you Attach your VI (In 2011 format) ?
07-17-2013 08:30 PM
I haven't seen a case where opening a UDP port times out (maybe firewall settings, or so, can cause this). UDP Open opens a port on the local machine. You won't get a timeout from an unresponsive remote port until you do a read.