LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the actual sampling rate of Output Audio?

Hello there,

I am using NI myRIO 1900 for Active Noise Cancellation project.

Initially I am trying to demonstrate the principle with sinusoidal noise source.

My source noise is a sine wave with 40kHz Sampling rate, 1000 samples,2 kHz frequency,1 amplitude.

 

From myRIO 1900(page 21-22), The Audio IN is Aggregate sample rate is 500kHz i.e if I am using 2 channels (Left and Right), I will get 250 kHz each.

The Audio Out is having sampling rate of 345 kHz  again for two channels it will become 172.5 kHz.

Now if I am connecting like this

 Unbenannt2.PNG

I should ideally get (2/250 + 2/172.5) msec i.e 19.6 micro sec.  But I am getting 8.475 micro sec.

 

I am getting 16 micro seconds for some processed version also (for fxp llms error.png). This is about what I am  concerned !

 

Still My question is how this optimization is done actually?? And at what rate my Audio IN and Audio Out are actually sampling ??

 

Additional : When I used just Audio IN left and right and Audio Out left , I got 5.95 micro seconds.

                      If I use just Audio IN left and Audio Out left , I am getting 3.925 micro seconds.

 

-- Please check a very useful discussion happened here before on similar topic.

 

 

0 Kudos
Message 1 of 5
(3,034 Views)

I'm left to assume this is in the FPGA.  You really should have a wait in your loop to set your acquisition rate.


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 2 of 5
(3,009 Views)

Yes this is in the FPGA. Can you be little elaborate ? I want to know the Audio IN and OUT sampling rates !!! 

Thank YOu

0 Kudos
Message 3 of 5
(2,985 Views)

Anybody has a clue as to how to decide the sampling rate ?

 

Thank you.

0 Kudos
Message 4 of 5
(2,907 Views)

To decide the sampling rate - use timing in your loop!

 

If on the other hand you want to know why the sampling rate is what it is...

 

I would try to measure the delay of the individual operations - put a sequence structure around your read/write and add in a tick count before and after the read/write. It may also be that the time it takes for the myRIO to write to the DAC and for it to actually update the value are different and/or there might be some optimisation under the hood that allows you to get faster rates.

 

I would also try a simpler example of just having the read in a loop on it's own and measuring the loop time and doing the same for the write.

 

In any case - if you have an output sampling rate of 40Khz, then you should time your loop to 40kHz.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 5 of 5
(2,874 Views)