RepeatOutput

Specify number of additional times queued data is output

Description

To send data to an analog output subsystem, it must first be queued in the data acquisition engine with the putdata function. If you want to continuously output the same data, you can use multiple calls to putdata. However, because each putdata call consumes memory, a long output sequence can quickly bring your system to halt.

As an alternative to putdata, you can continuously output previously queued data using RepeatOutput. Because RepeatOutput requeues the data, additional memory resources are not consumed. While the data is being output, you cannot add additional data to the queue.

Characteristics

Usage

AO, common to all channels

Access

Read/write

Data type

Double

Read-only when running

Yes

Values

The default value is zero.

Examples

Create the analog output object ao for a sound card and add one channel to it.

ao = analogoutput('winsound');
chans = addchannel(ao,1);

To queue one second of data:

data = sin(linspace(0,10,8000))';
putdata(ao,data)

To continuously output data for 10 seconds:

ao.RepeatOutput = 9

See Also

Functions

putdata

Was this topic helpful?