Stirling I have also found that MACH will choke on the math inside of a Gcode program using gcode variables if you use cos,sin to calculate the next positional move of a g31 position. It will throw an error and stop, but a cycle start push will get it running again.
(;-) TP