LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW for Linux: Create an app to run from a command line

I need to convert a Windows LabVIEW app to Linux. Before I buy a Linux version of LabVIEW, it is possible to build an application in Linux to run from a command line with options (say I want to load a config file etc).

 

Thanks!

0 Kudos
Message 1 of 9
(5,535 Views)

It should work the same way as the windows version with the Application:Command Line Arguements property. At the least the help does not say Windows only.

0 Kudos
Message 2 of 9
(5,527 Views)

As Dennis says that should work just fine. The only possible problem is when you want to run the application healdless too (without GUI). LabVIEW normally expects a fully working X Windows manager to run at all.

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 9
(5,474 Views)

Is there a way to launch a LabVIEW app from a command line without GUI?

 

What does X Windows Manager do?

0 Kudos
Message 4 of 9
(5,454 Views)

X Windows Manager provides an interface to render the windows and basic widgets on screen, see http://en.wikipedia.org/wiki/X_Window_System.

 

LabVIEW for Linux has in principle a rather hard dependency on some form of Windows manager being present. During startup of LabVIEW this X Window manager is initialized and if it isn't present all kind of havoc can occur.

 

I think there was some semi documented INI file setting that one could use to allow a LabVIEW app to start up even if no X Window manager was installed but that had its own difficulties. In my experience it wasn't really worth the hassles. The easier solution was usually to install a minimal X Window server such as a text only variant so that the dependency was properly satisfied and LabVIEW could initialize everything properly, eventhough no user interface was later displayed in the LabVIEW app.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 9
(5,446 Views)

Just an update: We had to cancel the project since NI does not have a 64-bit version of LabVIEW for Linux. The only LabVIEW version for Linux is 32-bit and we could not even install it on a 64-bit machine.

0 Kudos
Message 6 of 9
(5,189 Views)

I wanted to throw in an idea. When you build a LabVIEW built DLL with the Application Builder, there is an oprion in the Advanced page to link to the Embedded Run-Time Engine. This RTE is closer to what we have for LabVIEW RT. It has no links to any of the GUI libraries. NI-DAQmx Base uses this method to achieve the C Interface of the product. Now, this will only build DLLs. That means you would need to write a small C wrapper as the executable. You can add your command line parsing in there and then pass the options down to the LabVIEW built DLL. I have personally written command line utilities (like lsdaq for NI-DAQmx Base) that do this.

 

As for a LabVIEW for Linux that is 64-bit, you never know what the future might hold.

0 Kudos
Message 7 of 9
(5,171 Views)

@Randy_H wrote:

I wanted to throw in an idea. When you build a LabVIEW built DLL with the Application Builder, there is an oprion in the Advanced page to link to the Embedded Run-Time Engine. This RTE is closer to what we have for LabVIEW RT. It has no links to any of the GUI libraries. NI-DAQmx Base uses this method to achieve the C Interface of the product. Now, this will only build DLLs. That means you would need to write a small C wrapper as the executable. You can add your command line parsing in there and then pass the options down to the LabVIEW built DLL. I have personally written command line utilities (like lsdaq for NI-DAQmx Base) that do this.

 

As for a LabVIEW for Linux that is 64-bit, you never know what the future might hold.


Randy, the project is on and it is quite successful thanks to your help. 

 

Could you elaborate for to do this in Linux? You can only build a shared or a packed library in Linux. 

0 Kudos
Message 8 of 9
(5,065 Views)
0 Kudos
Message 9 of 9
(4,893 Views)