LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the numeric control's value?

Is this a numeric control?But why are there two numeric value?And right click it, I see "add item before" and "remove item" and so on.I don't know how to build it ,and get the values of the controls.(seethe attachment)
0 Kudos
Message 1 of 5
(3,190 Views)
It's either a ring control or enum (enumerated type). When you create one, you enter text as items to be displayed. The actual value of the control is the index of the selected item. For example, say a,b,c are the available items - these represent values 0,1,2. The operator chooses b. The value returned from the control is 1. Enums are great because if you wire one to a case structure, the text represnetation of the enum is displayed in the case - making documentation easier. If you actually need the text values, create a property node. The property Strings[] will return 1D array of all of the available strings. The property RingText.Text will return the string value of the currently selected item. There is considerably more information available on ring
s and enums in the LabVIEW User Manual and on-line help.
Message 2 of 5
(3,190 Views)
Thank you for your kind and perfect answer,but I didn't find the property RingText.Text in the menu (right click on the control's property).
0 Kudos
Message 3 of 5
(3,190 Views)
Use "Index Array"
Enum control wired to its "index", and
Property Node "String[]" wired to its "input array"

Now, you will get the corresponding enum [value]
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 4 of 5
(3,190 Views)
The property only exists in versions 6.1 and newer. If you've got something older, you hve to use the technique that Ian mentions in his answer.
0 Kudos
Message 5 of 5
(3,190 Views)