How Do I Add References to a LabVIEW Cluster Constant?

Updated May 22, 2023

Reported In

Software

  • LabVIEW

Issue Details

  • I am using references in my LabVIEW program and I would like to add these references to a cluster constant. How can I do this?
  • I am trying to add a reference to my cluster constant, but it does not work. How can I fix this and include my reference in the cluster?

Solution

A common source of confusion when using references in clusters is that a reference cannot be inserted into a cluster constant directly. Make sure you are first creating a constant from the reference and adding that to the cluster constant, rather than trying to add a reference directly to the cluster constant.

In order to include a reference in a cluster constant, the cluster must be initialized with a reference constant. You can create a constant of the same type as a reference by right-clicking on the reference and selecting Create>>Constant
 
The picture above illustrates a reference to a numeric control and a constant created from that reference. The lower rectangle is the one that should be included in any cluster constants.

Once the cluster constant is defined, the reference can be added to the cluster using Bundle by Name to replace the reference constant with a unique reference.