LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am using the "Menu Selection With Events.vi" example alongside other while loops, When I select exit from the new menu it stops the other while loops but not the menu/event while loop

The event driven menu example works fine and I've integrated it into my application. I have built in simple local vars to link menu selections to existing GUI buttons. The problem is that I cannot get the File-Exit menu option to switch off/terminate the application. The [1] "Stop": Value Change panel of the event structure simply switches off the other while loops but leaves the event while loop running. Add a while loop to the axample using a local var from the event while loop to terminate 2nd while loop to get the effect.
Help appreciated, Chris
0 Kudos
Message 1 of 7
(3,244 Views)
Post your code so that I can see what is going on and I should be able to help you.

Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 7
(3,244 Views)
Hi Joe,
Thanks for the offer. The menu code should be capable of terminating the entire application when the user selects File - My Exit. I did a bit of extra work and found a possible solution, please have a look, is it ok? Suggestions appreciated.
Regards, Chris
0 Kudos
Message 3 of 7
(3,244 Views)
If your menu tag "Exit" case, assign "True" to your "Stop" variable.

-Joe
0 Kudos
Message 4 of 7
(3,244 Views)
Attached you will find a modified version of your VI.
I documented what I did on the block diagram.You were right on you just needed to add a variable with a true wired to it.

Have fun with it.

Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 5 of 7
(3,244 Views)
Glad to help.
Love labview, live labview



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 7 of 7
(3,244 Views)