LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate cRIO's Real-Time modules' variables.xml file without deploying to target

Hi,

 

My company is working on an automated build/deploy solution for updating our hundred of cRIO's with new executables. Essentially, the plan is as follows:

  1. Use Azure Pipelines and LabVIEW CLI to build different targets within the project.
  2. Store these build executables (including the startup.rtexe) in the cloud.
  3. A server on the same local network as the cRIO will pull the files down from cloud storage, FTP the startup.rtexe file to the cRIO then reboots it.

Note: At our current scale (and due to our cRIO's not being on the same networks as dev computers), deploying directly from LabVIEW project for each deployment is not feasible for us! We currently must copy executables or use the NI RAD tool to retrieve/deploy images.

 

The process described above is already prototyped and working - I am not looking for advice on the above, just explaining for context... However, there is one small issue which is bothering me!

 

Our cRIOs use Real-Time scan mode - and I recently discovered that if you rename real-time variables on the target in the LabVIEW project, these variables are not stored in the startup.rtexe file as part of the build. Instead they are generated when you hit the "deploy" button, and then stored directly on the cRIO in /var/local/natinst/deployfwk/config/variables.xml.

 

I know I could potentially write a script that converts the .lvproj file into the variables.xml and incorporate it into the automated build/release pipeline, however that will take a lot of guesswork as much of the .lvproj structure and variables.xml file structure is undocumented as far as I know.

 

I was wondering if anyone knows an alternative/easier method to generating this variables.xml file, such that I can use it in my pipeline? Maybe there is already an executable or vi I can call which does this (as it must get called during the deploy!)

 

Thanks!

Patrick

0 Kudos
Message 1 of 6
(1,287 Views)

What you're asking for is basicall what "deploy to target" does when you right click any real-time resources and select deploy while in the LV project.

 

The simple solution:

 

Build and deploy to a local target, test to make sure there are no errors, then ftp into your local target and grab everything in /var/local/natinst/deployfwk/ 

 

When you FTP the updated startuprt to the targets, also ftp those files over and overwrite the old ones.

 

What model Rios are you using?  Systemlink makes remote updating of multiple systems like this really easy.

 

Hope this is helpful!

0 Kudos
Message 2 of 6
(1,241 Views)

Sure, I could do it manually during testing - I was more curious to see if there was a way to do it automatically so I could integrate it into my Azure Pipeline. Ideally I want to generate the files without needing to connect to a target!

0 Kudos
Message 3 of 6
(1,223 Views)

Using a range of cRIOs: 9036, 9038, 9041.
Thinking maybe I could connect one of each type to my LabVIEW build PC and use Labview CLI to deploy? Although I'm not sure you can programmatically deploy with LabVIEW CLI?

0 Kudos
Message 4 of 6
(1,220 Views)

So Linux-RT targets.  

 

Deploy the variables once to each target type in the IDE.

 

Sftp everything in /var/local/natinst/deployfwk/ back to your local computer in an autopopulating folder with the same hierarchy as it was on the rio in your project.

 

Make a new build spec for package.

 

Use the files from deployfwk as the source files and maintain folder hierarchy to the destination.

 

Build packages (.ipk).

 

Find a way to distribute packages along with startuprt (which can also be a package).  

 

Programattically install the packages. (opkg install /path to package/)

 

Voila

0 Kudos
Message 5 of 6
(1,213 Views)

@WTangoF wrote:

Deploy the variables once to each target type in the IDE.


This is the step I would like to automate without requiring me to manually deploy from the IDE. Is it possible from LabVIEW CLI? Or even some other LabVIEW tool or VI?

0 Kudos
Message 6 of 6
(1,202 Views)