> -----Original Message----- > From: Jon Elson [mailto:el...@pico-systems.com] > Sent: March-19-20 4:13 PM > To: Enhanced Machine Controller (EMC) > Subject: Re: [Emc-users] A hal question? > > On 03/19/2020 04:02 PM, Gene Heskett wrote: > > Greetings; I am trying to reduce the f/r error in an ATS667 based > > encoder. > > > > The index pulse is turned upside down by a reversal of spindel > > direction. Tts the nature of the beast to remain in this stable state > > until the approach of the triggering ferrous metal causes the first > > reversal which the edge ignores, and then goes back true or false as the > > ferrous piece crosses the center. > > > > > > > > Does anyone see any problems with that? > The index pulse is only used during the initial synch to the > spindle, then the encoder is counted > up and down during reversals, without looking at the index > again. So, rigid tapping doesn't care > that the index signal from the encoder does something > different when the spindle is running in > reverse. It has been this way since I did the first ATS667 > encoder hack some years ago. > > Jon
So can you tell me something more about that? I could see that first encoder index edge clearing a a quadrature counter attached to the A/B pins. After that the index is ignored. But it's here where I become a bit confused. A 60 tooth gear at 1200 RPM produces 7200 edges per second or 1 about every 139 microseconds. Say we're rigid tapping 8 threads which means a total of 57600 pulses. If the hardware counter is 16 bit signed that's larger than the 32767 before the counter rolls over. If it's a 32 bit counter it's not an issue. But what happens when someone has a 2500 line encoder on the spindle creating 10,000 edges per rev. or 200,000 edges per second at 1200 RPM. Now that 8 threads deep hole is 1.6million. Again, not an issue with a 32 bit signed counter but a problem with a 16 bit. Finally, at that speed, and an edge every 5 micro seconds, how does the software ever figure out that the spindle is varying in speed? Or is one of the real time threads running maybe only 1 kHz actually look at the spindle counter and compare it to what they expect every 1mS and then adjust the speed of the Z axis? Thanks John > > > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users