NI DAQ counter rate is slow with Matlab
2 views (last 30 days)
Show older comments
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();
0 Comments
Answers (0)
See Also
Categories
Find more on Simultaneous and Synchronized Operations 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!