Hello Guest it is September 07, 2025, 10:09:15 AM

Author Topic: Mach 3 - is there a parameter to indicate inch/metric?  (Read 1396 times)

0 Members and 5 Guests are viewing this topic.

Mach 3 - is there a parameter to indicate inch/metric?
« on: September 05, 2025, 06:27:14 AM »
My Novamill is a native metric machine with a homebrew Mach3 controller.  Most of my machining is done in metric but occasionally I have a component to make with native inch dimensions.  Examples are PCB layouts for isolation routing, and recently a replacement clock movement plate with precise whole inch dimensions which would have been a pain to convert to mm without. I generate the g-code using for example CamBam set to inches.  A G20 command at the start of the code sets the machine to inches (or G21 to switch back to mm).  Everything just works except that tool height setting is tricky.

My tool setting macro is derived from several examples on here and generally works fine but key parameters in it are defined in mm.  What I can do is set the tool height using my touch plate with the machine in mm; then type a G20 in the MDI, and the reference tool height (which is 50mm above the table surface) appears in inches (1.9685) and all then goes well. However if I have to change the tool during a run, I have to set the machine back to mm, run the macro, and switch back to inches which is awkward and error prone.

So to my question: is there a parameter accessible to a macro in Mach 3 which will tell it which mode the machine is in please?  Then I could modify my tool height macro to read this and use the appropriate parameters.  If I want to do a job in inches I could just give Mach3 a G20 in the MDI and carry on without issues.

Offline Tweakie.CNC

*
  • *
  •  9,314 9,314
  • Super Kitty
Re: Mach 3 - is there a parameter to indicate inch/metric?
« Reply #1 on: September 06, 2025, 01:49:22 AM »
You could read Led 801 - if active you are in INCH Mode or read Led 802 - if active you are in MM Mode.

I cant remember if it is just GetLED (801) or GetOemLED (801) to check if you are in INCH units - try it and see.

Tweakie.
PEACE
Re: Mach 3 - is there a parameter to indicate inch/metric?
« Reply #2 on: September 06, 2025, 02:47:58 AM »
Thanks, I'll give that a try.