LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automate build process on Real Time Target

Hi, 

 What is the command to automate build of labview project on Real Time target through command prompt? I have tried the below command

"Path of LabVIEW.exe" "Path of Programmatic build Command line target.vi" -- "Path of labview project(.lvproj)" "Build Specification Name" "Target Name"

In my case Target Name is "RT PXI Target" and Build Specification Name is "My Real-Time Application".

Hence i gave the command as 

"Path of LabVIEW.exe" "Path of Programmatic build Command line target.vi" -- "Path of labview project(.lvproj)" "My Real-Time Application" "RT PXI Target"

 

But still the vi is taking the Target Name as My Computer and check the Build Specification name in the target "My Computer".

 

Anyone please help me to solve this issue. Whether the command and the argument passed through it is correct? If not, Please tell me what is wrong and tell me the right way to automate the build process on Real Time Target.

0 Kudos
Message 1 of 4
(2,236 Views)

Why are you building through the command prompt?  LabVIEW Project organizes all of this for you, and it is a one-click (well, maybe two) to do the Build.  You can also write a VI to do a programmatic Build, then (I suppose) make this VI an Executable, so when you run it, it calls LabVIEW to do the Build (I just dreamt this up -- I have no idea if it will actually work, and probably wouldn't do it, myself, as Project makes so much more sense to me).

 

Bob Schor

0 Kudos
Message 2 of 4
(2,213 Views)

Hi,

Thanks u so much. Already i have VI to build the project. For this VI, I need to manually give the path of the project, Build Specification name and Target Name. But in my case i need to automate the process instead of giving the inputs manually. I don't know how to pass the above input parameters to the VI?For our client we will be giving either the Batch file or YAML file. If they execute that file, build should happen automatically.

Please help me i need to finish it immediately. It's a bit emergency. Can anyone help me on this?

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

Hi Lincy,

 

So if I'm understanding this correctly, you have a VI in which you use some sort of scripting or the Application Builder API to build a specific Build Specification, which you've already configured in the project explorer.

 

You're using the Application > Command Line Arguments property node to get the arguments you're passing (after the "--"). Based on the command line you gave, I'm guessing that you've configured the VI to run when opened.

 

Have you tried using the command line options available in 2018? A list can be found here (Predefined operations) and if you scroll down you'll find the RunVI operation (which requires a specific connector pane - you might have to add a wrapper to your current builder).

 

The example listed there has a slightly different way to feed arguments: 

LabVIEWCLI -OperationName RunVI -VIPath <VI path> <first element of array> <second element of array>

Alternately, you could use the Wiresmith CLI functionality (now renamed to G-CLI) available from GitHub. If you go to the Releases tab you can download a VIPM package for this and install it in whichever version of LabVIEW you are using (since perhaps 2014?).

 

The G-CLI uses the "--" format to specify command line arguments, but have a specific API which is installed to the palettes with the VIPM package to parse these. The GitHub page has some basic examples, and if you want to do this, we can discuss it more here.

 

When I tried running directly LabVIEW and the VI path as you described, I was able to get the VI to run (via Run When Opened) but I couldn't get any arguments to pass - I got "LabVIEW" as the first argument (i.e. element 0) but this is what occurs when just running the VI (not from command line). I think this is mostly designed for code built into an EXE. Assuming that you don't want to do this for your builder (which might require functionality not available in the RunTime engine) you should instead consider one of the other alternatives.

 

When you describe the arguments you are receiving, are these default values for an Enum or similar? Or are they non-default values being incorrectly parsed?

 

As a side note (and shameless plug) I'm going to be presenting on using GNU Make and SCons to build PPLs via command line on multiple targets (cRIO, Windows) at NI Week this year. Please feel free to come and discuss this with me if you're attending and found any of this helpful (although at NI Week there are plenty of more helpful people to talk to on any given topic)


GCentral
0 Kudos
Message 4 of 4
(2,184 Views)