On Fri, 15 Nov 2019 at 16:55, Henk du preez <[email protected]> wrote:
> I could not get rid of the unwind problem but managed to devise a > workaround. I have found two ways round this. The first way is using a mux component to latch the position at which the change happened, which is described on my page on the wiki about hobbing, where you can also find the GUI I use (which does simple gear geometry calcs, including the span and number of teeth for depth checking) http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Hobbing But when I switched to a harmonic drive rotary axis I wrote a custom HAL component for the job which allows me to jog the A axis phase, useful for picking up a gear to re-cut, for example. Save this as hobbing.comp and install with "sudo halcompile --install hobbing.comp" ---------begin hobbing.comp------------------------------------ component hobbing "synchronise a rotary axis to the spindle"; pin in float teeth; pin in float spindle-pos; pin in float spindle-vel; pin in float A-pos-cmd; pin in float gear-pos-fb; pin out float gear-pos; pin out float gear-vel; pin out float A-pos-fb; author "andypugh"; license "GPL v2+"; function _; ;; FUNCTION(_){ static double pos_ref; static double spindle_ref; static int old_teeth; if (old_teeth != teeth){ pos_ref = gear_pos_fb; spindle_ref = spindle_pos; old_teeth = teeth; } if (teeth != 0) { gear_pos = pos_ref + 360*(spindle_pos - spindle_ref)/teeth + A_pos_cmd; gear_vel = spindle_vel / teeth; A_pos_fb = gear_pos_fb - pos_ref - 360*(spindle_pos - spindle_ref)/teeth; } else { gear_pos = pos_ref + A_pos_cmd; gear_vel = 0; A_pos_fb = gear_pos_fb - pos_ref; } } ---------end hobbing.comp------------------------------------ -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1916 _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
