ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement a warning before program is stopped?

Hi.

 

I have an issue that's probably easy to solve, but which I can't seem to get right.

When the user pushes a Stop-button in the program there should pop up a warning before it is stopped, to confirm that you really want to stop.

 

What I want is that when the user pushes the stop button - it doesn't change to FALSE before the pup up is confirmed with "yes I want to stop". How can I do this?

 

The .VI is added, but doesn't solve the problem as it uses a Event Structure based on a value change of the stop-button - but I want the message to come up before the value is changed.

 

 

Hope somebody can help me with this 🙂

 

 

___________________________________
Is my avatar the dog from the fraggle rock?
0 Kudos
Message 1 of 6
(3,728 Views)

I would use the two-button dialog function in Dialog and User Interface. It has a true/false output that you could use to end your program.

0 Kudos
Message 2 of 6
(3,724 Views)

If you look at the VI you see that I do use a Two-button dialog button, but I want the (true/false) out of it, to control the start/stop-button when the start/stop-button is pressed. Is twanthere any way to do this?

 

So I don't want to change the value of the start/stop button when it's pushed down. I want the dialog question to be shown when the start/stop-button is pushed, and if the user wishes to end - THEN the start/stop button changes value.

 

Hope this clear things up.

___________________________________
Is my avatar the dog from the fraggle rock?
0 Kudos
Message 3 of 6
(3,717 Views)

your vi is the latest, i can't open it. can you change your vi version to 8.2?

i guess your event is in wrong mode.

 

0 Kudos
Message 4 of 6
(3,710 Views)

Here is what I would do

Tim
GHSP
Message 5 of 6
(3,699 Views)

Here's another way to look at it.

 

JohnCS

Message 6 of 6
(3,686 Views)