03-24-2021 03:32 AM
I want to be able to display on the front panel of an application a table that updates by adding a row at a time that represents some results from a series of tests. There will be no missing columns but am unsure whether the table will always have fixed dimensions or there's some variation in the number of rows, but this aspect is of lesser importance. All arrays come in standard predefined order so i only need to append one element after another.
Can't seem to find a combination of VIs that would allow me to get arrays and draw a table. Thanks for any suggestions.
03-24-2021
03:51 AM
- last edited on
05-12-2025
09:58 AM
by
Content Cleaner
Maybe something like this is what you're looking for?
Here I send "new data" using an Event Structure, but you probably have a different source.
I convert my data to a 1D string array (i.e. a row in the table) and then send to a Consumer loop (Producer/Consumer) to append to the Table using Build Array.
Note that of course, the memory usage here is unbounded (because the table can keep growing) - so be careful if you might have a very large number of rows or fast addition of new rows.
Stop is controlled through the Queue error, which isn't a good strategy for a real application but is quick for demos 😉
03-24-2021 03:57 AM
Hi Andrei,
@AndreiV wrote:
I want to be able to display on the front panel of an application a table that updates by adding a row at a time
A table displays a 2d array of strings. All you need to do is to build such an array by appending new rows each time (using BuildArray)…
What have you tried? Where are you stuck?
03-25-2021 03:55 AM - edited 03-25-2021 03:58 AM
What have you tried? Where are you stuck?
Sorry for my belated response. I was stuck at looking for some sort of container that displays a table in the familiar layout(header + rows). Was looking for something dedicated rather than displaying a 2D array, but that would do it too if nothing else exists in the free version.
@cbutcher can you please attach that vi if you still have it?
03-25-2021 04:15 AM
Hi Andrei,
@AndreiV wrote:
Sorry for my belated response. I was stuck at looking for some sort of container that displays a table in the familiar layout(header + rows). Was looking for something dedicated rather than displaying a 2D array, but that would do it too if nothing else exists in the free version.
When you write about "displaying a table" then we think of a table indicator as provided by LabVIEW.
This table indicator also supports headers for rows and columns! And it is dedicated to "displaying a 2D array"…
CButcher attached a snippet: have you tried to use it? (Lookup that term in the LabVIEW help.)
03-25-2021 05:34 AM
As Gerd mentioned, the image in my previous post was a "snippet".
Although unfortunately it is no longer possible (at least as I tested just now, using Chrome) to drag the image directly from the browser to the block diagram, I was able to click on the image (opening a 'larger' version) and then choose Download in the far right (there are 3 icons, Kudos, Flag and Download. Please don't flag me 😉 ) and then drag from the bar at the bottom of the browser.
You need to open LabVIEW (I used 2019 just now) and then create a new VI, and then just drag from the downloads bar into the block diagram. You might need to use alt-tab to get the BD to be visible (since clicking the browser will put it in front of LabVIEW, unless they're not on top of each other because you have a large screen etc).