a while ago I described how I added a simple optical encoder wheel to  
my lathe. Meanwhile, I eventually got it to work with G33 threading,  
but it wasnt as straightforward as I would have believed, so I thought  
I'd describe my experience.

My first attempt was to use the encoder component as described in the  
Spindle Feedback example (User Manual chapter 34). Trying that with  
the threading.ngc example failed miserably - the synced-motion  
threading part was everything but synchronized - heavy speed  
variations in the Z axis (see http://www.youtube.com/watch? 
v=efiNyzhGFbQ , starting around second 27).

I traced the problem to serious noise on the encoder.0.velocity signal  
(red signal in http://mah.priv.at/gallery2/main.php?g2_itemId=69102).  
I first tried to feed it through a lowpass (white signal) but that a)  
didnt work either and b) massaging a feedback signal would be  
counterproductive to start with.

I admit that the codewheel finish left to be desired - I managed to  
glue it onto the pulley with maybe 0.5mm runout (the outer diameter is  
18cm). And the disk isnt perfectly flat on the pulley - too much glue  
here and there, so the disk-sensor distance varies as well. These  
inaccuracies cause periodic fluctuations in the index signals, the  
relation to the spindle revolution can clearly be seen (note blue  
index pulse). So that introduced some phase noise on the signal, and  
that in turn causes the position estimate to fluctuate wildly, hence  
causing the strange Z move pattern.

Adjusting the sensors and pulley brought some improvement but not  
sufficient. So I played around with encoder options.

The fix was finally to turn off x4-mode and use encoder.0.position- 
interpolated instead of encoder.0.position to feed into motion.spindle- 
revs.

The noise is pretty much gone 
(http://mah.priv.at/gallery2/main.php?g2_itemId=69105 
) - except for the wobble introduced by the runout of the codewheel  
(which btw can be clearly heard from the Z stepper during the  
threading run :-).

The setup works fine for threading now, but I'll eventually change  
this to a more precise encoder wheel.

hal of test setup is at: 
http://mah.priv.at/cgi-bin/viewvc.cgi/emc-drehbank-test/drehbank-k12a.hal?revision=1.6&root=CVS&view=markup


out of curiosity - anybody got spindle-synced motion with *just* an  
index puls (1ppr) to work?

-Michael


btw - I'm stunned by EMC2's capabilities - great piece of work, folks!


  

------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to