Creating XControls

Use XControls to design and create complex controls and indicators in LabVIEW.

Note  You can create and edit XControls only in the LabVIEW Professional Development System. If a VI contains an XControl, you can run the VI in all LabVIEW packages.

Complete the following steps to create an XControl:

  1. Open the project in which you want to use an XControl. You can create a new project to display the Project Explorer window.
  2. In the Project Explorer window, right-click My Computer and select New»XControl from the shortcut menu. LabVIEW creates a new XControl library in the project. Within the XControl library, LabVIEW automatically creates required abilities.
Tip  You also can use the XControl template in the New dialog box to create an XControl.
  1. Double-click the Data ability in the XControl library to open and edit the Data type definition. Replace the numeric control with a control that represents the data type of the new XControl. Select File»Apply Changes to propagate the change in the Data ability.
  2. Double-click the State ability in the XControl library to open and edit the State type definition. Include any information that affects the appearance or state of the XControl as part of the cluster control. Select File»Apply Changes to propagate the change in the State ability.
  3. Double-click the Facade ability in the XControl library to open and edit the Facade VI.
  4. Right-click the XControl library and select Properties from the shortcut menu to display the XControl Properties dialog box. Use this dialog box to configure the XControl library, document the XControl, and configure settings for the abilities, properties, methods, and VIs of an XControl.
  5. Right-click the XControl library and select Save from the shortcut menu to save the XControl.

You also can add optional abilities, properties, methods, and VIs to the XControl library. Right-click the XControl library and select New from the shortcut menu to add an item to the XControl library.

Refer to Simple Dual Mode Thermometer XControl.lvproj in the labview\examples\Controls and Indicators\XControls\Dual Mode Thermometer directory for an example of creating an XControl.

 Open example  Find related examples