Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Open FPGA VI Reference Function

LabVIEW 2013 FPGA Module Help

Edition Date: June 2013

Part Number: 371599J-01

»View Product Info

Owning Palette: FPGA Interface VIs and Functions

Requires: FPGA Interface

Opens a reference to the FPGA VI or bitfile and FPGA target you specify. Right-click the Open FPGA VI Reference function and select Configure Open FPGA VI Reference from the shortcut menu to display the Configure Open FPGA VI Reference dialog box.

You must open a reference to the FPGA target before you can communicate between the host VI and the FPGA VI. You can download and run only one FPGA VI at a time on a single FPGA target. If you attempt to download a second VI to the FPGA target while the first FPGA VI is still in use, LabVIEW reports an error and the download fails.

Note  You can use the Open FPGA VI Reference function to interface with an FPGA bitfile even if you do not have the FPGA Module installed.

Details  

resource name specifies the FPGA target on which you want to run the FPGA VI. LabVIEW automatically might determine the FPGA target on which the FPGA VI runs based on the information in the project, depending on the FPGA target. The data type of the resource name input varies by FPGA target.
Note  You must compile the FPGA VI before the Open FPGA VI Reference function can download or run the VI on the FPGA target.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
FPGA VI Reference Out returns a reference to an FPGA VI. You can bind the FPGA VI Reference Out parameter to type definitions so that LabVIEW automatically propagates configuration changes to subsequent subVIs in the data flow.
error out contains error information. This output provides standard error out functionality.

Open FPGA VI Reference Details

Use the Open FPGA VI Reference function to do the following:

Task Details
Select the FPGA VI or bitfile with which the host VI communicates. To determine the VI that the Open FPGA VI Reference function opens, drag the FPGA VI from the Project Explorer window onto the Open FPGA VI Reference function. You also can right-click the Open FPGA VI Reference function, select Configure Open FPGA VI Reference from the shortcut menu, and specify an FPGA VI or bitfile.
Note  You cannot open a reference to an FPGA VI if you do not have the LabVIEW FPGA Module installed. However, you can open a reference to a bitfile.

If you double-click an Open FPGA VI Reference function that is not yet configured for an FPGA VI, the function displays the Configure Open FPGA VI Reference dialog box. If you double-click an Open FPGA VI Reference function that is configured for an FPGA VI, the function opens the front panel of the FPGA VI.

If you want to open references to different FPGA VIs or bitfiles on one target, open only one reference at a time and close the reference before opening another. You can have more than one FPGA VI reference simultaneously open on a target, as long as all the references correspond to the same FPGA VI or bitfile on the same target.
Select the open behavior. By default for some FPGA targets, this function opens and runs the compiled FPGA VI on the FPGA target if the FPGA VI is not already running. To open a reference to the FPGA VI without running it, remove the checkmark from the Run the FPGA VI checkbox in the Configure Open FPGA VI Reference dialog box. You then can run the FPGA VI using the Invoke Method function.

Some targets do not allow you to run the FPGA VI when you open it. On some FPGA targets, you can run an FPGA VI automatically when you load the FPGA VI to the FPGA target. You can always run the FPGA VI from the host VI using the Invoke Method function.
Determine where the FPGA VI executes. The text underneath the icon for the Open FPGA VI Reference function indicates where the FPGA VI executes. You can change where the FPGA VI executes by right-clicking the FPGA target and selecting an option from the Execute VI on shortcut menu. You also can use the Debugging Properties page of the FPGA Target Properties dialog box to specify where the FPGA VI executes.

You can use the Open FPGA VI Reference function when the FPGA target is configured to execute on the FPGA target or the development computer with simulated I/O. If you use this function when the FPGA target is configured to execute on the development computer with real I/O, LabVIEW returns a run-time error.

Place and wire a Close FPGA VI Reference function for every Open FPGA VI Reference function in a host VI. When the Open FPGA VI Reference function first executes on the block diagram, the function checks whether the compiled FPGA VI already exists on the FPGA target. If the compiled FPGA VI is not on the FPGA target, the Open FPGA VI Reference function downloads the compiled FPGA VI to the FPGA target. If you place a checkmark in the Run the FPGA VI checkbox in the Configure Open FPGA VI Reference dialog box, the FPGA VI starts running if it is not already running.

The Open FPGA VI Reference function does not affect the FPGA VI if the FPGA VI is already downloaded and running. If you want to restart the FPGA VI, you can use the Invoke Method function to abort or reset the FPGA VI and use the Invoke Method function to run the FPGA VI again.

Note  The Open FPGA VI Reference function extracts the bitstream associated with the compiled FPGA VI or bitfile and stores the bitstream when you save the host VI. The bitstream contains the programming instructions LabVIEW downloads to the FPGA target.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit