Re: High Speed Encoder Problem
the problem is the time between updates can vary. In our c++ program we execute every 20 to 100 millisec. That means if we were doing the count divided by time there could be a 1-5 range of counts. The best thing to do is get the period of the last cycle. That will be in seconds and will not depend on the cycle time of the calls to the actual program.
For those with good control they used a a custom painted code wheel with one or three cycles to get the longest possible period with the highest quality of timer counts to calculate the speed.
__________________
Dave Cherba
Mentor Team 3234
WZ8T
|