You can communicate with FPGA VIs or bitfiles running on FPGA targets using host VIs. Host VIs can run on PCs or RT targets. Each host VI must open a reference to the FPGA VI or bitfile that runs on the FPGA target. You can open a reference to an FPGA VI in the same LabVIEW project as the host VI, or you can open a reference to a compiled bitfile.
 |
Tip To make host VI development faster, keep the FPGA VI in memory. |
Complete the following steps to open a reference to an FPGA VI in a host VI. You can open a reference to an FPGA VI if the host VI, the FPGA target, and the FPGA VI are in the same project. You cannot open a reference to an FPGA VI if you do not have the LabVIEW FPGA Module installed.
- Create a new project or open an existing project.
- Add an FPGA target to the project or verify the FPGA target appears in the Project Explorer window.
- Create a new FPGA VI or verify the FPGA VI to which you want to open a reference appears in the Project Explorer window under the FPGA target.
- Create a new host VI or open an existing host VI in the project. The host VI must be under My Computer or an RT target in the Project Explorer window.
- Place an Open FPGA VI Reference function on the block diagram.
- Right-click the Open FPGA VI Reference function and select Select VI from the shortcut menu. The Select VI dialog box appears and displays the FPGA VI(s) and its parents in the project in which the host VI is located.
- Select an FPGA VI under an FPGA target in the Select VI dialog box.
- Click the OK button. The FPGA VI icon appears in the Open FPGA VI Reference function. If the FPGA target in the project is associated with a physical target, the target name or IP address appears under the Open FPGA VI Reference function.
- If the FPGA target in the project is not associated with a physical target, you must specify an FPGA target on which to run the FPGA VI. Some FPGA targets require you to specify the FPGA target programmatically. If the FPGA target you use does not require you to specify the FPGA target programmatically, you also can complete the following steps to specify the FPGA target.
- Right-click the Open FPGA VI Reference function and select Select Address from the shortcut menu. The Select Board dialog box appears.
- Select a specific FPGA target from the list of names in the Select Board dialog box.
- Click the OK button.
 |
Note You must place and wire a Close FPGA VI Reference function for every Open FPGA VI Reference function in a host VI.
|
 |
Caution Open only one reference to an FPGA VI or a bitfile on one FPGA target at a time, and close one reference before opening another. Opening multiple references to FPGA VIs or bitfiles on the same physical target might cause erroneous behavior without any error messages.
|
Complete the following steps to open a reference to a bitfile in a host VI. The host VI does not need to be in a project.
- Create a new host VI or open an existing host VI. If the host VI is in a project, the host VI must be under My Computer or an RT target in the Project Explorer window.
- Place an Open FPGA VI Reference function on the block diagram.
- Right-click the Open FPGA VI Reference function and select Select Bitfile from the shortcut menu to open a reference to a compiled bitfile. The Select Bitfile dialog box appears.
- Navigate to the bitfile you want to open on an FPGA target.
- Click the OK button. The FPGA VI icon appears in the Open FGPA VI Reference function. A folder icon appears in the upper left corner of the Open FPGA VI Reference function to denote the bitfile.
- Specify an FPGA target on which to run the FPGA VI. Some FPGA targets require you to specify the FPGA target programmatically. If the FPGA target you use does not require you to specify the FPGA target programmatically, you also can complete the following steps to specify the FPGA target.
- Right-click the Open FPGA VI Reference function and select Select Address from the shortcut menu. The Select Board dialog box appears.
- Select a specific FPGA target from the list of names in the Select Board dialog box.
- Click the OK button.
 |
Note You must place and wire a Close FPGA VI Reference function for every Open FPGA VI Reference function in a host VI.
|
 |
Caution Open only one reference to an FPGA VI or a bitfile on one FPGA target at a time, and close one reference before opening another. Opening multiple references to FPGA VIs or bitfiles on the same physical target might cause erroneous behavior without any error messages.
|
You can programmatically determine the physical FPGA target on which the FPGA VI opens if the FPGA target supports the Show Resource Input option. Some FPGA targets support only the Show Resource Input option. If the Show Resource Input option appears in the shortcut menu by default, you must programmatically determine the FPGA target. If you must programmatically determine the FPGA target, complete only step 2.
Complete the following steps to programmatically determine the FPGA target.
- Right-click the Open FPGA VI Reference function and select Show Resource Input from the shortcut menu.
- Wire the new resource name input.
Accessing Remote FPGA Targets in the Open FPGA VI Reference Function
The Select Address option for the Open FPGA VI Reference function, which appears when you right-click the Open FPGA VI Reference function and select Select Address from the shortcut menu, displays only local devices. You can access remote FPGA targets by configuring the FPGA target to be recognized as a local device. Some targets may not support remote access. Refer to the specific FPGA target hardware documentation for information about support for remote access of FPGA targets.
Complete the following steps to configure a remote FPGA target to be recognized as a local device so that you can access it from the Open FPGA VI Reference function.
- Launch NI Measurement & Automation Explorer (MAX).
- Select My System»Software»NI-VISA.
- Click the VISA Options tab.
- Expand the General Settings category in the left pane and select Remote.
- Place a checkmark next to the remote system that your device is installed in and click the Save button.