session-based DAQ won't let me add analogoutput channel (windows 7, NIDAQ 6009)
이전 댓글 표시
I am trying to add an analog output channel, and even though I follow the documentation example carefully, no joy. It's only 2 lines of code - what is going wrong? I'm using the NIDAQ USB 6009 interface. Analog input works great. Thanks!
DOCUMENTATION: (“Generate Analog Output Signals”)
- s = daq.createSession('ni');
- addAnalogOutputChannel(s,'cDAQ1Mod2',0,'Voltage')
ans =
Data acquisition session using National Instruments hardware:
No data queued. Will run at 1000 scans/second. Number of channels: 1
index Type Device Channel MeasurementType Range Name
----- ---- --------- ------- --------------- ---------------- ----
1 ao cDAQ1Mod2 ao0 Voltage -10 to +10 Volts
Specify the channel ID on NI devices using a terminal name, like 'ao1', or a numeric equivalent like 1.
I GET THIS:
- s = daq.createSession('ni');
- addAnalogOutputChannel(s,'Dev1',0,'Voltage')
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.
ans =
Data acquisition session using National Instruments hardware:
Clocked operations using startForeground and startBackground are disabled.
Only on-demand operations using inputSingleScan and outputSingleScan can be done.
Number of channels: 1
index Type Device Channel MeasurementType Range Name
----- ---- ------ ------- ------------------- --------------- ----
1 ao Dev1 ao0 Voltage (SingleEnd) 0 to +5.0 Volts
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Data Acquisition Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!