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
(2,457 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
(2,513 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
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(2,491 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
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 4
(2,424 Views)