Using the Scan Interface with Individual Modules
- Updated2025-04-03
- 4 minute(s) read
You may be able to use the Scan Interface for supported individual modules even if the chassis you are using is in FPGA Interface programming mode or does not support Scan Interface programming mode. First you must let LabVIEW discover the modules in the chassis and download a compiled bitfile to the chassis. Using modules that require the high-speed interface, such as the NI 951x, may also require a downloaded compiled bitfile. You must have the LabVIEW FPGA module installed to compile bitfiles for the FPGA.
After setting up your project, discovering modules, and downloading the bitfile to the chassis, use modules under the FPGA target in FPGA Interface programming mode and use modules under the Real-Time Scan Resources item in Scan Interface programming mode.
Creating the LabVIEW Project
Complete the following steps to set up the LabVIEW project:
- Configure the system.
- Drag and drop the C Series module(s) that will run in Scan Interface mode under the Real-Time Scan Resources item. Leave any modules you plan to write FPGA code for under the FPGA target.
The LabVIEW Project Explorer window should look similar to the following figure:
- Module in Scan Interface Programming Mode
- Module in FPGA Interface Programming Mode
Downloading the Bitfile
Complete the following steps to compile a bitfile and download it to the chassis:
- Create a new VI under the FPGA target and save it with your project files. You will use this FPGA VI from an RT VI to download the module bitfile to the chassis.
- Right-click the FPGA VI and select Create Build Specification from the shortcut menu. Under Build Specifications, right-click the new build specification for the example FPGA VI, select Build, and wait for the build to complete.
- Create a new VI under the RT target and save it with your Project files.
- Add an Open FPGA VI Reference function to the block diagram of the new RT VI.
- Right-click the Open FPGA VI Reference function and select Configure Open FPGA VI Reference from the shortcut menu to open the Configure Open FPGA VI Reference dialog box.
- Select the FPGA VI you created in step 1, make sure that the Run the FPGA VI checkbox is enabled, and click OK to close the dialog box.
- Place the code you want to run in the RT VI on the block diagram to the right of the Open FPGA VI Reference function. Enclose the code in a structure such as a Timed Loop or While Loop.
- Add a Close FPGA VI Reference function to the block diagram to the right of the structure enclosing the code.
- Connect the Open FPGA VI Reference function to the Close FPGA VI Reference function through the structure that encloses the code.
- Run the RT VI.
The LabVIEW Project Explorer window should look similar to the following figure:
- Module in Scan Interface Mode
- Module in FPGA Interface Mode
- FPGA VI to Download Bitfile
- RT VI to Download Bitfile
Related Information
- Synchronizing FPGA VIs with the NI Scan Engine (FPGA Interface)
- Configuring a Project
Configure a LabVIEW project with connected hardware or offline hardware.