Andy Pugh wrote: > 2009/10/4 Gene Heskett <gene.hesk...@gmail.com>: > > >> That looks better, but something is still giving the encoder.0.velocity a big >> kick occasionally. >> > > I think those are on the occasions that both channels change state in > the same sample. That does mean infinite velocity, after all. (Does > the encoder code cap velocity at 1/base thread frequency?) > > I suspect that is due to aliasing and the short duty-cycle of the A > channel. Occasionally you get unlucky with the sample frequency and > catch both changing at the same time. > That represents an illegal transition, and should be rejected. At the worst case, it could trick the logic into altering the position by 4 counts. If there is a burst of noise on both A and B at the same time, it could maybe cause more counts than that to accumulate. Have you tried putting pull-up resistors on the A and B lines? I think you have made progress, but it looks like this is not yet working well enough for machining.
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