Showing results for 
Search instead for 
Did you mean: 

Why is ring control access in loop not in order of elements?

I have created a non-sequential ring control; the items in the list are not in sequential order of their values; however, when I attempt to access the items in a loop (using the loop iteration value as an index) the items in the list are accessed based on their values, not their position in the list. Is there a way that the items can be accessed based on their positions in the list and not their values?
0 Kudos
Message 1 of 5
Could you post an example of your control? I'm unclear on what you mean by a non-sequential ring control.

Putnam Monroe
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5

LabVIEW Champion

0 Kudos
Message 2 of 5
I assume you use the Strings[] property.
Try using the StringsAndValues[] property instead.
You will have to seperate them into 2 1D arrays and then use the value to extract the proper string from the string array.

Try to take over the world!
Message 3 of 5
Non-sequential means that the values assigned to the items in the list do not have to be in sequential order. For example, here are some of the items from my list and the values assigned:


NAV_STATUS is the first item in my list, INS_STATUS the second item, and so on; when I sequence through the list in a loop using the loop iteration value as an index, the items are displayed based on their values, not based on their list position as shown below:


I need the items to be accessed based on their list position, not their values.
0 Kudos
Message 4 of 5
Oh. Now I understand. You write a numeric value to the ring itself.
Well, that's the point of a ring. Each string is assigned a value, and when you ask for that value, you get that string.
Like I said, you can get the strings, and their values, by using the StringAndValues property. To access it, you need to create a property node. Right click on the control or the terminal and select Create>>Property Node. Then, find the property (the last one).

Try to take over the world!
0 Kudos
Message 5 of 5