Data Acquisition Toolbox
  Function/Property:
    Search    Help Desk 
getsample    Examples   See Also

Return one sample for each analog input channel group member or digital I/O line group member.

Syntax

samples = getsample(obj);

Description

samples = getsample(obj) immediately returns a row vector containing one sample for each channel group member contained by obj. The samples returned are not removed from the data acquisition engine.

Unlike getdata, getsample does not depend on data existing in the data acquisition engine. The function can be executed at any time after channels have been added to obj, and Running does not have to be On.

Using getsample is a good way to test your analog input configuration before issuing start.

Note:
getsample is not supported for sound cards.

Example

National Instruments

Suppose you create the analog input object ai and add 8 channels to it.

The following command returns one sample for each channel.

See Also

Functions

getdata, peekdata



[ Previous | Help Desk | Next ]