Data Acquisition Toolbox | ![]() ![]() |
Queue data in the engine for eventual output
Syntax
Arguments
obj |
An analog output object. |
data |
The data to be queued in the engine. |
Description
queues the data specified by putdata(obj,data)
data
in the engine for eventual output to the analog output subsystem. data
must consist of a column of data for each channel contained by obj
.
More About Queueing Data
obj
is executed.
putdata
is a blocking function because it returns execution control to the MATLAB workspace only when the requested number of samples are queued in the engine for each channel group member.
RepeatOutput
property is greater than 0, then all queued data is automatically requeued until the RepeatOutput
value is reached. RepeatOutput
must be configured before start
is issued.
obj
executes, you can continue to queue data unless RepeatOutput
is greater than 0.
MaxSamplesQueued
property is reached, or the limitations of your hardware or computer are reached.
More About Outputting Data
NaN
is included in the data stream.
data
as the native data type of the hardware. Note that MATLAB supports math operations only for the double data type. Therefore, to use math functions on native data, you must convert it to doubles.
OutputRange
property, then the data is clipped.
SamplesOutput
property keeps a running count of the total number of samples that have been output per channel.
SamplesAvailable
property tells you how many samples are ready to be output from the engine per channel. After data is output, SamplesAvailable
is automatically reduced by the number of samples sent to the hardware.
Example
Create the analog output object ao
for a National Instruments board, add two output channels to it, and generate 10 seconds of data to be output.
ao = analogoutput('nidaq',1); ch = addchannel(ao,0:1); set(ao,'SampleRate',1000) data = linspace(0,1,10000)';
Before you can output data
, it must be queued in the engine using putdata
.
Functions
Properties
MaxSamplesQueued
, OutputRange
, RepeatOutput
, SamplesAvailable
, SamplesOutput
, Timeout
, UnitsRange
![]() | propinfo | putsample | ![]() |