How Can I Have My LabVIEW FPGA Code Run At Boot?

Updated Oct 3, 2018

Reported In

Hardware

  • CompactRIO Chassis
  • CompactRIO Chassis (Legacy)
  • PXI FPGA Module for FlexRIO
  • PXI Multifunction Reconfigurable I/O Module
  • PXI High-Speed Serial Instrument

Software

  • LabVIEW FPGA Module
  • LabVIEW Full
  • LabVIEW Professional

Issue Details

I would like to have my standalone LabVIEW FPGA code start running when I power on my device. How can I deploy my FPGA VI to an FPGA target and have it run at boot time?

Solution

  1. Ensure that you have an FPGA VI that is appropriate to run without a host VI. An appropriate VI does not require any input from the host machine through the front panel. Often, the VI will have no front panel objects at all, and will simply take physical inputs and formulate appropriate outputs. There is usually no user interaction with such a VI.
  2. Make sure that the Run when loaded to FPGA property is checked. The location of this property differs depending on the version of LabVIEW you are using:
    • LabVIEW 2010 and later
      1. Create a Compilation in your FPGA project by right-clicking on the Build Specifications item and selecting New»Compilation
      2. Then right-click on the new compilation specification and select Properties. The Run when loaded to FPGA property can be enabled in this properties dialog.
    • LabVIEW 2009 and earlier
      The Run when loaded to FPGA property is located in the properties of the FPGA Target itself. To access this property dialog, right-click on the FPGA Target and select Properties.
  3. After this property is enabled, compile the VI.
  4. Open the RIO Device Setup utility located at Start » All Programs » National Instruments » RIO Device Setup.
  5. In the Device Settings tab, choose either Autoload VI on device powerup or Autoload VI on device reboot and apply the settings.

    Note: On Linux Real-Time targets, the Device Settings tab is not available. The default behavior of a bitfile stored on flash for these targets is to autoload on both powerup and reboot.
  6. Click the Download Bitfile to Flash tab and select your compiled VI’s bitfile. By default, this will be located in the same folder as your project. In LabVIEW 2010 and later, you can easily change the bitfile location in the build specifications referenced above. For further details on downloading your bitfile to the target without LabVIEW FPGA, view How Do I Download a Bitfile to My Target Without LabVIEW FPGA?

WAS THIS ARTICLE HELPFUL?

Not Helpful