LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW hangs on "Quit LabVIEW" when calles from command line

Hi,

 

I have to call LabVIEW VIs from command line / with command line arguments, which is working quite fine now.

 

I just stumbed across some strange behaviour.

QuitLV.png

The above code is the last part of a VI used to programmatically modify a LV project. When running from LV2013.01f5 enviroment, everything is fine.

When calling the VI form command line (Labview.exe "myVi.vi" -- Par1 par2 ...) the functionality of the VI is ok, but LabVIEW stalls on quitting LabVIEW and needs to be gently reset by the task manager.... sending error reports to Austin.

 

LabVIEW 2014 is running fine! So I suppose this is a 2013 issue. Haven't found any known issues yet.

Anyone seen anything similar?

 

Cheers

Oli

 

0 Kudos
Message 1 of 5
(3,095 Views)

Why are you using 'Quit LabVIEW'? You should just be able to call the FP.Close method and the LabVIEW runtime engine will exit gracefully once everything has finished executing (e.g. it's the last panel open).

 

(In theory....the above is true. I have seen a weird case before where having a LabVIEW application run as a service, the VI stops executing but the run-time engine stays active - perhaps it's a similar thing here...'Quit LabVIEW' didn't work in that instance either...I ended up having to create a 'kill' VI which calls system exec to kill the process! That was in LV2012.)


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 5
(3,091 Views)

Thanks for the quick reply

 

FP.Close does not shut down LabVIEW. But I need it to be.

 

Building an exe is not an option since Project.Save is not avail in the Runtime Engine...

0 Kudos
Message 3 of 5
(3,085 Views)

Ah Ok, I had assumed you were running it as an executable.

 

One thing that I can think of - is the Project.Save method asynchronous? Can you put a delay in or check for modifications to ensure the save is complete before calling the quit LabVIEW?

 

In any case, I'd be a bit dubious about calling Quit LabVIEW...what if you had another project open? 😮 (I'm assuming here it will close all application instances?)


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 5
(3,075 Views)

I had already considered the asynchronous nature of the invoke node. Tried to put in up to 10s of delay between the Project.Save and the QuitLV.

Results didn't change.

 

The code is to be run from command script with only one LabVIEW instance. The script has to wait for command completion on every step. Sure, there are methods of synchronization, but I'd like to get around tinkering Smiley Happy

 

It really makes me wonder, it's working when run from the development enviroment or on 2014.

0 Kudos
Message 5 of 5
(3,065 Views)