Use a LabVIEW project to manage FPGA VIs and targets. Complete the following steps to create an FPGA target and set the FPGA LED in the NI-9145 using the FPGA VI.
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.
  1. Create an empty project in LabVIEW.
  2. Add the real-time controller to the project.
  3. Right-click the controller item and select New » Targets and Devices to display the Add Targets and Devices dialog box.
  4. Select Existing Target or Device and expand the EtherCAT Master Device category to discover the available EtherCAT Ethernet adapters.
  5. Select an available EtherCAT Ethernet adapter and click OK.
    LabVIEW automatically adds the NI-9145 item and all modules to the project.
  6. Right-click the slave device item and select New » FPGA Target to create a new FPGA target under the NI-9145 item.
  7. 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.
  8. Right-click the FPGA target item and select New » VI.
    LabVIEW adds a VI under the FPGA target item.
  9. Double-click to open the new VI.
  10. 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.