I am testing the LabVIEW Command Line interface, and exploring the possibilities of a CI system. I want to compile/build projects automatically, and visualize changes on the front panel, as mentioned in this KB article.
And to my surprise, the CLI doesn't work in a pure command line environment (like a linux server).
The CLI is starting LabVIEW itself for the VI-Server, so I can only use the CLI on a system with GUI (Linux desktop, or windows).
What are my options if I want a real command line interface?
Is there a 'command line' version of the VI-server?
I have seen this: https://github.com/JamesMc86/G-CLI
It might be an option, but I would prefer an 'official' toolchain for my activities.
Solved! Go to Solution.
Seems counterintuitive for me to use a graphical language in a true CLI environment. So to answer your question of "Why?" It's "because". 😄
If you create a Linux shared library you should have an option in the build settings to disable the GUI. Not sure if that also is available for EXEs. For the IDE itself, I don't think there is an option to really disable the GUI, it is way to deep ingrained in the whole LabVIEW kernel. In the past I solved that by installing a very light weight X Windows server such as TinyWM or dwm. They require minimum space and resources and won't load a server at all, but should be enough to satisfy the LabVIEW requirements to actually start up.
Long time ago I was asked to create an executable with a command line interface. There was no direct contact between the original requester and myself. So I don't know why they wanted this solution.
It was simply to get some values from from an instrument and return these value after a CL request.
I created a EXE from LV with a command line interface. Found the necessary documentation about this at NI.
I assume that this is still possible.
This seems to behave as i'd expect a CLI to behave.
The problem is not (anymore) that you can’t create a CLI in LabVIEW Around ca LabVIEW 6 it did not have those property nodes but when they were added a CLI was fairly simple to implement in LabVIEW although not a common thing to do.
The problem is that LabVIEW is very deeply married to a GUI. And tries to initialize the underlaying UI library (X Windows on Unix) during startup While it’s difficult to have no windowing system on Windows or Mac, this can be easily done under Linux by not installing any X Windows server and desktop manager. Not your typical Linux desktop distribution but very common on pure server systems that do not run any GUI applications.
I used the same property node to retrieve the command line parameters.
The application can run without any window showing up, but if the command line is not correctly formatted the window will popup. But in that case you can warn the user about the wrong format of the parameters.
See also this page of NI
Thank you all for your replies.
As rolfk pointed out, I was not looking for a way to create a LabVIEW application that has a CLI interface, but to compile a LabVIEW project using a command line environment (like a linux server).
I ended up using Xvfb...