Dear nyp,
Thank you for contacting National Instruments.
To address your question, instead of placing a FALSE constant to the STOP of the outermost while loop, include constants in every case of your case statement. This way whatever happens in the case structure determines whether or not the VI closes.
Include a button in your Menu for closing your program (EXIT). Add another case (3) to account for this button. Inside this case, have a True constant wired out to STOP. From every other case, make sure to wire a False constant to STOP. If you fail to wire constants from all cases, the program will not compile without an error.
I've included the VI you sent with the new ability to close it.
Let me know if you have any further questions or
if this does not resolve your issue.
Thanks again and have a great day!
Chad AE
Applications Engineer - National Instruments