08-12-2011 01:51 PM
I am measuring the angular speed of a rotating shaft with a linear encoder setting. I had expected this counter to reset at 16bits, but does not appear to have done so. How high can the counter go before it resets?
I will be out of the office next week. Please copy qiaoqiao.wang@voith.com on any replies.
Thank you.
Eric
08-15-2011 11:35 AM
Eric,
Thank you for using the forums. You are correct the counter should reset at 16 bits which would bed 2^16 -1 which is 65535. What are you seeing the counter reset at?
Another good test for this would be a test panel for the device and do edge counting there. Using the 20 or 80 Mhz clock you can count this very quickly to see where the rollover occurs.
Finally, what device are you using?
Regards,
Brian P.
08-15-2011 12:06 PM - edited 08-15-2011 12:13 PM
To the original poster--
What hardware are you using? Almost all of NI's DAQ products have higher than 16-bit counters. For example:
32-bit Counters:
M Series (62xx)
X Series (63xx)
TIO (660x, 6624)
CompactDAQ
24-bit Counters:
E series (60xxE)
The only products that have 16-bit counters are very old pre-E Series DAQ cards that are have been EOL'ed by NI. Like E Series, these devices wouldn't support direct quadrature encoder measurements anyway, so if I had to guess you're probably using a device with a 32-bit counter.
Best Regards,
08-16-2011 02:51 AM
Encoders have a number of pulses per revolution (linear: per mm) . The quadratur encoder (the name give a hint 😉 ) will count 4 times per pulse (since is uses every edge of the two 90° shifted outputs).
So the time to a counter rollover is T_minutes=2^(counterbits-1)/RPM*4*<pulse/rev>
08-16-2011 12:08 PM
Henrik is correct, but if you'd like you can set the mode to something other than the (default) X4 mode:
The counter will still roll over whenever you hit a count of 2counterbits. For newer NI DAQ devices, this would be 232. The rate at which you count depends on speed and ppm of your encoder and what decoding type you are using.
Best Regards,