Oops.  Somehow a sentence below was trimmed.  Fixed.

> > 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 to the 64 bit counter would decrease 
the distance travelled or suggest the spindle has slowed dramatically.

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


> >
> > 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
> >
> > Thanks
> > John
> >
> >
> >
> 
> Peter Wallace
> Mesa Electronics
> 
> 
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users



_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to