09-14-2013 03:05 AM - edited 09-14-2013 03:06 AM
Hi,
This attached vi is used as an subvi in my progra, . It basically read 10 digital signals from a TDMS file ( every signal contains 17 million samples ) . Then I use getwaveform subset to be able to graph from a start point for a certain duration and then I would like to split the signals to graph only the first 4 samples and then plot them on the graph. The main problem I have here is memory. These digital waveform are very big and these functions take a lot of memory
also as I said I use this as a subvi and this vi is always running and I supposed to update the graph whenever the user set a new start and duration. The problem I have seen is whenever I run this vi I should pull up the whole digital data from thye TDMS files and then consumpted memort adds up until I get run out of memory message. Specially the split functions takes a lot of memory
Could you please let me know how can I make this program memory efficient. ? Is there any way to read the digital data just one time ? Is there anywat to free memory after plotting on the graph?
Here are also some statistics about the memory usage
read TDMS 2.5 GBytes
Subset 3.2 GByte
Split 3.8 GByte
and then run out of memory
Thanks
09-14-2013 08:57 AM
09-14-2013 09:58 AM
09-14-2013 10:39 AM
09-14-2013 03:37 PM
any help really appreciated, how can I split and load part of the data in the TDMS file and also flush memory after reading the data from TDMS.
Or is there any way to save memory in countiously running memory in the the attached vi
thanks
09-15-2013 08:34 PM
TDMS Read reads partial data through "offset" and "count". Thus, you can relate duration with count by starttiem(t0) and interval(dt). For the memory flush issue, LabVIEW manages the memory reclaim by itself. There is no explicit way for users to free memory in LabVIEW as far as I know. Once you no longer use the array of data any more (no reference to the data wire), LabVIEW will free the memory.
09-16-2013 02:35 AM
What you should do is already mentioned, use Offset and then read your 4 samples(!)
If you want an overview of the full sample before selecting which part, you can loop through your file, read 1million samples/loop and downsample 1:10 before plotting.
/Y
09-16-2013 02:38 AM
Next step would ofcourse be to catch a zoom-event on the graph, and read e.g. 10000 samples without downsampling for a accurate zoomed in graph.
/Y