From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to increment the row/column index in multicolumn listbox

Solved!
Go to solution

Hi

I have developed a program in which the values from the multicolumn list box are read and passed on to some other instrument. To read specific values from the listbox I have used index array to grab the value of a particular cell and pass to the instrument.

 

Lets say if I want to run the VI multiple times and I want to increment the row index each time the VI runs so that for successive runs the values from the next level of rows are read.

 

For eg. I have the following listbox

 

DUT   Vd      Vg

1       0.2     0.3

2       0.4     0.6

 

So for the first run based on the index which I specify the listbox can read 0.2 and 0.3 and suppose if I run this VI for lets say 2 times during 2nd time it must read 0.4 and 0.6 instead of 0.2 and 0.3.Is there any way to increment the row/column index automatically? Please help me as this is the last step in my project.

 

Thanks,

Robin

0 Kudos
Message 1 of 7
(3,414 Views)

You would need to keep the index in an uninitialized shift register and increment it with each run.

 

0 Kudos
Message 2 of 7
(3,410 Views)

thank u ....that works but.....for some reason....when i select N of the for loop as 0 and run multiple times it reads only the 1st row (i.e 0th row as per the multicolumn listbox indexing) but when i select N as 1 and run multiple times....it forgets to read the 1st row (i.e. 0th row of multicolumn list box).

 

Any suggestions?

0 Kudos
Message 3 of 7
(3,402 Views)

Why would you set the N terminal to 0?  It won't execute the contents of the For loop.  Setting it to 1 will execute once, but without a VI to view, I'm only guessing at to what is going on.  Can you post a VI of what you have?  It would help.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 4 of 7
(3,397 Views)

I was just trying to play with the function and konw how it  works...anyways here is the VI...thanks for ur help...

 

 

0 Kudos
Message 5 of 7
(3,387 Views)
Solution
Accepted by topic author Robin11

Your VI runs millions of times per second and runs out of elements within nanoseconds. You need to prevent that.

 

Here's a quick modification that goes to the next row whenever you re-run the VI, and starts over when it runs out of elements.

 

Maybe it will give you some ideas....

0 Kudos
Message 6 of 7
(3,382 Views)

Hi

 

That looks gr8. Infact I have modified some portion of it to suit my program. Thank u very much...

 

Robin

0 Kudos
Message 7 of 7
(3,347 Views)