05-28-2014 01:35 PM
Hi I am trying to obtain the item name from an enumerated control array. The array is made of enumerated U16. I used the example in the first picture to obtain the data name and it works fine. However, when I try it on my example it just gives the number value rather than the item name. I also notice from the second picture that my array does not say "Enum" anywhere even though it seems like it is, it only says U16. I obtained this data type from a Instrument Driver which I am using to modify on my own so I'm not sure if the Enum type was different in the older versions of labview. Is there anyway to get to change so that it is a proper Enum?
Thank you
05-28-2014 01:47 PM
You have a Ring, not an Enum. Drivers typically use the Ring due to localization (an Enum doesn't localize since the text is part of the data type).
If you want to get the displayed text, you need to use a property node to get the Strings[] and then index that resulting array with the value of the ring. Of course, this assumes you are using sequencial values.
I have also done translational case structure to convert to/from rings and enums.
05-28-2014 02:48 PM
Thanks crossrulez,
I am trying to use the property node but the String[] option doesn't show up. I'm guessing it's because it is an array of rings. How would I access the string[] property for each element?
05-28-2014 02:50 PM
05-28-2014 03:46 PM
try.....
05-29-2014 07:25 AM - edited 05-29-2014 07:25 AM
As Dennis said, you need to create the property node from the ring that is inside of the array.
But here's what I had in mind