Complete the following steps to pass a control reference to a subVI and use it to modify properties or methods of the referenced control or indicator.
On the front panel of the main VI, right-click the control or indicator to which you want to create a reference and select Create»Reference from the shortcut menu. A strictly typed control reference for the object appears on the block diagram.
You also can create a control refnum by selecting Controls»Refnum»Control Refnum and placing an object of the same type as the referenced object on the control refnum shell on the front panel. To display the control refnum on the front panel as its referenced object, right-click the refnum and select Show Control from the shortcut menu. To revert back to the icon, right-click the refnum and select Show Icon from the shortcut menu.
Open the subVI, or create a new VI, to which you are passing the control reference. From the block diagram of the main VI, drag the control reference to the front panel of the subVI to create a control refnum for the control reference on the subVI front panel and a corresponding control refnum terminal on the subVI block diagram.
Note If you drag the control reference to the block diagram, you only copy the control and control reference rather than create a control refnum.
Complete the following steps to modify properties or methods of the front panel object associated with the control reference by creating a Property Node or Invoke Node.
Right-click the control refnum on the block diagram of the main VI.
Select Create»Property or Create»Method and select a property or method from the shortcut menus.
Click to place the node on the block diagram of the subVI.
Wire the control refnum to the reference terminal of the Property Node or Invoke Node. The Property Node or Invoke Node references the control in the main VI.
You also can select a Property Node or Invoke Node located on the Functions»Application Control palette and place it on the block diagram. Right-click the node and select a property or method from the Properties or Methods shortcut menus.