On Fri, 2008-06-06 at 23:08 -0500, Jon Elson wrote:
> Kirk Wallace wrote:
> > 
> > Feedback would start with ppmc.X.encoder.X.delta? Is encoder delta reset
> > to zero and at what event? This would then be scaled/converted to RPM
> > and fed to pid.X.feedback and possibly a speed display.
> > 
> Encoder.xx.delta is never reset.  It is derived by subtracting 
> the last position from the current position.  

Sometimes the the spindle context keeps me from seeing things as they
should be. More thinking aloud. An encoder still acts the same whether
it's on a linear axis or spindle. So if the spindle moves, the distance
is counted, and sometimes, it's a very long move. The delta math is done
each time the thread that contains the encoder function loops
(servo-thread?), so the delta divided by the thread period gives the
average velocity for the period just previously completed(?). A
discontinuity occurs if a move in one direction is long enough to wrap
the counter register.

> When the spindle 
> index feature is used, the spindle encoder index pulse clears 
> the enocer counter, and the driver mades the axis position zero.
> So, there would be a large jump in position at this instant, 
> causing delta to be a large number on one servo cycle.  You know 
> when this happens, as the HAL signal 
> ppmc.0.encoder.xx.index-enable will be true before the event, 
> and will go to zero on the same servo cycle as you read the 
> "wild" delta number.
> > It looks like there is still some magic that needs to conjured before
> > this will work.

So, with the index-enable feature, it is like making your counter
register just big enough to count one encoder revolution before it
"wraps"? But it seems that when you see an index event, you would know
to account for it.

> This should be quite simple to work out.  I'm not even sure 
> delta goes wild at these times, I've looked at the signals with 
> halscope, but it has been a while.  Reading the driver code, it 
> seems it should go wild when the spindle index function is used,
> unless something else fixes it.
> 
> Jon

I kind of assumed that the index-enable feature was created to fix the
discontinuity problem for threading. I haven't a clue how though.

-- 
Kirk Wallace (California, USA
http://www.wallacecompany.com/machine_shop/ 
Hardinge HNC/EMC CNC lathe,
Bridgeport mill conversion, doing XY now,
Zubal lathe conversion pending
Craftsman AA 109 restoration
Shizuoka ST-N/EMC CNC)


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to