Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

Need help in NI6602/6259 counting in Matlab

$
0
0

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

 

 

 

 


Viewing all articles
Browse latest Browse all 1271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>