LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

value of the actual element in a ring

Hello,
I have a dialog bog with inside : a ring, and a ok button
I want to select a name inside the ring with an event case structure. I manage to select the name of an element inside the ring with the event "change value" but when the element does not change (the default element) I can't have event.
I want to put an event case with the ok button and inside this event case: a property node with the acutal value of the ring. But I don't find the right property in the property node. (it's not value..).
Thanks to indicate to me the right property.
Manu
labview 7.0
0 Kudos
Message 1 of 8
(3,362 Views)
Make only an event for the OK button.
Get the "strings[]" property to get an array of all item names of the ring. Now use index array with the ring as index to get the string of the current ring selection.
Message 2 of 8
(3,347 Views)
Ok but when the actual element viewable on the ring is not at the default index how can I do ?
I explain for instane in my ring I have 3 elements : "elt1" "elt2" "elt3". The first time I launch my dialog box the default element is "elt1" but when I recall it the viewable element will be "elt2". If I put only an index array with index=0 I will always have "elt1".
labview 7.0
0 Kudos
Message 3 of 8
(3,331 Views)
I don't see what the problem is.

Try this example.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 4 of 8
(3,319 Views)

@ramiral wrote:
The first time I launch my dialog box the default element is "elt1" but when I recall it the viewable element will be "elt2". If I put only an index array with index=0 I will always have "elt1".


I is not entirely clear to me what you want.
If you say "... the viewable element will be ...", do you mean "it currently is, but you don't want it to be" or "it currently is NOT but it should be". 😉

Please attach a small sample program, it will make it much more clear to all of us. It is always best to explain with a few more sentences. Describe the current, wrong behavior and the expected correct behavior.


IF you just want to auto-increment the ring each time it is called, you just need to programmatically change it. This can be done by e.g. writing to a local variable of it.
0 Kudos
Message 5 of 8
(3,318 Views)
It's exactly what shoneill sent. Sorry if I don't exmplain clearly It's not very easy to translate into english.

Thank you very much
labview 7.0
0 Kudos
Message 6 of 8
(3,312 Views)
Just to follow up on my example,

You might encounter a problem if you feed in an "old" ring value to the indexing function. Please note that I read the ring terminal IN the event case, making sure that I get the most recent value of the text ring.

If you place the ring outside the loop and pass the value into the event case, it will display whatever ring value was chosen at the time of starting executing the program. This may have been your problem. It yould be the reason why you were always getting the "default" value.....

See my new example,

hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 7 of 8
(3,308 Views)
Ok, I have done it in another way with 2 rings:
-the input ring
-the current ring

I have done an event structure for the input ring change value. If the input ring change value, value of input ring = value of current ring.
Then I send the value of the current ring.
labview 7.0
0 Kudos
Message 8 of 8
(3,287 Views)