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.
Note The property folder cannot contain more than two VIs. |
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.
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.