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

Calling VIs Dynamically Using the Call by Reference Node

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Create a strictly typed VI reference to dynamically call a VI using the Call by Reference Node. The strictly typed VI refnum identifies the connector pane of the VI you are calling.

Complete the following steps to create a strictly typed VI reference to use with the Call By Reference Node.

  1. Place the Open VI Reference function on the block diagram.
  2. Wire the path to the VI you want to use to create the strictly typed reference to the vi path input of the Open VI Reference function.
  3. Right-click the type specifier VI Refnum input of the Open VI Reference function and select Create»Constant from the shortcut menu.
  4. Right-click the type specifier VI Refnum constant, select Select VI Server Class»Browse, and select a VI in the file dialog box that appears. You also can select the VI icon in the upper right corner of a front panel window or block diagram window and drag the icon to the type specifier VI Refnum constant. After you select a VI, a black circle with a slash indicating that the reference is strictly typed appears in the upper left corner of the reference.
Note  The connector pane of the VI you select must match the connector pane of the VI whose path you wired to the vi path input of the Open VI Reference function. It can be the same VI whose path you wired.
  1. Place the Call by Reference Node on the block diagram.
  2. Wire the vi reference output of the Open VI Reference function to the reference input of the Call By Reference Node.
  3. Place the Close Reference function on the block diagram.
  4. Wire the type specifier VI Refnum output of the Call By Reference Node to the reference input of the Close Reference function.
  5. Wire all error in and error out terminals on the block diagram.

Resources


 

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