LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

closing subvi with a button?

Hi all,
i have a question here. Well i needs to put in a button in my subvi front panel so that when the button is clicked, the subvi will closed.
i needs the subvi to actually save the data during runtime in a configuration file. fyi the 'OK' button is for saving it.
attached is my program.
0 Kudos
Message 1 of 3
(2,678 Views)
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
0 Kudos
Message 2 of 3
(2,678 Views)
Hi Chad AE,
I couldnt open the file as i'm using labVIEW 7.0. Could you kindly save it in 7.0 ? thanks
0 Kudos
Message 3 of 3
(2,678 Views)