NI-PCI-6010 Sampling

4 views (last 30 days)
Baris
Baris on 19 Nov 2013
Commented: Sam on 8 Apr 2014
Hello,
I am using NI-PCI-6010 DAQ Device in order to acquire and generate signals. But I cannot use queueData command because of PCI-6010 doesn't support queuing on analog outputs, so that i cannot use startForeground or startBackground. I can only acquire and generate signals using singleOutputScan and singleInputScan.
My question is how can I send signals based on a sampling time. I have tried timer function as follows;
t = timer('TimerFcn', 'stat=false; disp(''Finish'')',...
'StartDelay',4);
start(t)
stat=true;
i=1;
while(stat==true)
dataAcquired(i,:)=s.inputSingleScan();
P1(i,1)=dataAcquired(i,1);
P2(i,1)=dataAcquired(i,2);
x(i,1)=dataAcquired(i,3)-dataAcquired(i,4);
% s.outputSingleScan(u(i));
pause(0.05)
i=i+1;
end
delete(t)
But instead of having 80 samples, I can only read data for 64 samples. This means that my timer works for 3.2 seconds instead of 4 seconds.
What is the problem, any ideas?
  1 Comment
Sam
Sam on 8 Apr 2014
Did you get anywhere with this problem? I am having a similar problem!

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!