NI DAQ counter rate is slow with Matlab

4 visualizaciones (últimos 30 días)
Jeson
Jeson el 19 de Mayo de 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();

Respuestas (0)

Categorías

Más información sobre Data Acquisition Toolbox Supported Hardware en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by