03-24-2023 06:25 AM
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:
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
03-24-2023 06:58 AM
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…
03-24-2023 07:51 AM
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
03-24-2023 08:10 AM
Hi Maxine,
@maxine_mumann wrote:
- 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.
I still don't see the overhead (apart from running a pre-defined build spec)…
03-29-2023 02:03 AM
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