NI DAQ counter rate is slow with Matlab

3 visualizzazioni (ultimi 30 giorni)
Jeson
Jeson il 19 Mag 2014
Hey,
I have NI 6602 and NI 6259 for counting, and I found out the counting rate I can achieve is a lot slower than testing with NI MAX. The counter output is routed externally to gate the counter input, and its frequency is set to be equal to counter input rate. Both cards, I can achieve 2 MS/s on NI Max. However, I only got 500 kHz with NI 6602 and 30kHz with NI 6259. Why is that? (If I increase the rate to higher value, the error message "data is overwritten before it can be read out" pops up.) Codes:
s= daq.CreateSession('ni'); s.addCounterInputChannel('Dev1', 'ctr0', 'EdgeCount'); ch= addCounterOutputChannel('Dev1', 'ctr1', 'PulseGeneration'); s.addClockConnection('External', 'Dev1/PFI9' , 'ScanClock'); s.Rate= 500000; ch.Frequency=500000; data=s.startForeground();

Risposte (0)

Categorie

Scopri di più su Data Acquisition Toolbox Supported Hardware in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by