Hello Guest it is May 17, 2024, 07:31:32 PM

Author Topic: Button macro operation in different coordinate systems  (Read 173 times)

0 Members and 1 Guest are viewing this topic.

Button macro operation in different coordinate systems
« on: May 01, 2024, 04:05:22 AM »
Morning all.  I've used my Mach3 Novamill conversion for a decade in mm mode with no problems.  I've written button scripts for tool height setting and edge finding which work well.  Now though I'm about to do some PCB isolation engraving and the tool chain I use (Fritzing+Flatcam) works in inches (as most PCB footprints are on a 0.1" grid).  Slightly to my surprise issuing a G20 command in the MDI sets the machine seamlessly to inch mode and from an air cut it looks like the machine correctly follows the profile. 

My question is about how macros that hard code things like tool setter height written for metric will behave if I try to use them in inch mode?  My setting button is 38.44mm high, and the Auto Tool Zero button script finds the button top then lifts the tool to 50mm - both numbers are hard coded in the script.  I assume that if the script is executed in imperial mode it will try to lift the tool to 50 inches which is impossible on this machine!  So I'll have to touch off the tool manually on the PCB surface. 

Is there an accessible parameter in Mach3 which could tell a macro which mode the machine is in, which a modified script could read and adjust its parameters accordingly please?

Offline TPS

*
  •  2,506 2,506
    • View Profile
Re: Button macro operation in different coordinate systems
« Reply #1 on: May 02, 2024, 02:32:56 AM »
i am using the same combination (Fritzing+Flatcam) for my little PCB project, i just select in Flatcom under
options -> units - mm and everthing is in mm. so i do not have to switch units on my machine
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Button macro operation in different coordinate systems
« Reply #2 on: May 02, 2024, 03:35:27 AM »
Thanks, but does that actually convert the numbers?  If so it's ideal.

Edit:  just tried, it does!  Many thanks for the tip.
« Last Edit: May 02, 2024, 03:47:17 AM by JohnHaine »