I have just seen some Mach3 behaviour which I did not expect, and I'm wondering if this is a bug or a misunderstanding on my part.

My Mach3 setup is configured to use mm, so all units are in mm or mm/min or whatever. Normally, I generate gcode with Fusion 360 or Vectric Vcarve using mm, and I have never seen any problems. However, almost by accident, today I generated gcode that used inch units. Never mind, I thought, Mach3 should be able to cope with that. However, what seems to happen is that as soon as Mach3 loads (not runs, just loads) the gcode, it tries to switch everything to in from mm. Not only the default feedrate, but even machine coordinates. So, before loading gcode I have set work zero on a corner of my workpiece. I load the gcode and Mach3 then converts the machine coords into inches but doesn't seem to handle the offset of the work coords correctly so the work zero is somewhere a long way from where it should be - in my case, so far out that when I tried to run the gcode (before I noticed this coordinate shift) it tripped the soft limit warning - fortunately.

In my innocence, I had assumed that Mach3 would see the "inch" command (G20), interpret all the dimensions/coordinates in the gcode and translate them internally into mm, and happily carry on. Instead, it seems to see the G20 while initially parsing the gcode as it loads, which promptly screws it up completely. As part of my testing, I went back to F360, made absolutely no changes except for specifying mm as the units, generated the gcode, loaded it into Mach3, and Mach3 immediately went back to all the correct units without any other action on my part (no need to reset, rehome, anything). So, is the problem that Mach3 just doesn't understand the significance of G20/21, or is it something to do with my CSMIO-IP/M which is upsetting it, or something else? Or is Mach3 brain-dead? You can guess my choice...

The workaround is obvious - only feed Mach3 with metric gcode, which in my case is not a big deal - but I don't see why the "inch" version should not have worked. Has anyone else seen this?