Table Of Contents

Controlling Panel Objects Programmatically

Version:
    Last Modified: February 27, 2020

    Control a panel object, such as a control, indicator, or the panel itself, by creating a control reference to the object. Control references are either strictly typed or general. Use control references with the Panel Manipulation nodes to control panel objects programmatically.

    spd-note-note
    Note  

    The Chart class does not support the Value property whether strictly typed or general.

    Learn More

    For more information on using control references, see the Control References example in software.

    Strictly Typed Control References

    Strictly typed control references include data type information and accept only references of the same data type. For example, if a subVI accepts a strictly typed control reference that contains a 32-bit integer data type, you can wire only a reference that also contains a 32-bit integer data type to the subVI.

    Complete the following steps to create a strictly typed control reference:
    1. Place a control or indicator on the panel.
    2. Right-click a panel object and select Create reference.
    3. On the diagram, place the Static Control Reference of the panel object from the Unplaced Items tray and right-click the reference to create a control, indicator, or constant.

    General Control References

    General control references are flexible in the type of data they accept. For example, if a subVI accepts a general slide reference, you can wire a reference to a 32-bit integer slide, single-precision slide, or a cluster of 32-bit integer slides to the slide reference terminal of the subVI.

    The Behavior section on the Item tab displays the following statement if a control reference is general:
    Reference does not include value data type
    spd-note-note
    Note  

    The Value property is not available on general control references.

    Complete the following steps to create a general control reference:
    1. Place a Control Reference on the panel.
    2. On the diagram, place the Control Reference from the Unplaced Items tray and click the Select reference type button next to the Reference type option on the Item tab to select a type.

    Recently Viewed Topics