Hi,
NI 6259 supposed to be a upgraded version of NI 6602, but why do I got faster count rate with NI 6602
than NI 6259 in Matlab?
In the spec, both cards has the same 80MHz clock/timer frequency and they both acheive 2MHz data acquiring rate in NI Max.
However, the fastest rate I can accuire data is 500 kHz for NI6602/ 30 kHz for NI 6259 in Matlab. If I try to increase rate and frequency above these numbers, the error message 'Data is overwritten before it can be read by the system...' pops up.
Could someone please help me to improve the performance of these NI counting cards in matlab?
I am using matlab session based interface with the following codes for both cards:
% the matlab codes start here
s=daq.createSession('ni');
s.addCounterOutputChannel('Dev1', 'ctr1' ,'PulseGeneration');
s.addCounterInputChannel('Dev1', 'ctr0' ,'EdgeCount');
s.addClockConnection('External', 'Dev1/PFI9', 'ScanClock');
s.Rate=500000; s.Frequency=500000;
data=s.StartForeground();
% the end of the matlab codes