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.
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.
09-22-2020 03:24 AM
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.
09-22-2020 03:32 AM
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.
09-22-2020 03:43 AM
@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!
09-22-2020 09:52 AM
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.
09-22-2020 11:17 AM
@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.
09-22-2020 01:05 PM
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.
09-23-2020 07:58 AM
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.
09-23-2020 08:08 AM
@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...
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.
09-23-2020 08:11 AM
Note the subtle distance between heartbeat and a watchdog.
09-23-2020 08:24 AM
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.