Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: DAQ SamplesAvailable never >0 after getdata
Date: Fri, 12 Feb 2010 12:43:05 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 20
Message-ID: <hl3icp$75n$1@fred.mathworks.com>
References: <hks0ii$p3$1@fred.mathworks.com> <hkuaq8$mhm$1@fred.mathworks.com> <hkufls$802$1@fred.mathworks.com> <hl10di$eh7$1@fred.mathworks.com> <hl14sl$8rp$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1265978585 7351 172.30.248.37 (12 Feb 2010 12:43:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 12 Feb 2010 12:43:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 796075
Xref: news.mathworks.com comp.soft-sys.matlab:607542


Hi Dave,
Glad to have helped. Please see this page about real time and Data Acquisition Toolbox
http://www.mathworks.com/support/solutions/en/data/1-17G8J/?product=DA&solution=1-17G8J

Regarding:
> set(ai, 'SampleRate', 200);
> set(ai, 'SamplesPerTrigger', 12000);
> 
> mean that I won't get a SamplesAvailable > 0 until I have 12000 samples, even if it takes 61 or 62 seconds?

SamplesPerTrigger controls when the acquisition stops and not when the data is available.
If you start and trigger the acquisition shown above then pause 1 second and then execute:

ai.SamplesAvailable

you should see close to 200. It may not be exactly 200 because it will depend on what size blocks are being transferred between the adaptor and the engine (see ai.BufferingConfig, first number returned is the block size) 
http://www.mathworks.com/access/helpdesk/help/toolbox/daq/bufferingconfig.html

All the best,
Sherryl