LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scrolling table need a lot of memory ?

Hi,
in my application I use a table to show some data acquisition result.
I've seen that if I use the scrollbar the PC uses a lot of memory to update the table.
Is it possible to set some property to update the table data just when I release the scrollbar?
I see that if I move the scrollbar when the program acquire data the PC (dual-core) uses 100% of one core and sometime I got timeout in the acquisition.

Thanks a lot
0 Kudos
Message 1 of 4
(2,431 Views)

How much data are you trying to display? 1M, 10M 100M pts?  you might want to display it in an array with the scroll bar turned on, you can make it look just like a table.  Tables ususally use strings and increase the ram required.  If you are using a huge data set you can not hold it all in memory at once and should purge the data to file as the data grows too large (RAM is a limited resource keep your data in ram to less than 10's of MB)  First thing move the daq out of the user interface, this should be in its own loop (see producer-consumer modes) your daq should never timeout.  I use in architecture with three loops for most of my daq with queued message passing, a GUI/event loop, a DAQ loop and a data processor/display loop.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 4
(2,421 Views)
Hi Falkpl,
the table contain data for less than 1MB, it's a 2000*25 table of numeric data.
I attach an example of data; this code run in a timed loop with low priority; in parallel there's the high priority loop with DAQ.
The strange for me it's that just this code, if you move the scrollbar, use a lot of CPU.
Now I think to disable the scrollbar and put two button ("PageUp" and "PageDown") to change the visualization; in this way the amount of CPU used decrease.
0 Kudos
Message 3 of 4
(2,408 Views)
How are you using the Table.vi? You indicated it may be in a loop. With the data in the VI you posted it takes about 200 ms te execute without scrolling and 230 - 250 ms to execute when scrolling array and listbox respectively. To test this I put Table.vi in s simple while loop with a 100 ms wait and looked at the timing with the Profiler.

The Fract/Exp String to Number function is polymorphic. You can feed the 2D array directly to the string input and get a 2D numeric array out without using the for loops. Do this reduces the timing to 128 ms without scrolling to 164 and 142 ms while scrolling the array and the listbox.

It is reasonable to expect that scrolling is slower in that the OS needs to report mouse position and button status to the application and the display must be recalculated.

Perhaps you could post the VI which calls Table.vi so we can see if something in the calling VI is affecting the usage.

Lynn
0 Kudos
Message 4 of 4
(2,397 Views)