From: Si Ping Wang on
Hello,
I am now reading analog input from a NI board. I am able to get a certain number of samples within a specified period, but how to get the data continuously and display them on a graph? Thanks.

Siping
From: Sherryl Radbil on
Hi Siping,

There is a new demo with Data Acquisition Toolbox in R2010a that shows this.
It is called: Continuous Acquisition Using Analog Input

To see it, in MATLAB R2010a and later execute:

>> showdemo('demoai_continuous')

See especially the section: Continuously Acquire Data until a Particular Condition Occurs

which uses
set(ai,'SamplesPerTrigger',Inf);
to set up the continuous acquisition.
A timer callback is also demonstrated. It looks for a particular condition and then stops the acquisition.

Via the web view the demo here:
http://www.mathworks.com/products/daq/demos.html?file=/products/demos/shipping/daq/demoai_continuous.html

All the best,

Sherryl