デジタル出力による外部トリガを使用した場合、アナログ入力が開始されない場合があります。
Show older comments
外部トリガを使用してアナログ入力または出力 (ANALOGINPUT または ANALOGOUTPUT) をスタートさせようとしています。外部トリガ信号はデジタル出力の DIGITALIO オブジェクトを使用します。
dio = digitalio('nidaq', 'Dev1');
addline(dio, 4, 'Out'); %Addline 4
putvalue(dio, 0); %Set value to Lo.
% Include code for creating and setting up AnalogOuput (AO) object
% Include code for creating and setting up AnalogInput (AI) object
start([ai ao]);
pause(1);
putvalue(dio, 0); %Set value to Lo again.
pause(1);
putvalue(dio, 1); %Set value to Hi.
pause(31);
[data,time]=getdata(ai,1*fs);
しかし、以下のようなエラーとなります。
ERROR:
??? A timeout occurred during GETDATA.
Error ==> NL_AM_sin_external_trigger_FreqMeasur2_stereo2_2chInput_NI at 457
[data,time]=getdata(ai,1*fs);
Error event occurred at 17:53:33 for the object: nidaqmxDev1-AI.
A timeout occurred during GETDATA.
原因や対策を教えてください。
Accepted Answer
More Answers (0)
Categories
Find more on Analog Input and Output in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!