Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

queueOutputData

Queue data to be output

Syntax

queueOutputData(s,data)

Description

example

queueOutputData(s,data) queues data to be output. When using analog output channels, 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.

Introduced in R2010b

Was this topic helpful?