(Not recommended) Generate single scan on all output channels
Output a single scan on two analog output voltage channels
Create a session and add two analog output channels.
s = daq.createSession('ni'); addAnalogOutputChannel(s,'cDAQ1Mod2',0:1,'Voltage');
Create an output value and output a single scan for each channel added.
Output one value on each of two lines on a digital channel
Create a session and add two digital channels from port 0 that measures output only:
s = daq.createSession('ni'); addDigitalChannel(s,'dev1','Port0/Line0:1','OutputOnly')
Output one value each on the two lines:
s — Data acquisition session
Data acquisition session, specified as a session object. 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 — Data to output
Data to output, represented as a 1-by-
n matrix of
n is the number of output channels in the
session object 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.