Hello Guest it is October 19, 2019, 06:23:30 AM

Author Topic: Mach ignores M00, loads macro; 'terminating scripts'  (Read 2961 times)

0 Members and 1 Guest are viewing this topic.

Mach ignores M00, loads macro; 'terminating scripts'
« on: April 30, 2015, 01:00:26 PM »
Attached macro and Gcode file ('.cgf')

When loaded, this starts without me pressing cyclestart, ignores M00, tries to run the macro which gives message 'Terminating Scripts' while a tool path fails to appear.

Running the macro from the vb editor on the same gcode file but without the call to M111 works fine.

Baffled here, as usual...

Why does this happen?
Re: Mach ignores M00, loads macro; 'terminating scripts'
« Reply #1 on: April 30, 2015, 01:03:52 PM »
For some reason it won't take a 2nd attachment today, its here instead, renamed, with txt file extension...
Re: Mach ignores M00, loads macro; 'terminating scripts'
« Reply #2 on: April 30, 2015, 01:15:11 PM »
 

To clarify, FirstFile reverts to 0 on shutdown, so this macro should message each time its opened via gcode when mach is first opened,
« Last Edit: April 30, 2015, 02:18:12 PM by Overloaded »
Re: Mach ignores M00, loads macro; 'terminating scripts'
« Reply #3 on: April 30, 2015, 01:22:10 PM »
In case this is useful: - its Mach 3.042 020 Demo, standard mach 3 mill xml, no parallel port drivers, no machine attached. Now tested on 2 pcs with same results...

Can someone do me the favour of running the gcode file and macro and seing if it does the same for them?
« Last Edit: April 30, 2015, 01:28:52 PM by moorea21 »
Re: Mach ignores M00, loads macro; 'terminating scripts'
« Reply #4 on: April 30, 2015, 02:17:22 PM »
Hey Rich,
 I ran it here and it worked as expected.
3.043.022 Licensed.

Will try it in demo ...
Re: Mach ignores M00, loads macro; 'terminating scripts'
« Reply #5 on: April 30, 2015, 02:31:55 PM »
Hmmm.. Thats not what I expected. I'd consider reloading Mach, but it happened on 2 machines. Even more baffled now.

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: Mach ignores M00, loads macro; 'terminating scripts'
« Reply #6 on: April 30, 2015, 02:35:18 PM »
M4 is an internal Mcode for running the spindle CCW  It is NOT to used for your own use other than that.

Your M11 macro runs as expected. What exactly did you think it should do??

(;-) TP
Re: Mach ignores M00, loads macro; 'terminating scripts'
« Reply #7 on: April 30, 2015, 02:39:37 PM »
M4 isn't a macro, and doesn't live in the macro folder, its just a gcode file on my desktop, loaded as such into mach, where it calls M111. M111.m1s gets the value of Var300, prints that to the status line thingy, and stops any Gcode that is running. Or at least, thats what it does when I run it from the vb editor in mach.

The only reason my gcode file starts with an 'm'm is because I had to reupload it under a different name when the attachments upload on this forum froze on me.  'm' was where my finger landed.
« Last Edit: April 30, 2015, 02:41:27 PM by moorea21 »

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: Mach ignores M00, loads macro; 'terminating scripts'
« Reply #8 on: April 30, 2015, 02:47:42 PM »
you re calling M00 which does work (;-) then you have to press cycle start to advance to the M111 which sets the message to the status bar then calls For a STOP. It is doing exactly as you have programed it to do.

(;-) TP
Re: Mach ignores M00, loads macro; 'terminating scripts'
« Reply #9 on: April 30, 2015, 02:50:01 PM »
but I don't press cycle start, the message appears just after loading, without me pressing anything.

Just loaded up mach as a fresh install, now getting different behaviour; it stills runs without me pressing anything, now puts 'press Cycle start to srat printing ' message on status line, and then gets stuck generating a path.

That was a) putting M111.m1s in the mach 3 mill macros folder, and
b) loading up m4.txt as a gcode file, which has the call to m111.m1s in it...

I'm sure that youre right, but before, when I had M111 written differently, that also ran without any buttons being pressed. I'll see if I can find that macro and post it here...

Thanks for being patient
« Last Edit: April 30, 2015, 02:53:45 PM by moorea21 »