Hey folks. I'm still very new to hand writing my own gcode, so please bear with me. I'm writing a program to cut a multi-lead thread (I'm using a 60 degree cutter and my A axis.) Since I have to take very shallow cuts on each pass, I have to make 22 passes at each of the 4 leads I am cutting. I'm using G91 to increment A by the number of degrees I need to cut for each pass. To save time I do not return A back to 0 after each pass. After a while the value for A tends to get a little out of hand (not sure if there is an actual limit on what a DRO value can be.) This makes it tough to see where problems might have been introduced. Is there a way to have the gcode zero the A axis as if I pressed the zero button manually?
Here's a sample of what I'm doing (I'm using a subroutine to handle each pass, but this is the general idea.)
G0 X0 A0
G1 Z-0.001
G91
G1 X-1 A3600
G90
G0 Z0.2
G0 X0
G1 Z-0.002
G91
G1 X-1 A3600
G90
G0 Z0.2
G0 X0
...And so on for 88 passes.
Thanks
~Chris