11-09-2017 03:19 PM - edited 11-09-2017 03:22 PM
Dear friends.
Question:
How to reset to default value every time I click abort execution?
I do know how to reset to default by using invoke nodes, but I want to make this happen everything I abort the program (click the red dot bottom). Thank you.
sorry about multiple posts here, there was an error. but i dont know how to delete it.
Solved! Go to Solution.
11-09-2017 03:18 PM
Dear friends.
Question:
How to reset to default value every time I click abort execution?
I do know how to reset to default by using invoke nodes, but I want to make this happen everything I abort the program (click the red dot bottom). Thank you.
11-09-2017 03:31 PM - edited 11-09-2017 03:33 PM
You cannot do anything programatically when you abort the VI. It just stops in its tracks.
(If you would do a proper state machine, add a state to reset all to defaults and keep running, e.g. back to the idle state waiting for new user inputs)
11-09-2017 03:46 PM
To add: Abort Execution is not a feature intended to be used to normally stop your program; you should use a Stop Control and add logic to stop gracefully, which could also include calling those invoke nodes.
11-09-2017 05:21 PM
@tyk007 wrote:
To add: Abort Execution is not a feature intended to be used to normally stop your program; you should use a Stop Control and add logic to stop gracefully, which could also include calling those invoke nodes.
Not to be confused with the Stop node which is exactly like pressing the abort button.
11-09-2017 05:25 PM
Yeah, I know that.
I guess I cannot make it back to default every time if I abort the simulation. What I have now is that reset will happen only after the simulation is over.
But sometimes, I really don't want to the simulation to run completely. That's why I just keep abort it. Thanks though.
11-09-2017 05:34 PM
If you are only worried about the indicators containing stale values on the second run (until they are updated after the second simulation has completed), you can configure the VI to clear them with every new run (VI properties...execution...clear indicators when called).
Often, the controls are best left at the last used settings anyway.
11-10-2017 11:12 AM
11-10-2017 11:14 AM
lol. thanks. What do you mean by VI stops? I abort the VI or the vi finished all process? Thank you.
11-10-2017 11:20 AM
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.