09-09-2008 01:15 PM
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
09-09-2008 01:36 PM - edited 09-09-2008 01:38 PM
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.
Mike
09-09-2008 01:38 PM
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.
09-09-2008 01:41 PM
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.