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?
採用された回答
その他の回答 (1 件)
Sulaymon Eshkabilov
2020 年 8 月 14 日
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
カテゴリ
ヘルプ センター および File Exchange で Data Acquisition Toolbox Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!