LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

close executeable vi

I have some trouble with the closing of executeable VIs.

For measurement inside a vehicle we installed a pc which boot automatically when IGN is turned on and run a vi for automated datalogging, also using USB devices.

The PC has an input to start/shut-down. This input is activated when IGN is turned off. All active applications are closed by windows, before shutting down the PC.

Sometimes the USB interfaces hang-up, due to missing initialization.

My VI is using the STOP buttom to execute the "Close Interface" SubVI.

My question:

Is this SubVI also executed when the PC is just shut-down without pressing the STOP button explicitly?? 

How can it be solved?

 

Thanks for any support.

0 Kudos
Message 1 of 4
(2,641 Views)

"Is this SubVI also executed when the PC is just shut-down without pressing the STOP button explicitly??  "

 

If i understand the question correctly, no.

 

"How can it be solved?"

If you can , you can let Labview finish the program and Labview to stut down windows. All other programs will shut down as they do, now.

0 Kudos
Message 2 of 4
(2,624 Views)

I agree, the VI will most likely not be executed when the application is killed by an OS.

 

Have a lookhere at a paper on closing an application.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 4
(2,614 Views)

If I understood correctly, no the sub-VI will not run.

 

When a computer is shutting down, it systematically kills all running processes.

It also does not allow any new processes to start up (*hence sometimes you will see a pop-up "____ failed to open because (OS) is shutting down")
This means, that the sub-VI will not run. Make the shutting-down code the VERY LAST code that runs to avoid this issue.

Cory K
0 Kudos
Message 4 of 4
(2,567 Views)