Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Calling an FPGA VI as a SubVI in a Host VI (FPGA Interface)

LabVIEW FPGA Module 8.2 Help
August 2006

NI Part Number:
371599B-01

»View Product Info

You can use a compiled FPGA VI or bitfile as a subVI in a host VI with the Call VI function. Some FPGA targets might not support the Call VI function. Refer to the specific FPGA target hardware documentation for information about support for the Call VI function.

Complete the following steps to use an FPGA VI as a subVI.

  1. Create a new project or open an existing project.
    Note  You can use an FPGA VI in the Call VI function if the host VI, the FPGA target, and the FPGA VI are in the same LabVIEW project.
  2. Create a new host VI or open an existing host VI from the project. The VI must be under My Computer or an RT target in the Project Explorer window.
  3. Place a Call VI function on the block diagram of the host VI.

  4. Right-click the Call VI function and select Select VI from the shortcut menu. The Select VI dialog box appears and displays the project in which the host VI resides.
  5. Select an FPGA VI that appears under an FPGA target in the Select VI dialog box.
  6. Click the OK button. The VI icon appears in the Call VI function.
  7. Complete the following steps to specify an FPGA target on which to run the FPGA VI if the FPGA target in the project is not associated with a physical target. If the FPGA target is associated with a physical target in the project, proceed to step 8.
    1. Right-click the Call VI function and select Select Address from the shortcut menu. The Select Board dialog box appears.
    2. Select a specific FPGA target from the list of names in the Select Board dialog box.
    3. Click the OK button.
  8. Wire the FPGA subVI as you do a standard subVI. You also can wire the error in and error out parameters for error handling in the host VI.

Using a Bitfile as a SubVI

Complete the following steps to use a bitfile as a subVI.

  1. Create a new host VI or open an existing host VI from a project. The host VI does not need to be in a project if you use a bitfile as a subVI.
  2. Place a Call VI function on the block diagram of the host VI.

  3. Right-click the Call VI function and select Select Bitfile from the shortcut menu. The Select Bitfile dialog box appears.
  4. Navigate to the bitfile you want to open on an FPGA target.
  5. Click the OK button. The VI icon appears in the Call VI function.
  6. Right-click the Call VI function and select Select Address from the shortcut menu. The Select Board dialog box appears.
  7. Select a specific FPGA target from the list of names in the Select Board dialog box.
  8. Click the OK button.

Determining the FPGA VI or Bitfile Called Programmatically

Complete the following steps to programmatically determine the FPGA VI or bitfile you call in the Call VI function.

  1. Right-click the Call VI function and select FPGA VI Reference Input from the shortcut menu.
  2. Wire the FPGA VI Reference In parameter of the Call VI function to an FPGA VI Reference Out parameter on any other FPGA Interface function, such as the Open FPGA VI Reference function. LabVIEW passes the FPGA VI reference information into the Call VI function and the VI icon appears in the Call VI function. You can wire the FPGA subVI as you do a standard subVI. You also can wire the error in and error out parameters for error handling in the host VI.

To programmatically switch between multiple FPGA VIs to call, you must also use the Up Cast function.


Resources


 

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