LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change ring item number dynamicly

hello everyone
 
I met a trouble when programming with labview
 
In my labview program,  I use ring control to select the row of a 2D array ,the row which is selected will be displayed in the front pannel.But the rows of the 2D array is not fixed.(I read from a config file and use speedsheet to array.vi to buid the 2D array , The content of the config file is always changing) 
 
Is there some method to solve this problem.
 
Thanks
 
aaa1982
 
 
0 Kudos
Message 1 of 8
(3,595 Views)

It's not clear as to what your question is.  Do you want to change the value of a ring control?  Write a value to a local variable of it.

Is it some problem with reading your config file or how you are reading it?

Please post your VI and a representative config file.



Message Edited by Ravens Fan on 03-20-2008 10:26 PM
0 Kudos
Message 2 of 8
(3,594 Views)
Thanks Ravens Fan


       I post our program and config file and add some explanation in the front pannel of the vi.

       In the vi , the ring control has three items(1,2,3) , I want to know whether I can change the item amount in the program.
    

      The needed amount of the item of the ring is base on   the lines of  a.txt,  
   
      If there is 2 lines in the a.txt, only one item is required.
      if there  is 4 lines in the a.txt , two items are requred.
     if  there is 6 lines in the a.txt ,  three items are required

thanks again.



Download All
0 Kudos
Message 3 of 8
(3,582 Views)
So it looks like you want to change the list of items in the ring, not the actual value of the ring.
 
See the attachment.  I'm not sure how you want this code to run.  I put in an event structure that waits either for the value of the ring to change or the select button (in the event you want to keep whatever is the current value of the ring.)  Because the program has to run to determine what's in the list, but once it has run, there would be no way to select the item in the list without waiting for it.
 
I cleaned up the code a little bit.  You can expand the Index Array function downward to get the selected element as well as the one below.  Then you don't need to do a +1 and the extra index array function.
0 Kudos
Message 4 of 8
(3,572 Views)
thanks Ravens Fan
 
really appriciate your help
0 Kudos
Message 5 of 8
(3,569 Views)
hi Ravens Fan :
 can you save your vi in 8.0 version
 
thanks a lot
0 Kudos
Message 6 of 8
(3,567 Views)
Sure.  Here you go.
0 Kudos
Message 7 of 8
(3,540 Views)
Ravens Fan :
 
Thanks a lot
 
aaa1982
0 Kudos
Message 8 of 8
(3,518 Views)