LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String to ring value

Hi, here is my problem, it seems easy but i am not sure how to do it.

I am reading the folder names from a directory and use them as ring values.

Then from the names, i want to go to the value.
For example when i choose type A in string control i want my ring to go automatically to value 0
When i choose string B i want it to go to value 1 and so on

Any clues on this?

I am attaching a vi with the folders needed

Thank you,

Christos

 

 

 

0 Kudos
Message 1 of 4
(2,566 Views)

Hi Christos,

use the index array function. Connect the array you got from the list files vi to it and your string control for the search input. That the values of your ring with the index you get from the indey array function

Additional hint: you can use the current vi´s path function combined with strip path, to make your vi movable. Smiley Wink

 

Mike

Message Edited by MikeS81 on 09-09-2008 08:38 PM
Message 2 of 4
(2,561 Views)

Are you trying to search for a particular string in the ring control?  Why the separate string control?  Just wire the terminal for the ring control to a normal numeric indicator.

Message 3 of 4
(2,560 Views)

I don't really quite understand what you're trying to create, but in addition to the previous comments you need some sort of structure to the program. Like a loop. Right now your code runs just once. Assuming, of course, you're not trying to use the "Run Continuously" button, which you should only do under specific debugging circumstances. If you really must have the string control be used for selection (doesn't make much sense to me), but you also need an event structure so you can respond to the string control's change event.

 

To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

Message 4 of 4
(2,556 Views)