Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to record wave file from data acquisition NI USB-9233 using Labview 8.0?

I am new to Labview and the NI USB-9233.  I want to input 2 channels of sound, 1 which includes speech, and record them as wave files.  If someone can help me out?  This needs to be done rather quickly, so if anyone can provide code for Labview 8.0 I would appreciate it.
 
Thank you. 
0 Kudos
Message 1 of 8
(4,564 Views)

Hi puc_undergrad,

 

You can record wave files in LabVIEW 8 using the USB-9233. There are several LabVIEW 8 shipping examples for recording files under LabVIEW Example Finder (Help >> Find Examples). In the Example Finder search for keyword "sound" and you will get a list of example vis that deal with sound and wave files. A good example to look it is Sound_Input_to_File.vi. The only modification that you need make to this code is implement the aqusition of the two waveforms (speech and sound) form the 9233 using the Daqmx vis. For examples on how to acquire waveform look of Cont_Aqr&Graph_Voltage_Int_Clk.vi in the Example Finder (Hardware Input and Output >> DAQmx>>Analof Measurement>>Voltage). Once you have acquired the waveform, simply write it to the Sound_File_Write.vi.

 

Also, make sure that the rate at which you are sampling the waveform will the same with rate at which this sound file will be written.

 

'Hope this helps.

 
 
Regards,
Natasa
0 Kudos
Message 2 of 8
(4,542 Views)

Thank you for the help.  I am able to record one signal at a time as of now.  I do not know where to get the sound data input to the Sound File Write Open.vi.  Could you tell me how I can get that to set up the sampling rate and number of samples and bits per sample.  I can't set the rate at which the sound file is being written to the sampling waveform.  I am using the example vi, Cont Acq Snd Pressure Samples-Int Clk.vi.  My wave file sounds real slow, not like what is recorded.

Attached is what I have for the vi.  Could you provide feedback.  I would appreciate it.

Thanks

0 Kudos
Message 3 of 8
(4,518 Views)
Sorry, but here is the attachment from the above message.  It is still a work in progress, but any advice would be good.
 
Thank you.
0 Kudos
Message 4 of 8
(4,517 Views)
Sorry, but here is the attachment from the above message.  It is still a work in progress, but any advice would be good.
 
Thank you.
0 Kudos
Message 5 of 8
(4,520 Views)
You can use the Sound Input Configure VI to specify the sample rate (S/s), number of channels, and bits per sample.  For more help on outputting sound waves to file, please refer to the Sound Sample to File example program, which can be found in the example finder (Help >> Find Examples). 
 
I hope this helps,
 
Daniel L.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(4,499 Views)

hi ,

I m using the same thing with him but i would like to measure vibration . so i need an example program, right? i type the vibration in the search text box . .. but which one should i use for measuring vibration? I want to measure the vibration of the train .. thank you

regards ,

kit

0 Kudos
Message 7 of 8
(4,097 Views)
 

Hi,

The 9233 is designed for measuring signals from microphones and accelerometers. You didn't say what kind of sensor you're using, but I'm assuming that you have accelerometers since you're measuring vibration.

If you have the Sound and Vibration toolkit for LabVIEW installed [1], you will have an example called "SVXMPL_Vibration Analysis (DAQmx).vi" that you can start with. If you don't have that toolkit, then you will need to to a lot of the programming and analysis by hand. One way to start is by creating an acceleration task in Measurement and Automation Explorer and asking LabVIEW to generate the code for you [2]. Another way is to use a standard voltage example (like "Cont Acq&Graph Voltage-Int Clk.vi") and modifying it to your needs.

[1] NI Sound and Vibration Toolkit
https://www.ni.com/en-us/shop/product/labview-sound-and-vibration-toolkit.html

[2] Creating a Task in NI-DAQmx and Using it in LabVIEW
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x15ZCAQ&l=en-US

 
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 8 of 8
(4,085 Views)