LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-4461 - Generate and Record Tone

Hello,

 

I am trying to play a tone (1K for Example) and record the tone using a microphone.  I am using a PCI-4461 to generate and record the tone.  I managed to make a somewhat functional program but there are some issues I would like to clear up:

 

1)  I had to make a start and check time function to determine if the tone plays and is recorded for the appropriate amount of time.  If I remove the while loop the tone does not play.  I tried using the DAQmx wait until done function but it does not seem to make a difference.  Is there anyway I can play and record the tone without monitoring the time?

 

2) The recorded waveform always has a delay which seems dependent upon the sample rate.  Ex: 10000 Samples/Sec results in 83 sample delay, 20000 Samp/Sec results in 114 sample delay.  I read in some other articles that samples are stored in the buffer and that reading 60ish samples before the actual measurement would clear up the problem.  I tried reading samples before the tone is generated but the delay is still present.  Currently I am using post processing to remove the delay, is there anyway to only record the tone that is played.  Am I triggering the read properly?

 

Let me know if I should post the VI.  Also incase anyone is familiar with acoustics how do I convert a waveform of Voltage vs time to dBV/Pa

 

Thanks,

E

 

 

0 Kudos
Message 1 of 2
(2,489 Views)

Hi Plexonite,

 

The first thing that comes to mind is Pre-trigger Acquisition which could help you retrieve missing data. Further details about this can be found under:

 

http://www.ni.com/white-paper/4329/en/

 

Let us know if this helps you move forward.

MJ
Application Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,433 Views)