The LabVIEW Simulation Interface Toolkit ships with bitfiles for many National Instruments R Series Intelligent DAQ devices. These VIs and bitfiles define the analog, digital, and pulse-width modulation (PWM) inputs and outputs of the FPGA device. You use this information to create mappings between a model DLL and one or more FPGA devices. The Simulation Interface Toolkit also ships with a project file you can use with the NI cRIO-9103 chassis.
These default VIs and bitfiles are sufficient for many applications. However, in some situations, you might need to create a custom FPGA VI to use with a simulation. For example, if you want to use additional digital I/O lines, more than two PWM outputs, or digital filtering built into the FPGA, you must create a custom FPGA VI or bitfile. If you are running a simulation on a CompactRIO chassis, you also must create a custom FPGA VI or bitfile, because CompactRIO chassis do not contain any built-in I/O modules. You must install the LabVIEW FPGA Module to create these files.
The following sections provide information about creating a custom FPGA VI and/or bitfile.
![]() |
Note This topic assumes you are using a single FPGA device. You can use more than one FPGA device in a simulation, with one of the R Series devices acting as the master device and any other devices acting as slaves. If you use multiple FPGA devices, you must have a bitfile or FPGA VI for each device. Depending on the architecture of the project, you might not need to use a custom FPGA VI for the slave FPGA devices. If the slave devices also need to use a custom FPGA VI, repeat the steps listed in this tutorial for the custom slave FPGA VIs, but instead of starting with the default master FPGA project files, start with the default slave FPGA project files. |
The first step is to modify a copy of a default FPGA VI. This step is different depending on whether you are using an R Series device or a CompactRIO chassis.
The next step is creating the custom FPGA VI.
The next step is creating the custom FPGA VI.
The process of creating the custom FPGA VI differs depending on the hardware devices you are using. Refer to the FPGA Module documentation for information about creating FPGA VIs and bitfiles for an FPGA device.
The default project defines the following FPGA I/O items for the PXI-7831R device: analog input channels 0–7, analog output channels 0–7, and digital lines 0–31 on both connectors 1 and 2. You can add or remove FPGA I/O items depending on the device and the needs of the simulation. For example, the PXI-7811R device has 160 DIO lines available; however, by default this project defines only the first 32 lines on connectors 1 and 2. You can add more FPGA I/O items to this project if you want to use the additional DIO lines available on the PXI-7811R. Conversely, the PXI-7811R has no analog inputs or outputs, so if you are using this device, you can remove the analog I/O items from the project and the corresponding FPGA I/O Nodes from the FPGA VI.
If you created a new target for an R Series device, you can drag the FPGA I/O folders from the original PXI-7831R (PXI-7831R) target to the new target. The FPGA VI shows broken wires from any FPGA I/O Nodes with undefined channels.
CompactRIO Chassis If you are using the existing cRIO-9103 target, the project defines an NI 9215 module for analog input, an NI 9263 module for analog output, an NI 9411 module for digital input, and an NI 9474 module for digital output. You can delete or modify these modules based on the ones you are using for the simulation. If you need to add modules to the target, or if you created a new target, you can add the necessary modules by right-clicking the target and selecting New»C Series Modules.
![]() |
Note In the sitfpga cRIO master.vi example, the FPGA itself calibrates the analog input and analog output channels of the NI 9215 and NI 9263 modules. The host VI running on the CompactRIO real-time controller typically performs this calibration. For examples of doing channel calibration on the RT host side rather than on the FPGA itself, refer to the NI-RIO shipping examples Analog Input - cRIO.lvproj and Analog Output - cRIO.lvproj. These examples are available by launching LabVIEW and selecting Help»Find Examples. |
![]() |
Note Refer to the National Instruments Web site for information about these devices and modules. |
While you are creating/modifying the FPGA VI, pay attention to the following guidelines to ensure the SIT Connection Manager dialog box recognizes this FPGA VI.
The following figure shows the block diagram of sitfpga master.vi.

When you are finished creating the FPGA VI, select File»Save to save this VI.
The next step is compiling the FPGA VI.
Complete the following steps to compile the custom FPGA VI and create the bitfile.
The next step is using the SIT Connection Manager dialog box to create mappings between the model DLL and the FPGA device.
As you create mappings, you launch the Add FPGA Device dialog box. Use the FPGA Device pull-down list to select the appropriate FPGA device. Then, click the Browse button to specify the custom FPGA bitfile or VI you created. You then can create mappings between the model DLL and the FPGA device using the custom FPGA VI you created.