From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I generate a boolean output whenever I abort a VI?

Thank you for such a quick and useful answer ! Didn t know about that event, might be the right solution. I ll have a try.Wondering though, if Labview will take the event case into account before closing of the VI, cos that supposes it goes back in all events triggered by an app.close before closing. I guess it does and anyway I will find out soon. Wondering also if that will happen for any type of abortion ( 'red cross' clicking in the app, closing of lview, aborting the process, .. ). 

Thank you.

0 Kudos
Message 11 of 33
(600 Views)

Interesting. Not sure though how to implement that nor how to reach the notification.

Simple notification could be a way to handle the issue, but still am hoping to reset the supplies automatically without needing to intervene on threads and queues, like via solution described below ( app.close event ).

Will keep this in mind if last solution doesn't work.

 

0 Kudos
Message 12 of 33
(594 Views)

@CharlesDel wrote:

Thank you for such a quick and useful answer ! Didn t know about that event, might be the right solution. I ll have a try.Wondering though, if Labview will take the event case into account before closing of the VI, cos that supposes it goes back in all events triggered by an app.close before closing. I guess it does and anyway I will find out soon. Wondering also if that will happen for any type of abortion ( 'red cross' clicking in the app, closing of lview, aborting the process, .. ). 

Thank you.


My expectations:

 

If Windows wants to close the application, for instance if you shut down, it will send a notification to each application. LV will get that as an Application Close? event. You'll have some time to gracefully close. If you Discard, it might be ignored in some situations. I expect Windows to give a message "this application is stopping windows from shutting down" for a while. Then it will terminate the process.

 

Not sure what the "red cross" is. Aborting the VI will abort it. There's no way around this.

 

AFAIK, closing LabVIEW will abort VIs.

 

Terminating the process from task manager might give a notice (Application Close?).... LabVIEW does prompt "this will close all running VIs". This is probably a curtesy, it asks nicely first. But eventually task manager will issue a TerminateProcess or something like it. That will simply pull e plug.

 

Anyway, you'll find out. Let us know your findings!

0 Kudos
Message 13 of 33
(592 Views)

Just like any other application - including Windows itself - if you force-terminate it in an ungraceful manner, there's no guarantee what happens afterwards.  You can get rid of the whole control box in the upper-right corner by customizing the VI appearance, avoiding that whole mess.

 

There was a suggestion in a different topic where you would have the software ping some hardware periodically as a heartbeat, and if that hardware doesn't receive a heartbeat ping (or maybe a few in a row), it shuts down immediately.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 14 of 33
(572 Views)

@billko wrote:

Just like any other application - including Windows itself - if you force-terminate it in an ungraceful manner, there's no guarantee what happens afterwards.  You can get rid of the whole control box in the upper-right corner by customizing the VI appearance, avoiding that whole mess.


Don't forget to check CTRL+.

 

That still works even if abort isn't visible.

0 Kudos
Message 15 of 33
(565 Views)

wiebe@CARYA wrote:

@billko wrote:

Just like any other application - including Windows itself - if you force-terminate it in an ungraceful manner, there's no guarantee what happens afterwards.  You can get rid of the whole control box in the upper-right corner by customizing the VI appearance, avoiding that whole mess.


Don't forget to check CTRL+.

 

That still works even if abort isn't visible.


Sorry, I meant specifically the [X] mess.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 16 of 33
(559 Views)

Interesting.

 

Sort of a 'watchdog' I guess. I might want to use that solution, would guarantee shut down of supplies. Not obvious though how I d implement it with that Keysight hardware

( through scpi commands or labview visa s I guesss ), meaning: how would i set the hardware to read those messages ( could try to set the DIO to be reading those periodically ) but above all how would i set the system in order to shut down in the absence of such messages, if at all possible with such hardware.

 

This rather then becomes a question for a Keysight or SCPI specialist.

 

Thank you.

Charles.

0 Kudos
Message 17 of 33
(541 Views)

@CharlesDel wrote:

Interesting.

 

Sort of a 'watchdog' I guess. I might want to use that solution, would guarantee shut down of supplies. Not obvious though how I d implement it with that Keysight hardware

( through scpi commands or labview visa s I guesss ), meaning: how would i set the hardware to read those messages ( could try to set the DIO to be reading those periodically ) but above all how would i set the system in order to shut down in the absence of such messages, if at all possible with such hardware.

 

This rather then becomes a question for a Keysight or SCPI specialist.


It could be a matter of reading the manual...

 

http://rfmw.em.keysight.com/bihelpfiles/n6700/webhelp/Content/__E_Using%20the%20Power%20System/60%20...

 

No idea what device you have, but apparently there are keysight devices that have watchdog protection as a build in option.

 

There are relays that need to be kicked ("kick the watchdog") to stay on.

0 Kudos
Message 18 of 33
(535 Views)

After checking my conclusion is:

as well 'panel.Close ?' 'as   'app.close ?' event will be triggered if quiting via 'File-> Close',

but it won t react via the 'X' , nor if process is stopped via task manager, nor if LV is closed.

Solves thus 1 over 4 abort possibilities, not bad, but not a full solution.

 

Might want to explore either 'wiebe'  s suggestion, either the one with the hardware sending periodic messages, but as I said I m not sure how to implement any of both those at this time.

 

Thanks.

0 Kudos
Message 20 of 33
(528 Views)