Documentation Center

  • Trials
  • Product Updates

SamplesOutputFcn

Specify callback function to execute when predefined number of samples is output for each channel group member

Description

    Note:   You cannot use the legacy interface on 64–bit MATLAB®. See Session-Based Interface to acquire and generate data.

A samples output event is generated immediately after the number of samples specified by the SamplesOutputFcnCount property is output for each channel group member. This event executes the callback function specified for SamplesOutputFcn.

Use SamplesOutputFcn to trigger an event each time a specified number of samples is output. To process samples at regular time intervals, use the TimerFcn property.

Samples output event information is not stored in the EventLog property. When the callback function is executed, the second argument is a structure containing two fields. The Type field value is set to the string 'SamplesOutput', and the event Data field values are given below.

Data Field Value

Description

AbsTime

The absolute time (as a clock vector) the event occurred.

RelSample

The output sample number when the event occurred.

Characteristics

Usage

AO, common to all channels

Access

Read/write

Data type

String

Read-only when running

No

Values

The default value is an empty string.

See Also

Properties

EventLog, SamplesOutputFcnCount

Was this topic helpful?