LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

next row in table

I am trying to fill up a row with dynamis data using the express table vi. I trabsposed the data and so now I have the columns filling up instead of the rows.
Now, after filling up 10 columns, I want to go to the next row and start adding data to the table in the same run dynamically. I used the property nodes but it all only affects the view of the table on the front panel. Like if I set the number of columns to 5, the 6th data value does not go to the 2nd row, but goes to the 6th column although I can view only 5 columns on the front panel.

Thanks!
0 Kudos
Message 1 of 9
(4,058 Views)
The easiest way is to get rid of the express vi and create the data array on your own. This then can be wired to a table.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 9
(4,046 Views)
I was thinking something like this would be a decent way to fill a table.  It is in LV 8.2 so if you need it earlier than that just  tell me :).
Brian K.
0 Kudos
Message 3 of 9
(4,021 Views)
Yes please! The latest I have is 8.0

Thanks brian!
0 Kudos
Message 4 of 9
(4,019 Views)
Here you go.
Brian K.
0 Kudos
Message 5 of 9
(4,016 Views)
Thanks a lot for the update of version.. The program works using your logic but.. the thing is, my program collects data and stores in the table only when OK button is pressed on the front panel. So whenevr it stores, the current data should go to the next column until all the columns are filled and then should come back to the next row .. all in one run .. but collecting data ONLY when the OK button is pressed by the user.. not by itself within a for loop.

So far, as I removed the for loop in you program and replaced with a case structure connected to the OK button, it works if the row # and column # are entered manually.
0 Kudos
Message 6 of 9
(3,975 Views)

Hi UofH,

If you only want to collect data when the OK button is pressed it sounds like you want to use a case structure.  Instead of using a For Loop, you could use a while loop, and an just keep checking to see when the current column you are using is 5 deep, then move onto the next loop.  You can check the current size by using the Array Size VI.  Tell me how it goes.

Brian K.
0 Kudos
Message 7 of 9
(3,939 Views)
Hey Brian

Thanks a lot for the inputs. I am sure I am missing something silly here. Like I said before, I would like to go row by row and only when I click the OK button.
The main objective is to get a value when I hit OK and go into the first row , ,1st column and when I hit OK again, 1st row 2nd col. Then, when i change the sample,
I would like to continue with the same table in the next row.
Your program works fine when the for loop is given a specific N value in one run. But if I want dynamic data, it erases all other inputs and stores only the current value on the table.

Maybe posting my program helps. Here it is.
0 Kudos
Message 8 of 9
(3,892 Views)
Hey, I think Brian's VI works, you just have to modify it slightly.  Try this out.
Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 9 of 9
(3,869 Views)