LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview does not quit when called from command line

Dear community,

 

I'd like to run a utility vi which is located inside a project from command line. After it run I'd like to terminate Labview and continue with my command line script. Since it is a utility vi, I don't want to generate an .exe from it, since that would mean much overhead. 

 

Here is what I tried, this is inside my example_utility.vi:

maxine_mumann_0-1679656719030.png

This perfectly terminates the vi as well as Labview, when running directly from the project.

 

However when I open Labview from command line,

$ "LabVIEW.exe" "myProject.lvproj" "example_utility.vi"

the vi runs (as configured upon opening) and terminates but Labview remains open.

 

Do you have any idea how to quit Labview after the vi finished? Is it possible to call "Quit Labview" Node from command line? I am also open for ideas how to perform these steps from a python script, if there are more convenient possibilies.

 

My local machine has Windows 10 and I am using Labview2022Q3.

Looking forward to your advice,

best wishes

  

 

0 Kudos
Message 1 of 5
(878 Views)

Hi maxine,

 


@maxine_mumann wrote:

Since it is a utility vi, I don't want to generate an .exe from it, since that would mean much overhead. 


What exactly is the overhead in creating an executable from your VI(s)?

It seems less troublesome than starting/quitting LabVIEW each time you want to call this functionality within your batch file…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(862 Views)

Dear GerdW, 

 

thanks for your fast response. There are several of these utility.vi s in different labview projects and I would like to run them upon request.

 

We are some collaborating developers and when any utility.vi changes it would need a re-build of the respective .exe. Each utility vi needs a build specification, which in best case detects that a modification was done and triggers a re-build. Further this .exe needs to be deployed somewhere and fetched from the command line script. This seems to me quite some overhead.

 

Best wishes

 

 

0 Kudos
Message 3 of 5
(841 Views)

Hi Maxine,

 


@maxine_mumann wrote:
  1. We are some collaborating developers and when any utility.vi changes it would need a re-build of the respective .exe.
  2. Each utility vi needs a build specification, which in best case detects that a modification was done and triggers a re-build.
  3. Further this .exe needs to be deployed somewhere and fetched from the command line script. This seems to me quite some overhead.

  1. Yes, changes to source code require building a new exe version. But that's one (more) item on the checklist for distributing software…
  2. Yes, creating an exe requires a build spec, but that's a one-time work item. (There are also CI/CD approaches with LabVIEW, but I don't have any experience with that.)
  3. When you work with a team of developers you surely use some SCC tool. So "deploying" reduces to updating local code base. But you need to deploy the changed VI anyway, so what's the problem with "updating" a folder?

I still don't see the overhead (apart from running a pre-defined build spec)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(828 Views)

Hello GerdW,

 

thank you for your response. We have quite some difficulties to maintain this project, up to now we did not find a sufficticated way to maintain our project in terms of Package Manager or instant fetching dependencies. However, this is another question. I appreciate your advice to take another approach to complete the task, but it really seems too much overload for this project. 

 

There is still the question left, why Labview VI 'Exit Labview" does not exit Labview, when the project and vi was started via command line? Do you know why that is and how to fix it?

 

Looking forward to your response. Best wishes

0 Kudos
Message 5 of 5
(748 Views)