Programmatically Change LabVIEW Ring Values Using an Input String Array

Updated Jun 30, 2026

Environment

Software

  • LabVIEW

Overview:

If you wish to create a dynamically changing list, you might first consider using the Enum data type. However, the Enum data type is fixed at compile time and cannot be modified during runtime. Instead, you can use a Ring control. Ring data types are similar to Enums in that they display a list of selectable items, but they are more flexible. Ring controls allow you to programmatically change their item list during runtime.

 

However, if a Ring control is placed inside an array, LabVIEW only stores the numeric index of the selected item, not the string label. When you try to access or modify the Ring inside the array, LabVIEW treats it as a numeric control rather than a Ring. Attempting to change its properties or read its string value will return a numeric output, and reclassifying the data type will not resolve this behavior.

 

You have to consider that Ring values are not static in the LabVIEW engine, they are stored as a numeric Unsigned Integer. This creates the issue of not being able to recall the String data, thus you have to modify the Ring in a specific manner in order to keep the String data as well as the associated properties. Please see the steps below.

 

Environment: LabVIEW 2021 or later

Steps:

  1. Create the Ring control on the Front Panel. Use either a Text Ring or a Menu Ring.
  2. Place the Ring control into an array by right clicking the Ring and selecting Change to Array.
  3. On the Front Panel, select the Ring control inside the array. Right click it and select Create » Property » Strings[].

                                                                                                      Figure.1. Indexing and reclassifying Ring to programatically insert String array into the list
  4. Place the Property Node on the block diagram.
  5. Use the Controls[] property to obtain a reference to the array contents. Wire it to an Index Array function and specify the index of the cluster that contains the Ring element (for example, index 0).
  6. Wire the output of the Index Array to a To More Specific Class function and cast it to the Ring class. This step reclassifies the generic control reference back to a Ring reference so you can access Ring specific properties.
  7. Wire the reclassified Ring reference to the Strings[] Property Node.
  8. Create a String Array constant or control that contains the values you want to populate into the Ring. Wire it to the Strings[] input terminal on the Property Node.
  9. Run the VI and verify that the Ring control displays the string values from your input array.

Result:

We can now inject values into the Ring and restructure it into the Array 

Next Steps

If you need to set the default selected item after populating the Ring, write to the Value property of the Ring using the numeric index of the desired item. If you are working with Enum types instead and need similar dynamic behavior, refer to the related article on programmatically changing an Enumerated Type.