LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reset to default value every time I click abort execution?

Solved!
Go to solution

Get into the habit of creating an initialization state where default values and appearances (show/hide, enable/disable etc) for various controls/indicators are set.

 

This state should be the first thing to run when your program starts (maybe after some hardware safety checks if you have those).  Since it is a stand alone state, it can be called whenever you want to (say after you abort a simulation mid-process).  I am using the term "abort" here rather loosely, not referring to the "ABORT EXECUTION" red stop-sign.

 

0 Kudos
Message 11 of 14
(924 Views)

By "Stops" I mean that the execution state goes to 'Idle'.

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 12 of 14
(911 Views)

@sunson29 wrote:

Hi Paul, 

 

I tried your VI, thank your for that.  I think it reset after the program finished all process, right?   Btw, it was not working, I do put it one front panel. But it seems that vi will keep loading something if I abort the execution.  so that I have to wait for 3- 5 sec to run it again.


I don't observe that behavior.  It works fine for me.

To see where the action is look at the 'Exec State Change' case in the Facade.vi

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 13 of 14
(911 Views)

Thank you!

0 Kudos
Message 14 of 14
(908 Views)