04-21-2009 11:06 AM
04-21-2009 11:22 AM - edited 04-21-2009 11:23 AM
epsilon-delta wrote:
... How can I set the VI up so that the action is executed if I click the abort button? Is there a boolean I can access after the abort button is clicked? Thanks.
I don't think there is ant way to exectute an action after the abort button is clicked. By definition, the abort button is stopping the vi.
Why don't you make your own abort button (boolean) and use an event structure to capture the abort action? Then, you could execute any cleanup code and terminate the program.
04-21-2009 11:45 AM
Clicking on the Abort button should not even be an option for your program! Remove it. This is done in VI Properties>Window Appearance>Customize.
See this.
04-21-2009 12:44 PM
09-21-2020 04:19 AM
I have a similar issue, but this post doesn't answer it completely, therefore I intervene here by answering last post s reply:
.. indeed one can suppress abort s option. But that wont prevent the user from aborting the vi in another way, for example just by closing Labview or it s process.
My concern is to make a test bench very secure: tests launched during its use will deliver
high voltage on the bench. Therefore I want to make sure any cancelation of the VI also sets the concerned supplies back to 0V.
Would there be any mean to associate VI s cancellation with an scripted action ( in this case
shutting down power supplies outputs )
Thanks in advance for your answer.
Charles.
09-21-2020 04:35 AM
@CharlesDel wrote:
I have a similar issue, but this post doesn't answer it completely, therefore I intervene here by answering last post s reply:
.. indeed one can suppress abort s option. But that wont prevent the user from aborting the vi in another way, for example just by closing Labview or it s process.
My concern is to make a test bench very secure: tests launched during its use will deliver
high voltage on the bench. Therefore I want to make sure any cancelation of the VI also sets the concerned supplies back to 0V.
Would there be any mean to associate VI s cancellation with an scripted action ( in this case shutting down power supplies outputs )
Why not make sure the VI can't be aborted?
You can get notified if a VI aborts, by allocating a queue A before you start the VI, then make the VI allocate a queue B, pass queue B on Queue A. The starter of the (dynamic) VI will then get queue B, and can wait for a enqueued element. But the wait will also stop if the VI that allocated the queue B terminated. So when the VI stops in any way, the caller gets notified...
09-21-2020 04:39 AM
BTW. this is an 11 year old thread...
09-21-2020 04:47 AM
Closing LV or a window will generate an App.close and window.Close-event resp. That can easily be handled.
09-21-2020 05:14 AM
@CharlesDel wrote:
.. indeed one can suppress abort s option. But that wont prevent the user from aborting the vi in another way, for example just by closing Labview or it s process.
If you terminate the process, the process won't have any way to react...
09-21-2020 05:39 AM
wiebe@CARYA wrote:
@CharlesDel wrote:
I have a similar issue, but this post doesn't answer it completely, therefore I intervene here by answering last post s reply:
.. indeed one can suppress abort s option. But that wont prevent the user from aborting the vi in another way, for example just by closing Labview or it s process.
My concern is to make a test bench very secure: tests launched during its use will deliver
high voltage on the bench. Therefore I want to make sure any cancelation of the VI also sets the concerned supplies back to 0V.
Would there be any mean to associate VI s cancellation with an scripted action ( in this case shutting down power supplies outputs )
Why not make sure the VI can't be aborted?
If it is very critical that the software won't stop, use a fine tuned Linux distribution, or Windows IoT, or even a real time system (cRIO). You can tweak normal Windows so you're not allowed to use task manager anymore, nut who knows what happens when Windows updates?
If things are that important, the hardware should handle it. When software is unresponsive the hardware should bring the system to a safe state.