I am attempting to acquire data using an NI PXI-6120 board using the Data Acquisition Toolbox 2.14 (R2009a). I am using an External Hardware Trigger to start the data acquisition. I am providing this trigger signal using a digital signal generated by a DIGITALIO object.
I am use the code-snippet below to perform the acquisition:
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);
However, when I execute this code, I receive the following 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.
My code appears to be correct. Why do I receive this error message?
Best Answer