Example Code

Programmatically Download Bitfile to multiple CompactRIO FPGA targets

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW FPGA Module
  • LabVIEW

Code and Documents

Attachment

Description

Overview

This example demonstrates how to programmatically download a bitfile to multiple Compact RIO targets.

 

Description

It is possible to programmatically automate the process of downloading FPGA bitfiles to the flash by using the System Configuration API. The next LabVIEW VI is an example that shows how to automate the process of downloading the same bitfile to several CompactRIO targets which are referenced through their IP Addresses.
If you would like your FPGA application to run automatically at boot, please also ensure that the source VI was compiled with the Run when loaded to FPGA property set. For more details please refer to the KnowledgeBase 4P7IJ4MO: How Can I Have My FPGA VI Run At Boot?
In all the cases the FPGA targets where the bitfile is being downloaded have to be the same since the compiled bitfile is hardware specific. The corresponding drivers for the hardware being used must also be installed on the local computer for these examples to work. The LabVIEW FPGA module is not needed. The VI can also be compiled into an executable and run with only LabVIEW Runtime and CompactRIO Runtime installed.
Note: The Replication and Deployment (RAD) Utility is a turn-key utility for automating deployment and replication of Real-Time images and FPGA bitfiles. For more information, please check this document.

 

Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)
  • NI System Configuration 5.3.3 (or compatible)

 Hardware

  • Real-Time target(s) (e.g. cRIO 9024 or compatible)

 

Steps to Implement or Execute Code

  1. Download and open the attached file "Programmatically download Bitfile to cRIO LV2012 NIVerified.vi"
  2. Open VI and follow the instructions in Front Panel and Block Diagram and run the program.

 

Additional Information or References

Programmatically download Bitfile to cRIO LV2012 NIVerified.vi - Front Panel.png

 

Programmatically download Bitfile to cRIO LV2012 NIVerified.vi - Block Diagram.png

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.