LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving multi channel finite sound data in .wav format

Hi all,

 

I have got three Accelerometers and the objective is to record their readings and save it in three different .wav files.

For this purpose, I am using NI cDAQ 9184 chassis with NI 9234 ADC. 

I am trying to use svx_Sound Write Waveform.vi to store the waveforms in .wav file. 

My program works fine when I use just 1 channel but when I try to select all three channels, I get the error: 

Attempted to retrieve channel properties from a multichannel task without selecting a specific channel.
Use the Active Channel property to select a specific channel from which to retrieve properties.

 

I have attached my program for your reference. Could you guys please help me out here. 

 

Thanks & Regards,

Kushal 

0 Kudos
Message 1 of 3
(364 Views)

kushalasd_0-1704718833780.png

Just for your information, this is the error I am getting. 

 

0 Kudos
Message 2 of 3
(330 Views)

To use the SVT example subVIs for this use case, you will have to modify svx_Sound Write Waveform (DAQmx).vi.
Add an additional input to set the active channel when getting channel-specific properties from the DAQmx task:
svx_Sound Write Waveform (DAQmx)_ActiveCh.png
Sorry, I couldn't save the subVI in LV 2020, but you should be able to save a modified copy of the subVI on your machine since you won't have to Save for Previous Version.

And here is your application modified:
AcousticMeasurment_IEPE(DAQmx to WAV File).png

The attached version of this VI is saved in LV 2020. Other changes made to simplify code or just make it work on my system. To run on your system you will have to change the base path for your wav files.

Doug
NI Sound and Vibration
0 Kudos
Message 3 of 3
(287 Views)