Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Tarak on September 03, 2007, 05:57:17 PM

Title: When loading a program, the spindle starts up.................
Post by: Tarak on September 03, 2007, 05:57:17 PM
Hey this is really wierd.
When I load a program (Load NOT run) my spindle starts up on slow speed, I've recenly made the screen and designated M13 through to M16 for my spindle (see pic.)
Is M13 a reserved M code for some other purpose?
I did previously have it as M12 but had the same problem, so I changed it to M13 instead (But it's still doing it)
I'm thinking that I need to change to a different M code again.
Thoughts.
Title: Re: When loading a program, the spindle starts up.................
Post by: Graham Waterworth on September 04, 2007, 04:08:14 AM
When Mach loads a program it reads the code to draw the toolpath, any M codes you have created are also read,  what you have to do is this :-

enter this code into each and every macro you have created:

If IsLoading() Then
 ' program loading, do nowt
Else
 ' enter your existing code lines here
End If

This will stop mach3 executing the code during loading

Graham.
Title: Re: When loading a program, the spindle starts up.................
Post by: Tarak on September 04, 2007, 05:02:03 PM
Thanks Graham, I'll give it a go.
Title: Re: When loading a program, the spindle starts up.................
Post by: Tarak on September 05, 2007, 05:15:03 PM
Worked Beautifully Graham, Thanks.
Darc
Title: Re: When loading a program, the spindle starts up.................
Post by: Graham Waterworth on September 05, 2007, 05:35:20 PM
Hi Darc,

Glad to be of help.

Graham.