Kirk Wallace wrote:

> 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.
> 
At least on the Pico Systems Universal PWM and Stepper 
controllers, the 24-bit hardware encoder count is rolled over to 
a 32-bit count.  So, the HAL pin won't see an overflow except 
every 4 billion counts.

But, there is a discontinuity when the spindle index feature 
zeroes the count when the axis is synced to the index.  this is 
usually only done on an axis home operation, but would be done 
at the beginning of every threading pass for a spindle axis.
> 
> 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.
> 
No.  The spindle count is set to zero at the beginning of the 
operation, and then counts up as many turns as the spindle 
rotates.  encoder.xx.pos is scaled to count to 1.00000 on the 
first turn, and continue like that.  It does NOT reset to zero 
at each turn after completing the index function.  For G33.1 
(rigid tapping) it would start winding back down after the 
spindle reverses direction.

> 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.
> 

No, it simple sets encoder.xx.pos to zero when it needs to align 
the spindle to the index pulse at the beginning of each 
threading pass, so the linear axis can sync repeatably to the 
thread.  The only discontinuity is that you WANT to break the 
continuity of the linear axis to the spindle, or you'd have to 
"rewind" the spindle for each threading pass.

Jon

-------------------------------------------------------------------------
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