So I already have all the math figured out and know what motion I want, just not sure what best way to write the code is. I'll be hobbing a 100 tooth mod1 10 degree helix gear out of delrin. My plan is to use a nema 34 stepper to drive the hob which will be mounted next to my spindle at helix angle +/- hob angle depending which side the cut is on. Gear will be driven by 4th axis, hob will feed across x axis. To account for helix of gear, the 4th axis needs to turn an extra 0.199 degrees for each 1mm feed of x. So assuming a 1mm stepover with the hob, I need 100 turns of the hob for every 1mm of x feed and 360.199 degrees of 4th axis rotation. Multiple that out for total feed. Let's say I feed 50mm total, that means I need 5000 rotations of hob (1,800,000 degrees), 50mm of x feed, and 18,009.95 degrees of 4th axis rotation. The only way I know of do this is having 4th on A, hob on B, and write a single line of code for all 3 total axis distances. Line of code for this 50mm feed would be,
G1 x-50 A18009.95 B1,800,000

I realize I still need to give it a feed rate, but that is still to be determined for proper sfm of hob, but ratios should stay the same no matter what is given.
Will everything run properly synchronised as this line of code executes? Is there a better way?

Similar Threads: