(Not recommended) Queue data to be output
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);
s— Data acquisition session
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
data— Output data values
Output data values, specified as an
n matrix of doubles, where
m is the number of scans to generate, and
n is the number of output channels in the
sessionobject interface is not recommended
Not recommended starting in R2020a
Use of this function with a
session object is not recommended. To
access a data acquisition device, use a
with its functions and properties instead.
For more information about using the recommended functionality, see Transition Your Code from Session to DataAcquisition Interface.