Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Creating Code that Executes Only under Specific Hardware Configurations

NI InsightCM™ SDK Help

Edition Date: July 2017

Part Number: 375191C-01

»View Product Info
Download Help (Windows Only)

The FPGA Bitfile Manager process provides an example of using Conditional Disable structures and custom conditional disable symbols to execute specific code snippets based upon types and configurations of hardware. This implementation allows the process to be hardware-agnostic. For example, this process executes the following code to download the appropriate bitfile by checking first whether it acquires waveforms, and then checking the type of FPGA in the chassis.

If the FPGA type has a different model number, a separate subdiagram that corresponds to that number and calls the appropriate bitfile would run.

Defining Conditional Symbols for Your Device Code

Define the device-specific values of the WfmAcq and FPGA_Type symbols in the LabVIEW project that contains Main.vi. Recall that each device type has a unique LabVIEW project, so conditional symbol values can differ per project, and this process executes the correct snippet instead of requiring a unique VI per project.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit