1571
Mach4 General Discussion / Re: Where to find M3/M7/M8... macros
« on: March 30, 2020, 02:59:33 PM »
Hi,
those macros are integral to Mach4, they are not viewable or editable.
What you can do is write your own. When a Gcode program or MDI encounters an m3, for instance, it will search in the first
instance in the macros directory of your current profile. If it finds a macro called m3 it executes it. If it doesn't find it it searches
'up the tree' until it does and ends up with Machs integral m3 and executes that.
First thing to notice is that I use lowercase. Machs Gcode interpreter when it parses Gcode or MDIs it converts uppercase to lowercase
and strips out leading zeros (and whitespace). Thus:
M3
M03
are both equivalent to m3.
And:
G00 X0.6 Y0.8
G0 x.6 y0.8
are both equivalent to g0x.6y.8
In most circumstances Windows is not case sensitive and will correctly deliver M03 when its searching for m3....but sometimes
it doesn't.....and you'll have a hell of a job trying to work out what the fault is. I suggest you get in the habit of using lowercase
letters without leading zeros in Gcode and macros and save yourself some grief.
If you wish to write your own m3/m7/m8 then your version must have the same basic functionality as the integral macro
but you can have your macro do extra things if you wish.
Craig
those macros are integral to Mach4, they are not viewable or editable.
What you can do is write your own. When a Gcode program or MDI encounters an m3, for instance, it will search in the first
instance in the macros directory of your current profile. If it finds a macro called m3 it executes it. If it doesn't find it it searches
'up the tree' until it does and ends up with Machs integral m3 and executes that.
First thing to notice is that I use lowercase. Machs Gcode interpreter when it parses Gcode or MDIs it converts uppercase to lowercase
and strips out leading zeros (and whitespace). Thus:
M3
M03
are both equivalent to m3.
And:
G00 X0.6 Y0.8
G0 x.6 y0.8
are both equivalent to g0x.6y.8
In most circumstances Windows is not case sensitive and will correctly deliver M03 when its searching for m3....but sometimes
it doesn't.....and you'll have a hell of a job trying to work out what the fault is. I suggest you get in the habit of using lowercase
letters without leading zeros in Gcode and macros and save yourself some grief.
If you wish to write your own m3/m7/m8 then your version must have the same basic functionality as the integral macro
but you can have your macro do extra things if you wish.
Craig