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

Creating XControl Properties

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

XControl properties allow the user of an XControl to configure the XControl programmatically. The user of an XControl uses a Property Node to get and set XControl properties. LabVIEW calls the Facade VI after the user gets or sets a custom XControl property. If using the property 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 property is represented by one or more VIs, depending on if the property is read-only, write-only, or read/write. Each VI represents the read or write functionality of the property.

Complete the following steps to add a property to an XControl library.

  1. Right-click the XControl library and select New»Property from the shortcut menu to display the Create Property dialog box. Use this dialog box to add a property to the XControl library.

    LabVIEW creates a folder with the same name as the property in the XControl library. If you create a read/write property, the property folder contains a VI for reading from the property and a VI for writing to the property. If you create a read-only or write-only property, the property folder contains only one VI for reading from or writing to the property, respectively.
Note  The property folder cannot contain more than two VIs.
  1. To edit the property, double-click each VI in the property folder to open the VI that represents read or write functionality of the property.

Editing the Read VI

The read VI represents the read functionality of an XControl property. The read VI includes display state and container state controls and display state, value, and error indicators. Do not delete or change any of these controls or indicators because LabVIEW uses them to pass in display state and container state to the property and retrieve any error information. By default, the read VI also includes an LED indicator for the value. Replace the LED indicator with an indicator of the appropriate data type to configure the type of data that the property reads.

Note  If the XControl property is read/write, the data type of the Value indicator of the read VI must match the data type of the Value control of the write VI.

To delete the VI, right-click the VI and select Remove from Project. Right-click the property folder and select New»Read VI to add a read VI to a write-only property.

Editing the Write VI

The write VI is similar to the read VI. It includes the same display state, container state, and error controls and indicators as the read VI. Do not delete or change any of these controls or indicators because LabVIEW uses them to pass in display state and container state to the property and retrieve any error information and the updated display state. By default, the write VI includes an LED control for the value. Replace the LED control with a control of the appropriate data type to configure the type of data the property writes.

Note  If the XControl property is read/write, the data type of the Value indicator of the read VI must match the data type of the Value control of the write VI.

To delete the VI, right-click the VI and select Remove from Project. Right-click the property folder and select New»Write VI to add a write VI to a read-only property.


 

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