The error is probably due to the fact that you have set TriggerConditions
set(AI,'TriggerChannel',chan(3));
set(AI,'TriggerType','software');
set(AI,'TriggerCondition','entering');
set(AI,'TriggerConditionValue',[10 10]);
I am not sure what the TriggerCondition entering stands for and what the Trigger Condition Value of [10 10] means. Could you further explain that? Should'nt TriggerConditionValue be a single number or a range?
So it is possible that your acquisition has not been triggered in the 15 seconds that you wait for it. A better check would be:
while(~AI.Logging)
disp('Waiting for trigger');
pause(1);
end
disp('Triggered');
wait(AI,duration*1.1);
...
But first ensure with your conditions, whether the acquisition is even getting triggered.
Best Answer