LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LaBVIEW Command Line Interface: why do we need an UI?

Solved!
Go to solution

Hi,

 

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.

 

Regards,

Tamas

0 Kudos
Message 1 of 9
(1,786 Views)

Seems counterintuitive for me to use a graphical language in a true CLI environment.  So to answer your question of "Why?"  It's "because".  😄

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 9
(1,734 Views)
Solution
Accepted by topic author tcsabina

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.

Rolf Kalbermatter
My Blog
Message 3 of 9
(1,712 Views)

Hi,

 

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.

 

Kees

0 Kudos
Message 4 of 9
(1,668 Views)

This seems to behave as i'd expect a CLI to behave.

CLI.png

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 9
(1,649 Views)

@Yamaeda wrote:

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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 9
(1,622 Views)

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

 

Kees

0 Kudos
Message 7 of 9
(1,604 Views)

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...

0 Kudos
Message 8 of 9
(1,595 Views)

@rolfk true, didn't think about that!

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 9
(1,581 Views)