<< mdaqAIScanStop Data acquisition mdaqAIScanTrigger >>

MicroDAQ toolbox >> MicroDAQ toolbox > Data acquisition > mdaqAITask

mdaqAITask

Creates AI task object

Calling Sequence

obj = mdaqAITask()

Description

This function creates AI task object which gathers all functions used for data acquisition from analog inputs. The function does not introduce new functionality, it wraps existing API into an object-like code and allows to write more readable and compact code. In order to get function list which can be used with object display its content.

The following calling convention applies:

Output arguments

Examples

Acquire data from AI1 for one second with 1000 samples per second rate

ai = mdaqAITask(); 
ai.init(1, [-10, 10], %f, 1000, 1);
ai.start(); 
data = ai.read(1000, 2);
plot(data)

Start data acquisition from AI1 analog input when DIO8 is high. Acquire data for one second with 1000 samples per second rate

ai = mdaqAITask(); 
ai.init(1, [-10, 10], %f, 1000, 1);
ai.trigger("dioPattern", "xxxxxxx1");
ai.start(); 
data = ai.read(1000, 2);
plot(data)

See Also


Report an issue
<< mdaqAIScanStop Data acquisition mdaqAIScanTrigger >>