LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Soundcard acquisition without delay

Hello friends,

I have write a GUI in C++ and controlling it through the external signals, acquired using sound card in LabVIEW. Its working well but the I am facing two problems:

1> The soundcard acquisition in LabVIEW introduces a delay. It doesn't seem realtime. When I send the signal, it appears in LabVIEW after a edlay.

2> Acquired signal is compared with a threshold and an operation is done. Sometimes the threshold comparison doesn't work despite the signal amplitude is more than the threshold.

My VI is attached, created in LabVIEW 2010.

I want to do the realtime acquisition (with no delay) with soundcard just as DAQ devices do.

Thank you.

Muhsin Ali

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

Your problem is probably that you are using the sound acquire express VI and not the sound acquisition VIs.  At every iteration, the Express VI initializes the sound interface, takes a set of data, then closes the interface.  The initialization is probably causing the delay you are seeing.  If you open the front panel of the Express VI (right click, Open Front Panel) , you will be able to open the VIs and find out what it is actually doing.  Put the initialize and close/cleanup VIs outside the loop and only the acquire VIs inside the loop.  Use shift registers to feed the reference and error wires through.

 

Out of curiosity, why did you implement the GUI using C++.  LabVIEW works quite well for GUIs (see this, for example).  Having done it both ways, I can assure you that tightly coupling your GUI and acquisition is easier if you stick with one language.

0 Kudos
Message 2 of 2
(2,700 Views)