11-28-2011 12:53 PM
@X. wrote:
That or you could generate a notification from the Event Case where you detect a stop action (and of course have your processing VI monitor this notifier).
Personally, when things may take a long time and I expect the user to change his mind, I pop up a progress bar from within the "Computing VI" with a "Cancel" and "Abort" button.
"Cancel", well cancels the whole thing, While "Abort" returns the results achieved so far (if that aplies).
THis is good advice. Regardless though, The processing code will have to be organized in such a manner that it can detect the Stop event during processing. State machines offer a nice way to transition between tasks and allow the check to occur during processing (check between each state for instance).
11-28-2011 03:44 PM
Responding to the progress bar inputs also requires some kind of state machine architecture. The simplest of which is when the processing involves a For or a While loop, which updates the progress bar either at each iteration or a subset thereof (the Loop is the "State Machine"). The main disadvantage of the progress bar is that it is obnoxious (even if you make it a non-floating window).
02-24-2016 04:36 PM
the solution is to include a timeout event, no matter who is empty
02-24-2016 04:48 PM
Canzaca,
Please don't revive 5 year old threads. If there's something you have a question about, feel free to post a new thread.
02-25-2016 04:02 PM
@Canzaca wrote:the solution is to include a timeout event, no matter who is empty
This is a long thread last active five years ago.
You probably should be significantly more specific this which post your "solution" applies. Thanks!
05-19-2017 03:05 AM
Good advice. In this way I can press other butons while a process trigged by an the event structure is running.