LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question on Updating Tables/Multi Column Listboxes

Hi all
 
I am writing a basic GUI which is required to display a history of the test execution (somewhat like a test executive) that includes test status (pass/fail) as well as measurement data, execution time etc (14 columns of data in total per test)...
 
Anyway's,  I was thinking of using either a table control or multi column list box to display this history but have a couple issues that I thought others may have run into. 
 
1)  Both types of indicators require that you pass  a 2D array of strings and there does not appear to be any efficient way of adding a row to an existing table or listbox  .   The two approaches that I have tried are
 
  a)  Pre allocate a 2D array of strings, each of which is set to 8 characters in length (the maximum string length in my application) and use Replace Array subset to replace rows in the table/listbox
 
b)  Use build array to add a 1D array of strings (containing new data) to the existing 2D array of strings....
 
Problem with both approaches is that there may be several hundred test records that need to be displayed by the end of the test and  memory allocation becomes an issue....
In method (a), LabVIEW may not be able to allocate enough memory for the 2D array (14 columns * 8 char * required number of rows + space for string pointers) when the number of tests (= # rows) is large...
 
with b..well we all know to avoid build array if possible 😉
 
Anyone have a good way to address this?   For you TestStand  or LV Test Executive gurus out there, anyone remember how the LV Operator Interface was implemented before the TS Controls (TS v 2?) were added?    I don't have access to TS 1.x  or the LV TE anymore, but imagine that both must have had some way of handling this issue....
 
Thanks!
 
 
 
0 Kudos
Message 1 of 3
(2,809 Views)

Even if each element used the maximum 8 bytes, thats only 112 bytes of data per row. You say there may be several hundred rows, but even with 1000 rows, you're still only looking at 112KB of data. Sure, there's going to be overhead, so the structure will be bigger, but it's still not a lot of data.

Just allocate an array of strings thats 500x14 and store it in a shift register. If it fills, double it. Whenever you update it, send it to the table on the front panel. You should also store how many actual records there are, then use array subset to only send that many rows to the table. This way, you won't be sending a bunch of empty elements. Memory shouldn't be an issue, though.

0 Kudos
Message 2 of 3
(2,800 Views)
One thing you could try is using the 'Invoke node' feature on a table
control using the 'Set cell value' method. This allows you to specify
the X & Y cell location. It only allows you to set one cell at a time
but it may be faster.

0 Kudos
Message 3 of 3
(2,785 Views)