Hello Guest it is May 14, 2021, 02:17:23 AM

Author Topic: Where to find M3/M7/M8... macros  (Read 246 times)

0 Members and 1 Guest are viewing this topic.

Offline DAAD

*
  •  103 103
    • View Profile
Where to find M3/M7/M8... macros
« on: March 30, 2020, 08:06:41 AM »
Hello,

I would like to find the basic macro's included in mach 4 but cannot find them.
I would like to study what's inside the different macro's so i can use the to make other macro's.

Searching for the M3/M5. and M8/M9 specially.
Why aren't these placed under the profiles macro map?

Keep Safe!

Adam
Re: Where to find M3/M7/M8... macros
« Reply #1 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
My wife left with my best friend...
     and I miss him!

Offline DAAD

*
  •  103 103
    • View Profile
Re: Where to find M3/M7/M8... macros
« Reply #2 on: March 30, 2020, 03:13:33 PM »
Thanks Craig!

Where can i see the script of the integral commands?
I would like to start from there before i mess up big time.

Still learning a lot..
Re: Where to find M3/M7/M8... macros
« Reply #3 on: March 30, 2020, 03:18:34 PM »
Hi,

Quote
Where can i see the script of the integral commands?

To my knowledge you can't. Aside from anything else its all internal to Mach and probably coded in C++
and would not help you much anyway.

Craig
My wife left with my best friend...
     and I miss him!

Offline DAAD

*
  •  103 103
    • View Profile
Re: Where to find M3/M7/M8... macros
« Reply #4 on: March 30, 2020, 03:26:06 PM »
Ok..

No need to search any further then!