Continuous Integration

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Solved!
Go to solution

The 1.1 version of the CLI tool now allows for the --timeout flag on each call to set how long the CLI waits for LV to start up and connect.  When launching LabVIEW and opening a large project, it often takes longer than 60 seconds to finish the loading process.  You may need a timeout more like 120 or 180 seconds in this case, depending on machine and project complexity.

 

If LabVIEW is already open, this also alleviates the problem.

Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 21 of 26
(1,759 Views)

Matt, I am using version 2.1 of the CLI tool (at least, that's what the NI Package Manager says it is) and it doesn't seem to recognise a --timeout parameter.

 

Do you definitely mean --timeout, with two dashes and a lower-case 't'? This seems inconsistent with the other command line parameters.

0 Kudos
Message 22 of 26
(1,478 Views)

The ini file is located where Bas says, I think "union" is a typo. This is what it looks like by default (LabVIEW 2019). I always get the -350000 error with these settings.

 

[LabVIEWCLI]
DefaultPortNumber = 3363
AppendToLogFile = FALSE
AppExitTimeout = 10000
DefaultLabVIEWPath = ""
OpenAppReferenceTimeoutInSecond = 3.000000
AfterLaunchOpenAppReferenceTimeoutInSecond = 20.000000
DeleteLabVIEWCLILogFile = FALSE
UDCInstallID = ""
PingDelay = -1
PingTimeout = 10000

 

It's not clear to me what the two timeout values do, "OpenAppReferenceTimeoutInSecond" seems to wait that long before the LabVIEW window even opens, but adding 10 seconds to either of the timeout values fixes it for me. 

0 Kudos
Message 23 of 26
(1,459 Views)

@EricRCan you elaborate on AppExitTimeout?

 

In my case, I run CLI with -OperationName CloseLabVIEW and then LV starts compiling a pretty big project before closing (as I expect). During compilation CLI returns:

Error code : -350005
Error message : LabVIEW CLI: (Hex 0xFFFAA8CB) The CLI for LabVIEW failed to close LabVIEW. Ensure LabVIEW does not hang.

 

It would seem that increasing AppExitTimeout should solve the problem, but it doesn't. Any suggestions?

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 24 of 26
(1,278 Views)

@bienieck that is a different error code (-350005 instead of -350000) and a different error message, occurring at the end of a successful CLI run rather than the start so is unlikely to be anything to do with timeout starting the LabVIEW server. You might do better to start a new thread.

0 Kudos
Message 25 of 26
(1,251 Views)

NI's CLI configuration file is in ...National Instruments\Shared\LabVIEW CLI\LabVIEWCLI.ini

0 Kudos
Message 26 of 26
(644 Views)