LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ring/enum

Hi,
 
I need an element like a ring or enum. My problem is, if I use a ring I only get a value. But I need the string which is on the FrontPanel in the Ring.
 
Thanks a lot.
0 Kudos
Message 1 of 5
(3,238 Views)
hello,

Probably a less complicated solution  would exist for your case. But if you really want the string that's selected on the ring you can do like I have on the example VI.
It was made on Labview 8.2.

PS: Always say what's your labview version.
Software developer
www.mcm-electronics.com





PORTUGAL
Download All
0 Kudos
Message 2 of 5
(3,234 Views)
Hi heelkick,

when using enums you can wire the enum to a 'Format into string' function, use '%s' as format string and you will get the text of the actual selected value...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(3,229 Views)
Or use 'Combo Box' available in the string controls pallete. This will work as ring and will give you string output.
BR
0 Kudos
Message 4 of 5
(3,224 Views)

Note that the Text property had some problems in previous versions where the text would not always get updated properly if the ring wasn't actually displayed on the screen (like if it was on a different tab page), although this may have been solved by 8.2.

Another option is to get the Strings[] and Values[] properties, do a Search 1D Array on the Values[] property and index the result out of the Strings[] array. This needs to be done like this because a ring can have non-sequential values, so you can't simply use an index array. If you want to use this more than once, you can make it into a subVI which will accept the reference as an input.


___________________
Try to take over the world!
Message 5 of 5
(3,216 Views)