Ok, I wrote this program to tune my Z axis with and have had no luck with teh M98. Basically what happens is that after an M99 instead of going on with teh program, it rewinds to N10. I want it to first do N10-20 and then do N50-60 five times and then go on to N100-130 five times and then go on to N150-180. W/ out a M30 it doesn't loop on the subroutines, but with it, after the first subroutine is done 5X's then it just goes to N10.
(Z axis tuning program)
( no tool)
N10 G20 G17 G91 F30
N20 G0 z-.75
N30 M98 P1234 L5
N40 M30
O1234
N50 G1 Z-.5 F5
N60 Z.5
N70 M99
N80 M98 P1235 L5
N90 M30
O1235
N100 G1 Z-.25 F10
N110 Z-.75
N120 Z.75
N130 Z.25
N140 M99
N150 G90
N160 G1 Z-2
N170 G0 Z0
N180 M30