I solved this by setting up two sessions, one for analog and one for digital (I got the idea from http://au.mathworks.com/matlabcentral/answers/24757-daq-session-based-input-is-it-possible-to-have-different-clocks-for-input-and-output).
simultaneous digital and analog output using data acquisition toolbox
20 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sarah McIntyre
am 22 Apr. 2015
Beantwortet: Sarah McIntyre
am 23 Apr. 2015
Hello,
I am using a NI-DAQ 6216 with Matlab's Data Acquisition Toolbox. The device has two analog output channels and I need to use both simultaneously to output arbitrary waveforms. At the same time, I want to use a digital output to drive an LED that signals when the analog signals are produced.
I tried to follow this example using the session based interface: http://au.mathworks.com/help/daq/generate-signals-on-both-analog-and-digital-channels.html
s = daq.createSession('ni');
addAnalogOutputChannel(s,'Dev1',0:1,'Voltage')
addDigitalChannel(s,'Dev1','Port0/Line0','OutputOnly')
And I get the message:
Warning: A channel that does not support clocked sampling was added to the session. Clocked operations using startForeground and startBackground will be disabled. Only on-demand operations using inputSingleScan and outputSingleScan can be done.
So I can't use startForeground and startBackground, which I need to produce my analog outputs. Is there any way to do what I want?
Sarah
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Acquisition Toolbox Supported Hardware finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!