How Do I Create a Shared Variable with a Cluster Data Type?

Updated Nov 20, 2023



  • LabVIEW Full

I have a cluster in my LabVIEW program that I would like to use as a shared variable. However, the cluster data type is not an option when creating a shared variable in the LabVIEW Project Explorer. How can I use a cluster as a shared variable

In order to use a cluster as a shared variable, first create a custom control of that cluster with the following steps:
  1. Within LabVIEW, right-click on a Cluster on the Front Panel and select Advanced┬╗Customize... This will bring up a screen for customizing a control.
  1. If the cluster is already in the form you would like it (proper number and order of elements), you can simply save the control as a .ctl file.
  2. Open the Project Explorer window and create a new shared variable (right-click on My Computer and select New┬╗Variable.)
  3. Select From Custom Control... as the data type of your variable. This will bring up a file path window where you can select your saved custom control.

Additional Information

The custom shared variable type does not support some features such as RT FIFO (for LabVIEW Real-Time) or alarming (for LabVIEW DSC). For more information on using LabVIEW Shared Variables, see Using the LabVIEW Shared Variable.