Geert De Pecker wrote:
> Hi,
> 
> I've mounted a spindle encoder to the mill and was trying to use G33, 
> but this always seems to move at the same speed.
> 
> The spindle encoder has 50 ppr (pin 11) and an index signal (pin 10).
> 
> This is my hal setup:
> 
> ...
> loadrt encoder num_chan=1
> ...
> addf encoder.update-counters base-thread
> addf encoder.capture-position servo-thread
> ...
> setp encoder.0.counter-mode true
> setp encoder.0.x4-mode false
> setp encoder.0.position-scale 1

^^^ this is saying that one count = one position unit
for a spindle, one position unit is one revolution

If your encoder has 50 PPR, then you should be using 50 for the scale.

> net spindle-phase-A <= parport.0.pin-11-in => encoder.0.phase-A 
> encoder.0.phase-Z
> net spindle-index-enable motion.spindle-index-enable <=> 
> encoder.0.index-enable
> net spindle-pos encoder.0.position => motion.spindle-revs

Confirm that the scale is correct by turning the spindle one revolution
by hand, while looking at net spindle-pos with halmeter - it should
increase by 1.00

Regards,

John Kasunich

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to