NI-PCI-6010 Sampling
4 views (last 30 days)
Show older comments
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
Answers (0)
See Also
Categories
Find more on National Instruments Frame Grabbers in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!