LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fire an Event automaticaly

if we set a timeout for the application, and after the time is expired, it will fired one of the event in the Event Structure.
0 Kudos
Message 1 of 4
(2,735 Views)
If you set the timeout then if the time is expired the timeout event will execute. This can be an empty event or you can put appropriate code, depending on the application. You should always include the timeout event in your event structure.
0 Kudos
Message 2 of 4
(2,735 Views)
John Rich wrote in message news:<50650000000500000058650100-1078497998000@exchange.ni.com>...
> If you set the timeout then if the time is expired the timeout event
> will execute. This can be an empty event or you can put appropriate
> code, depending on the application. You should always include the
> timeout event in your event structure.

Wrong. The timeout event should be used as needed; not 'always'.

Paul Cardinale
0 Kudos
Message 3 of 4
(2,735 Views)
I agree that "always" was a little strong. There are many instances where the timeout could be avoided. However, in my experience it is good practice to include the timeout in most instances as it eliminates the possibility that you get stuck endlessly waiting for an event to occur and you don't want to trigger an event. Certainly with proper programming techniques this problem can be avoided (the event could include the front panel stop button, e.g.), but since most event structures are already in a loop so that they can handle more than one event, including an empty timeout event results in very little overhead. I can think of few instances where the timeout event is detrimental.
0 Kudos
Message 4 of 4
(2,735 Views)