Creating and Discovering the FPGA Target and Module
- Updated2025-10-10
- 2 minute(s) read
Note The following steps
assume you have a master and NI-9145 connected to the network, and the Scan Mode
personality is loaded on the NI-9145.
- Create an empty project in LabVIEW.
- Add the real-time controller to the project.
- Right-click the controller item and select to display the Add Targets and Devices dialog box.
- Select Existing Target or Device and expand the EtherCAT Master Device category to discover the available EtherCAT Ethernet adapters.
-
Select an available EtherCAT Ethernet adapter and click
OK.
LabVIEW automatically adds the NI-9145 item and all modules to the project.
- Right-click the slave device item and select to create a new FPGA target under the NI-9145 item.
- To use a module in FPGA Mode, drag and drop the module from the NI-9145 item under the FPGA target item. In the Project Explorer window, you can drag and drop modules between the NI-9145 item and the FPGA target item to switch between Scan Mode and FPGA Mode.
-
Right-click the FPGA target item and select .
LabVIEW adds a VI under the FPGA target item.
- Double-click to open the new VI.
-
Drag and drop the I/O (Chassis I/O or Module I/O) from the Project
Explorer on the block diagram. The following figure shows the
block diagram of an FPGA VI that sets the FPGA LEDs.
LabVIEW automatically compiles, downloads, and runs the FPGA VI on the FPGA target when you click the Run button in the FPGA VI. LabVIEW does not download the FPGA VI if the VI already is on the FPGA target.
In the NI-9145, if the FPGA LED blinks at the rate you set in the FPGA VI, LabVIEW has downloaded the VI and the VI is running successfully.
Tip You can force LabVIEW
to download an FPGA bitfile by right-clicking the FPGA bitfile and selecting
Download from the shortcut menu.