Steve Blackmore wrote:
>
> I've no idea how, or if it's possible to average the encoder readout?
>
>   
The pastebin you showed indicated it is missing counts.  You say scope 
traces
indicate the encoder is working OK.  So, it has something to do with the 
way the
computer is reading the counts.  Averaging will only make a mess, if the 
original
counts are being dropped here and there.  I do not think, based on the 
pastebin, that
it is a sampling rate problem, due to the large variance in the 
numbers.  (I'm still
not real clear on what those numbers were, but they were quite 
consistent for a long
run, then suddenly there was a number with 50 - 100% variation!  If the 
numbers were all
+/- 10%, averaging might help.

I usually figure that you need a sampling rate at least 3 times the 
actual count rate, to
take care of the situations where the phase angle between the two 
channels isn't quite 90 degrees,
the duty cycles of the pulses are not quite 50% and all that hits right 
at the worst interval
between samples.  So, I rate my UPC and USC boards for 300 KHz encoder 
count rate, while they
are actually sampled at 1 MHz.  I have my own digital filter circuit 
that is designed to eliminate
false quadrature transitions, and part of that is limiting the sampling 
rate.

You have probably already given this info, but what is the max encoder 
count rate, and what is
the sampling rate (I assume BASE_THREAD)?

Jon


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to