LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a text ring control transfer its value correctly?

Hi,
I want to define a control for some certain value with text ring control.but if i multiplied the value(for example the text ring control is 4)by 2,the result should be 8.But the return value is not correct.How can I make the text ring control executable?
Thank you.
bigbug
0 Kudos
Message 1 of 4
(2,873 Views)
You know your problem better than I, but it sounds like you have a numeric set of values in a text ring control and you want to multiply those values by a separate control or value. If this is so, look at the LV 6 attachment - I took a numeric set of values in a text ring and multiplied them by a numeric control.
However, I'm guessing you have a different problem, and if you do, kindly respond with clarification and/or an example vi.
Doug
0 Kudos
Message 2 of 4
(2,873 Views)
BigBug,

I wrote an example in LabVIEW 6i, if you have a different version of LabVIEW let me know to save it in that version. Basically I want to point out something about the Text Ring Control, the value it has is only number index, and it starts from 0 to over... anything that you put inside the Text Ring is not what is transfer to a multiplication, string, etc... imagine that a Text Ring Control is list of names like mine Nestor and Sanchez, so you have two items, well, for the Text Ring you have item 0 and 1... not Nestor and Sanchez... if I had add... National Instruments and after that LabVIEW... then they will have position 2 and 3 respectively. So when you perform operations with Text Ring the value it will pass is the index number of the position select
ed, not the value written to it.

In the example I wrote for you you may notice in the block diagram how did I selected the exact value written in the Text Ring to be multiplied by the factor you want. Is just a matter of having a case statement with the different positions of the Text Ring, and the when a position is selected you have a constant value inside the case statement, which is the one that is going to be multiplied.

Hope this clarifies this point,

I appreciate the help from the previous person who answered this email, this VI may also be of help for him to complement the VI he placed here before mine.

Good luck!...

Nestor Sanchez
Applications Engineer
National Instruments
Nestor
0 Kudos
Message 3 of 4
(2,873 Views)
There is an alternative way to access the value of a ring control, and that is to use the Strings[] property node. This returns an array of strings that represent the values in the control. You can index the array to retrieve the selected item with the index returned by the control itself. Note that this method is applicable to ring menus, text rings as well as enum controls.Attached is a multiplication example using this technique. The number in the ring is multiplied by the 'multiplier' control.
0 Kudos
Message 4 of 4
(2,873 Views)