SamplesPerTrigger - Specify number of samples to acquire for each channel group member for each trigger that occurs

Description

SamplesPerTrigger specifies the number of samples to acquire for each analog input channel group member for each trigger that occurs. If SamplesPerTrigger is set to Inf, then the analog input object continually acquires data until a stop function is issued or an error occurs.

The default value of SamplesPerTrigger is calculated by the data acquisition engine such that one second of data is acquired. This calculation is based on the value of SampleRate.

Characteristics

Usage

AI, Common to all channels

Access

Read/write

Data type

Double

Read-only when running

Yes

Values

The default value is set by the engine such that one second of data is acquired.

Examples

Create the analog input object ai for a sound card and add two channels to it.

ai = analoginput('winsound');
addchannel(ai,1:2);

By default, a one second acquisition in which 8000 samples are acquired for each channel is defined. To define a two second acquisition at the same sampling rate:

set(ai,'SamplesPerTrigger',16000)

See Also

Functions

stop

Properties

SampleRate

  


 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS