LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to close a VI using a one button dialog?

hello,
i am using a VI which plot values on a graph, once the values are plotted, i wish the user can close the window using a 'one button dialog' vi.
is that possible to do that? and how?
thanks for your help
guillaume
0 Kudos
Message 1 of 5
(3,973 Views)
How/when will the "one button dialog" be displayed. Will it be automatically after the data is done being taken. Will the user have to press a stop button for the one button dialog to appear, or will it be up continuously. How is the program being run? Is it in a for loop, or a sequence, how is the program supposed to exit. Please be more descriptive or send an example of what you are trying to do
0 Kudos
Message 2 of 5
(3,973 Views)
actually, as soon as my data is taken (in a loop) the message from the 'one button dialog' appears at this time the loop is not running anymore. the window is still open but i wish i could close the windows when the user decide to by pressing an 'Close' button from the dialog box.
i see that the one button dialog as un true boolean when pressed....so my question is is there a possibility to wire somthing to that true, meaning that i wish to close the VI Window.
thanks a lot for your help.
guillaume
0 Kudos
Message 3 of 5
(3,973 Views)
Guillaume,

Yes, when the one button is pressed, it returns a "true" out of the right output terminal of the one button dialog VI. You can then attach a case structure to execute some code (such as closing the front panel of the VI).

I attached a screen shot of a simple program that uses a one button dialog and then a case structure which closes the front panel of the VI using a reference to the VI. You could also just put an "Exit LabVIEW" function in the case structure if you wanted to exit LabVIEW completely.

I hope this helps! Have a great day.

Sincerely,

Liz Fausak
0 Kudos
Message 4 of 5
(3,973 Views)
thank you so much, you've been great help.

have a good day,

guillaume
0 Kudos
Message 5 of 5
(3,973 Views)