Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Acquisition Toolbox

I need to acquire high speed,44.1kHz, continuous data acquisition from a microphone connected to NI-USB 9233 daq. I will be recording continuous acoustic data over a number of weeks. However I do not want any loss of samples while writing to disk periodically.
 
I realise it is easy to acquire 1 second of acoustic data on one sound card channel using analoginput etc. and then getdata to import the data into matlab. But how is it possible to continuously acquire data, write to disk periodically, without loss of samples.
 
Thank you
0 Kudos
Message 1 of 4
(3,396 Views)

The usual method for continuous acquisition is the so called double-buffering: you define a buffer on the system to store acquisition data to; this buffer is ideally divided in two halves: while the system is collecting measures and filling the second half you can retrieve the first half and handle it / store to disk. next the system comes back to fill the first half and you store on disk measures filed in the second half. This system can be repeated indefinitely, provided the buffer is dimensioned so that when a half is filled your operations on the other half are already terminated so that there is no risk of overwriting data.

Now, actual implementation of ths schema depends on the language you are using; in any case, when you install DAQ software a lot of examples are downloaded on disk in samples\daq or samnles\daqmx folders: you can study those samples or even use them as a framework for your own application.

Message Edited by Roberto Bozzolo on 06-29-2006 12:31 AM



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(3,387 Views)
I would recommend contacting MathWorks for support on the Data Acquisition Toolbox as it is their product.
0 Kudos
Message 3 of 4
(3,364 Views)
Thanks for the advice.
 
Using Mathworks DAT: Setting samples per trigger to 'inf', acquires data to buffer and then performing a 'getdata', which is a blocking function (blocks until data is acquired) works fine as long as the system bus is fast enough to prevent overflow.
 
0 Kudos
Message 4 of 4
(3,361 Views)