LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in DAQ while listening audio during data acquisition

 

Hello!

Hope all is well.

We have data acquisition system consist of 1042Q chessy, NI-8176 controller, NI-4472 & NI-6052E cards. By using S&V tool kit we acquire 4 channel data remotely on host PC. Using labview 2015.

Sensor on those channels are microphone.


We made few change in our existing code. By using low level vi we implemented sound write on our code to listen real time data on speakers simultaneously, took audio feed from the same place where real time data display.

Now the problem is that during listening on speaker a noise of 10Hz appears on realtime data which is unacceptable. Also real time data play and record 10 times slowly.


Thank and regards

Eaily Raza

Manager 

 

 

0 Kudos
Message 1 of 8
(1,310 Views)

You made changes to code that caused a problem.

 

But you didn't attach any code for anyone to look at to see what the issue might be.

0 Kudos
Message 2 of 8
(1,303 Views)

Hello!

Hope all is well.

We have data acquisition system consist of 1042Q chessy, NI-8176 controller, NI-4472 & NI-6052E cards. By using S&V tool kit we acquire 4 channel data remotely on host PC. Using labview 2015.

Sensor on those channels are microphone.


We made few change in our existing code. By using low level vi we implemented sound write on our code to listen real time data on speakers simultaneously, took audio feed from the same place where real time data display.

Now the problem is that during listening on speaker a noise of 10Hz appears on realtime data which is unacceptable. Also real time data play and record 10 times slowly.


Thank and regards

Eaily Raza

Manager 

 

0 Kudos
Message 3 of 8
(1,231 Views)

Hello!

Hope all is well.

We have data acquisition system consist of 1042Q cheesy, NI-8176 controller, NI-4472 & NI-6052E cards. By using S&V tool kit we acquire 4 channel data remotely on host PC. Using LabVIEW 2015.

Sensor on those channels are microphone.


We made few change in our existing code. By using low level vi we implemented sound write on our code to listen real time data on speakers simultaneously, took audio feed from the same place where real time data display.

Now the problem is that during listening on speaker a noise of 10Hz appears on realtime data which is unacceptable. Also real time data play and record 10 times slowly.


Thank and regards

Eaily Raza

Manager 

 

0 Kudos
Message 4 of 8
(1,234 Views)

Hi, @riz10riz,

 

You have attached pictures of the code - that's a start.

 

However, there are many experts here that will choose not to help debug code if they cannot access the actual code.

(It's like asking for help in a text-based programming language and attaching a screenshot of the code - not super useful.)

 

Can you attach both the Old and New VI(s)?

 

 

 


We made few change in our existing code.

Considering that you made some changes in the code, the issues probably come from the changes you made. 😉

 

Now the problem is that during listening on speaker a noise of 10Hz appears on realtime data which is unacceptable. Also real time data play and record 10 times slowly.


But speaking seriously, adding operations to a While loop could cause the While loop to run slower. And that change in timing might somehow introduce noise, too.

Also, if you're using microphones and now you're adding speakers... could there be some audio feedback? (I would expect *something* if the microphones are not perfectly isolated, though it may be minimal, and it doesn't seem likely that it would be the source of the 10Hz noise.)

 

-joeorbob

0 Kudos
Message 5 of 8
(1,206 Views)

Thanks for reply

code vi will definitely be share.

 

i last attachment change in code along-with change in result is mention via screen shoots. 

0 Kudos
Message 6 of 8
(1,173 Views)

Writing to the sound output is a relatively expensive operation and to make matters worse also a synchronous operation in the way you use it. So while your sound output is generating data the loop just sits there locked up and can't continue until that is finished and then has probably missed some data on the input already.

 

You do want to wire a constant to the timeout value, so the function will return even if the data has not been all written to the output. This timeout value needs to be lower than the time of the sample buffer you want to read as that is the loop timing that must be met. It could be even 0 but that might not be necessary. And you might need to investigate the error code from the Sound Write VI and clear the error code that indicates that the ouput of the buffer has not been finished yet.

 

Also you should probably configure the sound output buffer to be at least twice the amount you write in one loop iteration, just to be safe.

 

If that all doesn't help, you need to separate the receiving of data and writing to sound output into two separate loops and transfer the data to the output loop through a queue or similar to decouple them in time  from each other.

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 8
(1,167 Views)

Hello!

 

In continuing with previous discussion project code is also shared.

Please refer the following vis:

HOST (NEW).vi

HOST (OLD).vi

all other thing remain same, nothing change on it.

 

Thanks n Regards,

Eaily Raza

0 Kudos
Message 8 of 8
(1,136 Views)