Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: rayscott on February 16, 2008, 11:44:57 PM

Title: gcode preprocess
Post by: rayscott on February 16, 2008, 11:44:57 PM
When mach3 loads the new g-code file it preprocesses all the code.  This allows it to show the tool position and planned cutting path.  I do NOT want the tool path screen and plan to make my own screens with out it.  The preprocessing causes MACH3 to enact my custom macros.  This starts timers and all other types of trouble.

What can I do to stop the preprocessing from enacting my macros?

Ray Scott
ray@scottware.net
Title: Re: gcode preprocess
Post by: Graham Waterworth on February 17, 2008, 04:02:20 AM
Hi Ray,

you need to update your user macros, they need to be in this format

If IsLoading() Then
  ' any code for initialisation
Else
  ' your macro code
End If

This will stop the code from running during loading and pre processing the NC code

Graham.
Title: Re: gcode preprocess
Post by: stirling on February 17, 2008, 04:22:42 AM
Hi Ray
there's also the "Ignore M calls while loading" option on the general config screen.
Ian
Title: Re: gcode preprocess
Post by: Graham Waterworth on February 17, 2008, 04:42:24 AM
Hi Ian,

that method is ok as long as the macro is not safety critical, if the macro is shared with others or some clown turns the option off it could be dangerous. I prefer the hard coded option.

Graham.
Title: Re: gcode preprocess
Post by: stirling on February 20, 2008, 12:13:55 PM
Hi Graham

Fair do's

Cheers

Ian