From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Close program ordely

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.

0 Kudos
Message 1 of 3
(2,510 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 3
(2,497 Views)

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.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 3
(2,494 Views)