LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Waveforms From Disk

Hello, currently I am reading data from several DAQ cards (at ~8192 S/s) using the "Analog 1D Wfm NChan NSamp" VI and working with that data as several 1-D waveform arrays. I also record it to disk after converting the waveform to I16 as shown in the attached "Timed Record - Scale and Record.vi" (which uses a version of Write WDT Array Dlog File.vi modified to accept integer waveforms).

The problem I am having is when trying to read back this data, as shown in the attached "Read Data.vi". What it is doing is converting the integer waveforms that are in the file to double-precision waveforms, scaling and then appending the new waveform to the previous record's first (for example) waveform.

This takes FOREVER!

Is there a better way to recreate this data, or to store it? I am storing it as integer waveforms because this saves valuable disk space.
0 Kudos
Message 1 of 5
(3,181 Views)
You might have a conflict in the Read Data.vi since the inner For Loop has two indexed input tunnels connected. The input tunnel with the lowest number of elements will determine the number of iterations of the For Loop, so if the "Input Array" is empty, the inner For Loop will never run and therefore the data read from the Datalog file will never be appended. Could this cause the behavior?

If this isn't the cause of the issue, please perform more debugging to explore WHERE the VI is hanging. Also, please provide us with the "Read WDT Array Dlog File+.vi" and an example of a log file, so we better can troubleshoot your issue.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 2 of 5
(3,153 Views)
I was able to fix it by eliminating the Input Array and the Append Waveforms.vi, and simply using auto-indexing on the inner for loop. Then by wiring that to the output array, it becomes MUCH faster! Thanks for your help.
0 Kudos
Message 3 of 5
(3,146 Views)
Ok, I thought I had fixed it but apparently not. It was faster because it was only working with a small set of data.

The "Append Waveforms".vi is what's taking forever, because it is using "Build Array" on a colossal set of data, hundreds of times. So I guess I am asking for a good way to work with large waveforms. Is there a way to interpolate the data points so I can still see meaningful features (spikes, etc) but cut down the total number of points?
0 Kudos
Message 4 of 5
(3,139 Views)
Please refer to this KnowledgeBase for information on decimation:

Managing Large Data Sets in LabVIEW
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 5 of 5
(3,112 Views)