On 27 Mar 2017, at 20:02, Charles Steinkuehler <[email protected]> wrote:
> > The way it's intended to work: > > * The PRU sees an index pulse > ** The PRU latches the current position (Encoder.Z_capture) > ** The PRU increments the index count (Encoder.Z_count) > * The ARM driver reads the index count and if it's changed, handles > updating things if index-enable is set > > It looks like it's just the ARM side that needs some fixup (probably > some conditional behavior based on the index-enable pin), the only > code doing anything with index is here: > > https://github.com/machinekit/machinekit/blob/master/src/hal/drivers/hal_pru_generic/encoder.c#L204-L207 > Thanks for the steer Charles, I couldn’t make any sense of what those 3 lines where trying to achieve so I watched the rawcount and count pins whilst turning the spindle by hand and found that count was only updated once per revolution and that turning the spindle backwards resulted in a big negative jump in count, so I concluded that they where doing nothing useful and have removed them. I’ve implemented index support based loosely around the hm2 driver, i’ve done some quick tests cutting air and it seems to be working correctly; I’ve got a bunch of parts to make involving rigid tapping and thread cutting, If that works successfully I’ll raise a pull request and workout what I need to do to get the documentation updated. Whilst I have a build environment working I regressed commit 846e8b2 and re-tested the eQEP driver, without that commit the driver seems to be working correctly for me - I’ll stick with the PRU driver for now but if I get some spare time I’ll try and work out why that commit doesn’t work for me. Regards Russell -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
