> -----Original Message-----
> From: Sam Sokolik [mailto:samco...@gmail.com]
> Sent: March-20-20 11:25 AM
> To: Enhanced Machine Controller (EMC)
> Subject: Re: [Emc-users] A hal question?
>
> You guys think too much.. 38 tooth gear..
>
> https://youtu.be/E2t0y2EsSO8?t=487
>
>
I love that video. Demonstrates so well that when you have a stable (or should
I say STMBL) Spindle motor speed that a lot of encoder pulses are not needed.
That's why threading on a lathe can work with one PPR.
How fast was the spindle turning for that video?
Where the extra pulses really shine is when the tap has to decelerate and then
accelerate back up to speed in the reverse direction.
Now pretend you had 36 teeth or 10 degrees per tooth. If we're tapping 20 TPI
then each turn is 0.050" divided by 36 is 0.001388899" But since it's
quadrature we're evaluating spindle speed 4x that rate so now it's 0.000347222"
per encoder pulse. That means even if the spindle speed change is detected
from one encoder pulse to the next the distance travelled by the Z during that
time is only 0.000347222" and theoretically Z velocity adjusted for the next
0.000347222"
It also means that if you have set 20 TPI that turning the spindle by hand
should have Z tracking perfectly even with huge variations while turning the
wrench or whatever.
Or I've screwed up big time on the math. And there's the crux of it. The time
to do the math and change the Z step rate probably also takes longer than the
time to move the spindle 10/4 degrees so in fact the spindle speed tracking is
likely much slower than every 10 degrees.
John
> On Fri, Mar 20, 2020, 1:13 PM Gene Heskett <ghesk...@shentel.net> wrote:
>
> > On Friday 20 March 2020 12:12:06 John Dammeyer wrote:
> >
> > > > > 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.
> > > >
> > > > Not an issue, the 16 bit hardware count is extended to 64 bits in
> > > > the driver (every servo thread) this does limit you to a 16 MHz
> > > > maximum count rate at a 1 KHz servo thread but thats way above the
> > > > capabilities of most encoders...
> > >
> > > So let's see if I have the math right. At 16MHz we have an edge every
> > > 0.063 MicroSeconds. At most then we'd see 16,000 in a hardware 16 bit
> > > register ever 1 millisecond (the 1 khZ servo rate). This value is
> > > added to a 64 bit integer. Is the hardware counter cleared again? If
> > > not 1 mS later it would be 32,000 which is still positive. But on the
> > > next 1 mS check it's now 48,000 which is -17536 as a signed number and
> > > adding that
> > >
> > > There are probably hardware quadrature encoder counters that can be
> > > set to latch the value on command and clear the counter? I haven't
> > > checked the encoder on the BeagleBone for example to see if it has
> > > that feature. Certainly your FPGA stuff can be set up to do that.
> > >
> > > As the spindle reverses that counter value drops and eventually
> > > becomes negative when B now leads A.
> > >
> > > Have I got that right?
> > >
> > > And if so, is there a minimum number of encoder pulses one can have
> > > per revolution before the tracking becomes flaky?
> > >
> > > John
> > >
> > I have heard of usable threads being cut with one, but i'd have to assume
> > it was being done on machinery with otherwise very stiff spindle speeds
> > that were stiff enough to ignore the taps loading. Probably a
> > synchronous motor on a vfd and not all are by any means. Far more are
> > induction mode with a load dependent slip angle, and that categorically
> > won't work without an encoder accuracy of 2 degrees or better.
> >
> > > > > 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?
> > > >
> > > > Yes, the Z axis is "geared" to the spindle position
> > More precisely to the spindles rotational position
> >
> > With my Sheldon turning 300 rpms, thats 5 rps. its a 60 tooth or 240
> > edges gear. 1200 edges a second=a new position 1200x a second. A new
> > position every .8333333 miliseconds thats accurate to 1.5 degrees of
> > spindle rotation.
> > > > > Thanks
> > > > > John
> > > >
> > > > Peter Wallace
> > > > Mesa Electronics
> > > >
> >
> > Cheers, Gene Heskett
> > --
> > "There are four boxes to be used in defense of liberty:
> > soap, ballot, jury, and ammo. Please use in that order."
> > -Ed Howdershelt (Author)
> > If we desire respect for the law, we must first make the law respectable.
> > - Louis D. Brandeis
> > Genes Web page <http://geneslinuxbox.net:6309/gene>
> >
> >
> > _______________________________________________
> > 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
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users