Main Content

queueOutputData

(Not recommended) Queue data to be output

This session object function is not recommended. Use DataAcquisition object functions instead. See Compatibility Considerations.

Description

example

queueOutputData(s,data) queues data to be output. When generating output signals, you must queue data before you call startForeground or startBackground.

Examples

collapse all

Create a session, add an analog output channel, and queue some data to output.

s = daq.createSession('ni');
addAnalogOutputChannel(s,'cDAQ1Mod2','ao0','Voltage');
queueOutputData(s,linspace(-1,1,1000)');
startForeground(s)
s = daq.createSession('ni');
addAnalogOutputChannel(s,'cDAQ1Mod2',0:1,'Voltage');
data0 = linspace(-1,1,1000)';
data1 = linspace(-2,2,1000)';
queueOutputData(s,[data0 data1]);
startBackground(s);

Input Arguments

collapse all

Data acquisition session, specified as a session object handle. Create the session object using daq.createSession. Use the data acquisition session for acquisition and generation operations. Create one session per vendor and use that vendor session to perform all data acquisition operations.

Output data values, specified as an m-by-n matrix of doubles, where m is the number of scans to generate, and n is the number of output channels in the session.

Version History

Introduced in R2010b

collapse all

R2020a: session object interface is not recommended

Use of this function with a session object is not recommended. To access a data acquisition device, use a DataAcquisition object with its functions and properties instead.

For more information about using the recommended functionality, see Transition Your Code from Session to DataAcquisition Interface.