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

Missing/duplicate readings in a 6602?

$
0
0

I have a 6602 and I have it collecting 2 trains of edge time stamps (ticks) simultaneously.  I have 2,500 line encoders, running 100 RPM.  4.1666kHz or .24ms period.  4 rotations, so 10,000 ticks per encoder.  I have synchronized the channels to both have the same start trigger.  The routine I use is the BeginMemoryOptimizedReadMultiSampleDouble in c#.

 

I am measuring the difference between the 2 encoders.  I have been chasing an error in the data I have been getting for a while and realized today what I am seeing... To find the problem I put both NI channels to the same encoder.  The expected output is to have 2 identical pulse trains.  What  I see is identical readings (+/-1 tick) for the first ~180 rows, but after 180 readings they get offset by 1 period (2,400 ticks)  and then later around row 356, the offset increases.  Just before, during, or right after these transitions, I see repeating time stamp/ticks (example: instead of 12,000, 14,400, 16,800 I see something like 12,000, 12,001, 12,002).  At the end of the data, row 10,000 the offset has increased to 126,000 ticks.

 

What I think is happening is one of the channels is using the same tick at the end of one buffer as the start of another.  Then, at the end instead of 2 sets of 10,000 points, it has one of 10,000 and one of 10,200 and then truncates it to return 2 sets of 10,000.

 

How can I stop this?

 

Thanks for reading, you guys have been life savers in the past.


Viewing all articles
Browse latest Browse all 1271

Trending Articles



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