I'd be happy if the existing G and M codes simply did what they were supposed to, first time, every time.
Sigh.
Especially with parameters and subroutines ...
But you knew I would say that of course :-)
Actually, to hark back to g83 for a moment: The Haas manual says that all the g8x codes are modal:
'This G code is modal so that it is activated every X and/or Y axis move, and it will rapid
to that position and then cause this canned cycle to be executed again, until it's canceled.'
so that the following should drill TWO holes, at X=1 and X=2 (I think)
g83 x1 y0 z-1 q1 r1
g0 x2
However, I find that under mach the g83 code is not really modal. The above code would only drill one hole.
I admit, I have never tried the following:
g83 x1 y0 z-1 q1 r1
x2
Where it gets worse is when the program (in a subroutine ... I know) looks like this
g0 x1 y0
g83 z-1 q1 r1
This does not *always* do the same thing as
g0 x1 y0
g83 x1 y0 z-1 q1 r1
That is, omitting the X & Y in the g83 sometimes gets Mach 3 very confused, and the holes are put in different places.
Sigh: defensive coding required.
Cheers