LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to a sound card causes delay in analog input?

We have a pressure input and are transferring this voltage to a frequency. We write this frequency to the sound card using SO_Write.vi. This vi is located in the attached file (development.vi) in sequence 5, case 2. The actual writing to the sound card causes a delay in the analog input, thus causing the analog input to blip (or delay). This causes the digital output (text file) to skip along with the sound we hear from the sound card. We would like to get rid of the blip (delay).


We use LabView 7.0, Windows 2000.

Thank you very much for your help. 🙂
0 Kudos
Message 1 of 2
(2,627 Views)
Hi,

This looks like a producer-consumer problem; for applications that you have 1 resource that generates data and then it is sent to another resource it can get complicated to sincronize since the time it takes for the DAQ or Sound operations is not constant.

My suggestion here would be to have 2 parallel loops running at the same time and communicating through a queue. There are a good number of examples in the example finder.

Basically you can setup a loop with the AI read that sends the data to the queue; then you launch another loop that reads the data from the queue and plays it back.

I hope this helps.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(2,627 Views)