01-26-2017 08:00 AM
Hello to all.
I would like to know how I can close my program ordely.
I mean... I have 4 whiles in my program so when user clicks a "stop" botton close ordely: while 1 and when it is finished then close while 2 then close while 3....
How can I do that just with a stop botton?
Thanks a lot.
01-26-2017 08:15 AM
You can e.g. use an Event structure in all loops that reacts to the Stop button, or 1 of them can send a User event (similar idea) or an Occurance, or the main one can simply set a Global or Action Engine the other uses to stop their loops.
/Y
01-26-2017 08:19 AM
Do you have any sort of communication setup between the loops, like a message queue, notifiers, etc? Is there an architecture that you are using (i.e. Producer/Consumer)? Or are the loops all independent of one another?
It would help if you could share a snippet of your code. Go to Edit -> Create VI Snippet from Selection.