Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
高级会员
注册日期: 2019-11-21
帖子: 3,006
声望力: 66 ![]() |
![]() I currently have NI BNC-2110 connect to the NI USB-6255 which is then connected to my computer. The setup works when generating a digital signal and reading an analog when I use the software NI MAX, my problem is when I try and do the same thing in matlab. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% d = daq.getDevices addAnalogInputChannel(s,'dev1', 'ai0', 'Voltage'); q = daq.createSession('ni'); addDigitalChannel(q,'dev1','Port2/Line0:0','OutputOnly'); for p = 1:1:100
end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% My current results are an analog input of ~0 Volts, and what I expect is a square wave from my analog input. Any help on this would be much appreciated. Thank you, Avery More answer... |
![]() |
![]() |