LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to get Labview to run a shut down sequence in the event that a user closes the window instead of properly shutting down?

For example.  My program controls a temperature block heated by peltier elements.  If my program is stopped with the 'stop' button on my front panel, everything is fine... my code runs a shut down sequence to ensure all outputs are zero.  But, if my program is shut down by closing the window, there is a good chance that the power will continue to be delivered to the heaters, possibly over heating them to the point of failure.

Can I get Labview to run a shutdown sequence to prevent this?

Thanks,
Keddie
0 Kudos
Message 1 of 3
(3,103 Views)
Hi Keddie.  A couple of suggestions:

1) File -> VI Properties -> Window Appearance -> Customize -> toggle off show toolbar or abort button.

This should make the button disappear.

2) Use the 'Application Instance Close' event in an event structure.  This won't catch all ways that an
application can be closed, i.e. through the task manager, shutting down windows, etc., but should be a
good start for 'normal' operation.

3) If you have hardware that can go 'unsafe' being controlled by a PC, you really should have some sort of
hardware interlock to protect against the PC locking up.  We use a little serial port controlled watchdog timer
that sounds an alarm and opens a relay if the PC doesn't tickle the watchdog for 4 minutes or so.  Ours
is application specific and expensive, but I am sure there are generic, less expensive devices out there.

Hope this helps.

Matt
Message 2 of 3
(3,091 Views)
Hi Matt,

Thanks, that's exactly what I was looking for.

Cheers,
Keddie
0 Kudos
Message 3 of 3
(3,088 Views)