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

Creating XControl Methods

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

XControl methods allow the user of an XControl to configure the XControl programmatically. The user of an XControl uses an Invoke Node to invoke XControl methods. LabVIEW calls the Facade VI after the user invokes a custom XControl method. If invoking the method changes the display state, the Facade VI updates the display state so that the XControl can update its appearance. A Display State Change event is generated on the Facade VI in this case.

In the XControl library, each XControl method is represented by a VI.

Complete the following steps to add a method to the XControl library.

  1. Right-click the XControl library and select New»Method from the shortcut menu to add a new method to the XControl library. LabVIEW creates a new method in the XControl library.
  2. Double-click the method in the XControl library to add the controls and indicators that represent the parameters of the method.

Editing the Method VI

The method VI represents an XControl method. The method VI includes a display state control and display state, container state, and error indicators. Do not delete or change any of these controls or indicators because LabVIEW uses them to pass in display state to the method and retrieve any error information.

Add controls or indicators to represent the parameters of the method. Parameters can be input, output, or input/output parameters. Each control or indicator that you add to the VI can be part of only one parameter. LabVIEW uses the name of the control or indicator as the name of the parameter.

Note  If the parameter is an input/output parameter, you must use a control/indicator pair to represent the parameter. The control/indicator pair must be of the same data type.

Wire the controls or indicators to the connector pane. Right-click the method and select Configure Method from the shortcut menu to display the Configure Method dialog box. Use this dialog box to configure the parameters you added to the method.

To delete the VI, right-click the VI and select Remove from Project.


 

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