LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Saving audio signal to a file

find attached the code. thanks

0 Kudos
Message 1 of 4
(846 Views)

Hi everyone!

I was wondering if somebody could help with this one. I have got audio signal from four sensors that I want to save at the end of a while loop using shifts registers, I tried using build array vi then to write to spreadsheet vi, but whenever I opened the file I could only see two rows one column of the data. And I expected to see four columns of numerous rows. Please advice on such a problem. Thanks.

0 Kudos
Message 2 of 4
(902 Views)

Code?

 

Whenever somebody is logging data, it is almost always a bad idea to be building up an array and then saving afterwards.  Out of Memory errors happen a lot.  Instead, use a Producer/Consumer to log the data as it is being collected.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 3 of 4
(880 Views)

The Scan From String only works on a single sample.  I think the waveform coerces to just the first sample.  So that is all your log is doing.  The simple solution is to use Build Array to combine the waveforms into an array of waveforms and then Write Waveforms To File (found in the Waveform palette).  The better solution would be to use a Producer/Consumer like I mentioned earlier to perform the logging as the acquisition is happening since that would avoid a lot of potential memory issues.

 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 4 of 4
(813 Views)