Discussion:
least memory intensive way of parsing digital waveforms
(too old to reply)
Timothy 123
2006-12-05 18:10:12 UTC
Permalink
Hi,

What is the least memory intensive way of parsing digital waveforms. I
have been parsing digital waveforms by converting them to strings first
and then parsing the strings. The conversion of the digital waveforms
into strings is a very memory intensive process. Is it less memory
intensive to parse an array. I was also wondering if it would be faster
to do this parsing in a text based language and then call this from
labview.  I am storing my waveform as U16 and acquiring it from a
pxi 6561. The number of samples that I am aquiring is will be the
maximum the device can handle, namely close to 16777040 samples.

Thank you,

-Tim
Kevin Price
2006-12-06 15:40:12 UTC
Permalink
Here's what I'd do:
1. Avoid the digital waveform datatype entirely!  The only time I ever use it is to make a quick-and-dirty digital waveform graph during my debugging.  It has always seemed like a convoluted implementation to me.  To avoid the digital waveform datatype, simply select a different instance of 'DAQmx Read', such as 1 Channel, N Samples, U32 (or something similar).  This will give you your data as a simple 1D array of unsigned numerics.
2. Avoid strings too because they will also be memory intensive.
3. You might want to handle your huge # of samples a little at a time.  Search for terms like "producer consumer" for some more info on how you can process / store your data on-the-fly without slowing down your acquisition task.
4. When processing arrays, make use of "Replace Array Subset" in a loop (along with a shift register) to be more memory efficient.
-Kevin P.
Timothy 123
2006-12-06 18:10:10 UTC
Permalink
Thank your for your reply. This is very helpful advice.

-Tim

Loading...