Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

least memory intensive way of parsing digital waveforms

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
0 Kudos
Message 1 of 3
(3,322 Views)

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.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 2 of 3
(3,309 Views)
Thank your for your reply. This is very helpful advice.

-Tim
0 Kudos
Message 3 of 3
(3,303 Views)