LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Table Auto Scroll (LV 7.1, 8.0)

Hello,

I'm filling a table in a loop via a shift register with values.
When the number of data rows exceeds the number of
visible rows of the control, the new appended data rows
aren't visible. Is there any convenient way to auto scroll
the data rows so that the last entry is always visible?

I have found a relative complex solution, like described
in
http://groups.google.de/group/comp.lang.labview/browse_frm/thread/30539e1aa22796b/efd60b1b03462844?q=table+visible&rnum=2#efd60b1b03462844
thread "odd table reference problem with LV8", but
maybe there is an easier one.

Many thanks in advance
Udo

0 Kudos
Message 1 of 5
(4,901 Views)
Yeah, unfortunately there's not really a better way to make sure that the last row of the table is always visible. The best way is to use Array Size to get the number of rows in the data, and then set the Index Values property node accordingly. Take a look at the example attached below. It's not really that terribly complicated.

Your other option would be to rearrange your array data that you enter into the table such that the most recent values are in the top row. This will avoid the whole problem, since by default the top row will always be visible. Then have the oldest data be pushed to the bottom. Definitely won't work in all situations, but it's an idea.

Message Edited by Jarrod S. on 06-01-2006 10:54 AM

Jarrod S.
National Instruments
0 Kudos
Message 2 of 5
(4,890 Views)

Hi,

Please see if this example that I had in NI Community fits you.

Auto-Scroll to show last row of data

Regards,

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 3 of 5
(4,876 Views)
Hello Ian,

> Please see if this example that I had in NI Community fits you.

works well, tested with LV 8.0 - interesting additional feature.
Many thanks for your efforts.


Greetings
Udo

0 Kudos
Message 4 of 5
(4,870 Views)

@Udo,

 

Of course, there is always a way or two or three with LabVIEW.

 

In my recent test supervisor, I wanted the same exact thing that when the last row of the table is reached, I wanted to programmatically scroll the rows by two rows - to leave a visible empty row at the bottom that shows the operator that the bottom visible row is indeed the last test.

 

Here is my solution that worked for me:

 

table-autoscroll-block-diagram2.jpg

 

Here I have two strict reference of the data table (or you can create a normal property node from the control). The first reports the number of visible rows. This is then compared to the current rows of the array feeding the table. If the data array size equals or exceeds the visible rows of the table, I then increase the table's row index by 2. This leaves a blank row at the bottom of the control. If that doesn't suit you, you can increase the scroll as many rows as you wish but at least 1.

 

This is the simplest I can imagine of autonomically scrolling a table. 😉

 

Enjoy,

Aldrin

 

0 Kudos
Message 5 of 5
(3,919 Views)