problems using Start in Data Acquisition script

I have a very basic script here. im running Matlab 2020a with the Data Acquisition Toolbox installed to gather data from a NI USB 6289 DAQ. the code is below
clear all
d = daq("ni");
ch1=addinput(d, "ThunderdomeDAQ", "ai0", "Voltage");
start(d)
data=read(d);
pause(5);
stop(d);
however, every time i run the code, it returns an error for the line start(d) is on. the error says:
Unrecognized method, property, or field 'doWriteDataLastBlock' for class 'daq.ni.ChannelGroupAnalogInput'.
it returns the same error if i use start(d,"Continuous") as well. also, if i use data=read(d, seconds(1)) instead of start(d).
anyone have any ideas?

 채택된 답변

scott siler
scott siler 2020년 9월 4일
편집: scott siler 2020년 9월 4일

0 개 추천

finally resolved this issue with Tech Support's help. they were surprised about the answer as well. so, i set the name of my DAQ to 'ThunderdomeDAQ', which it has been for years, and worked fine on Matlab 2018a. i recently updated my software to Matlab 2020a and apparently in 2019 or 2020, something was changed in the software. Now if you change the name of your DAQ to anything including 'do', your program will not work. it really is as simple as that. i changed the name to "Thunderd0meDAQ' and it works.

추가 답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2020년 8월 14일

0 개 추천

Hi
Maybe you should add data rate, e.g.:
D = daq("ni");
D.Rate = 5000;
addinput(D, "ThunderdomeDAQ", "ai0", "Voltage");
D.Rate = 5000;
data=read(D, seconds(5)); % Collect data for 5 sec

댓글 수: 1

thanks for the response Sulaymon.
just tried it. no change. still throws the same error response for the line data=read(D, seconds(5));

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Data Acquisition Toolbox Supported Hardware에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2020년 8월 14일

편집:

2020년 9월 4일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by