LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building LabVIEW Application in a docker

Hi All,

 

Recently I came across the below articles on using docker for LabVIEW. 

 

http://stry.kr/2020/06/09/contain-your-excitement/

 
I wanted to give it a try but for LabVIEW2018 (as that is what we mostly use). I followed the steps given in the article and successfully installed LabVIEW2018 using the steps described in 
 
 
I also got the signed license files from NI. But when I try to build a simple LabVIEW project I get the below error.
 
PS C:\Program Files (x86)\National Instruments\Shared\LabVIEW CLI> .\LabVIEWCLI.exe --lv-ver 2018 -PortNumber 3365 -Verb
osity Diagnostic -OperationName ExecuteBuildSpec -ProjectPath "C:\cirepo\LV PROJECT.lvproj"
LabVIEWCLI started logging in file:  C:\Users\ContainerAdministrator\AppData\Local\Temp\lvtemporary_776302.log
"LabVIEWPath" command line argument is not passed. Using last used LabVIEW: "C:\Program Files (x86)\National Instruments
\LabVIEW 2018\LabVIEW.exe"
LabVIEW launched successfully.
 
Error code : -350000
Error message : LabVIEW CLI: (Hex 0xFFFAA8D0) The CLI for LabVIEW failed to establish a connection with LabVIEW. Ensure
LabVIEW is running with VI server enabled on the correct port number. To enable VI server in LabVIEW, select "Tools>>Opt
ions>>VI Server" and enable the "TCP/IP" checkbox. If the port number under "TCP/IP" is not 3363, you must specify the p
ort number using the "-PortNumber" argument.
An error occurred while running the LabVIEW CLI.
 
I have enabled the VI server in the LabVIEW.ini file and also set the port number to 3365. Below is the contents of the LabVIEW.ini file.
 
PS C:\Program Files (x86)\National Instruments\LabVIEW 2018> cat LabVIEW.ini
[LabVIEW]
server.tcp.port=3365
server.tcp.enabled=TRUE
server.tcp.access="+127.0.0.1;+localhost;+*"
IsFirstLaunch=False
ShowWelcomeOnLaunch=False
GSW_Pinned_Files=""
 
 
I have also updated the port number to 3365 in the LabVIEWCLI.ini file.
 
PS C:\Program Files (x86)\National Instruments\shared\LabVIEW CLI> cat LabVIEWCLI.ini
[LabVIEWCLI]
DefaultPortNumber = 3365
AppendToLogFile = FALSE
AppExitTimeout = 60000
DefaultLabVIEWPath = ""
OpenAppReferenceTimeoutInSecond = 3.000000
AfterLaunchOpenAppReferenceTimeoutInSecond = 20.000000
DeleteLabVIEWCLILogFile = FALSE
UDCInstallID = ""
PingDelay = -1
PingTimeout = 10000

 

I tried by increasing the timeout as well. But no luck. Any suggestions. 
 
Thanks
Dhagal
0 Kudos
Message 1 of 3
(3,368 Views)

@dhagal wrote:
I tried by increasing the timeout as well. But no luck. Any suggestions. 

Which timeout and increased to how much?

 

It seems the CLI can take quite long before becoming operational...

 

This could be a LabVIEWCLI problem, not related to Docker (although that won't help with speed).

 

Maybe these help:

LabVIEW-CLI-doesn-t-work-when-called-from-Jenkins

NI-LabVIEW-CLI-won-t-start-LabVIEW-VI-Server-fast-enough

 

Another take way from those thread is to use G-CLI...

0 Kudos
Message 2 of 3
(3,302 Views)

Hi,

 

I have found a way to use the host license file to run LabVIEW inside the container. I have described the steps here.

 

Building Labview 2018 programs in a docker container

 

Thanks

0 Kudos
Message 3 of 3
(3,193 Views)