Path: news.mathworks.com!not-for-mail
From: "Jonas " <callfrombeyond@web.de>
Newsgroups: comp.soft-sys.matlab
Subject: delay getdata, start(analoginput)
Date: Mon, 28 Sep 2009 15:27:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <h9qkk6$bj5$1@fred.mathworks.com>
Reply-To: "Jonas " <callfrombeyond@web.de>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1254151622 11877 172.30.248.35 (28 Sep 2009 15:27:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 28 Sep 2009 15:27:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2009664
Xref: news.mathworks.com comp.soft-sys.matlab:573399


Hi, I'm using the data acquisition toolbox to continuously sample from an analog input channel of a National Instruments card. However, there seems to be a varying delay of at least 40 ms between signal change and matlab response. This is due to the functions "start(ai)" and "getdata(ai)". Is there a way to speed up the acquisition, maybe by changing the analog input object configuration? My current configuration is as follows:
 
SampleRate: 10000
SamplesPerTrigger: 2

I'm looping through following code:

                start(ai)
                pause(0.001);
                data = mean(getdata(ai));
                stop(ai)

Thx for any response.

Jonas