Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating audio signals from USB-6353

I'm using the DAQmx driver package with an 'ANSI C' application (MS VisualStudio 2005).

 

The application is audio signal generation and capture.  I'm working on the generation portion at the moment.  My application will use either on the DSA module such as the PCI-4461 OR one of the DAQ series of modules such as the USB-6353.  The selection is predicated on the type of audio testing.

 

The sample rates will top-out at around 48kSamples/sec.  More likely I'd be operating in the 25 to 30 kSamples/sec range.

 

I need to synthesize a two channel audio signal using two AO channels.  One functon is to create periodic waveforms.  This is simple and will most likely use 'regenertion mode' with the entire set of samples resident in the on-board FIFO.

 

Another very important function is the generation of one 'background' signal (e.g. low level pink noise) with a second signal mixed onto the noise on demand.  One DAQ AO channel will generate this background noise signal and then a test script will request that a second signal be injected onto this background signal.  A second AO channel might be generating an independent noise signal.  I hope everyone understands the application.

 

I have most of the functionality working or nearly working.  My single AO task will use buffered mode along with the 'EveryNSamplesEvent' callback to generate the signal(s).  Upon an external request, a second signal will be arithmetically mixed into the backgroup signal.

 

OK, here's the real question:  How do I assure absolute lowest latency between the external 'signal request event' and the generation of this signal on the AO line??  Both the host-side buffering and the onboard FIFO will serve to lengthen this latency.  There are some FIFO controls and host buffer size controls.  Should I create a VERY small host buffer?  Should I setup the FIFO to load from the host buffer as often as possible?  Does the USB-6353 even provide these functions?  Can I even use a USB DAQ module to perform this opertion?  Or should I move to a PCI or PCI-E module?  (The USB-6353 is only on loan from NI...  Thanks!!).

 

Any thoughts?  If I can't create a very small latency, then the next best thing is a longer but deterministic latency.  In other words, it's OK if the latency is a fixed N mS.  But NOT OK if the latency varies.

 

Thanks.

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

Hello ecborgoyn,

 

Determinism on traditional Operating Systems is tricky.  Typically, when deterministic operation is critical to an application's success, we direct customers towards an embedded platform.

 

http://zone.ni.com/devzone/cda/tut/p/id/13047

 

I realize that purchasing new hardware and refactoring existing code isn't always an option, so we might not be able to make any deterministic guarantees, but we can minimize variations in latency.

 

If variable latency is unacceptable, I would recommend against using a USB-connected instrument.  Latency on the USB bus is notoriously system dependent, and "power saving" features present in some operating systems can create additional issues for a USB device.  You will get more predictable results using the PCI 4461 you have on hand.  

Matthew H.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,519 Views)