LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Abort button event to write log file

I want to keep track of total Test Elapsed Time even when the top level VI is stopped/restarted (using the Abort VI button) or even unloaded from memory and the computer is rebooted.  I have a Watchdog Timer that will reboot the computer if LabView stops responding.  This computer will be running 24/7 and most of the time it will be unattended. 

 

I need to write records containing the Elapsed Time to a file when the top level VI is stopped using a Boolean STOP control (easy) and also when the VI is stopped using the Abort VI button (red stop sign) on the tool bar.  Using this button stops the execution of the VI anywhere in the code, thus preventing the block diagram code from writing the elapsed time value.  I don't think there is any way to save the elapsed time if the Watchdog Timer reboots the computer short of rewriting the same record repeatedly until the VI is stopped.  I have tried the Log at Completion feature located in the Operate menu.  It does not seem to write a record to the log file if the Abort button is used.  Is there a method of detecting the Abort button press and then running some code to write to a file?  If I disable the Abort button and use the Log at Completion function, can I convert the file to a format that is readable by another application other than the retrieve function in the Operate Menu? 

 

I have looked at using the Event Structure.  Does the Application Event “Exit” get triggered when the Abort button is pressed?

0 Kudos
Message 1 of 2
(2,437 Views)
The abort button should only be availabe when you are debugging the program. It should never be available for a user. Go to VI Properties>Window Appearance>Customize and at the very least, uncheck the Show Abort Button. I hide the entire toolbar.
0 Kudos
Message 2 of 2
(2,431 Views)