Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Overloaded on May 04, 2014, 09:16:51 PM

Title: Sub - M30 acts like M47
Post by: Overloaded on May 04, 2014, 09:16:51 PM
Simple little sub, runs through L4 fine then M30 rewinds and starts again .... and again, like the M30 was an M47.

Do I have something wrong ?
Did not see mention of this earlier.

G0 Z1
X1Y1

M98 P1 L4

o1
G91 X2.5
G90
Z-1
G13 I1 F1000 (speed for sim  :) )
Z1
M99

G0 X0Y0
m30

Thanks,
Russ
 :)
Title: Re: Sub - M30 acts like M47
Post by: Brian Barker on May 04, 2014, 09:20:18 PM
Sub must be outside of the main body of your program. Your code should look like this:

Code: [Select]
G0 Z1
X1Y1

M98 P1 L4

G0 X0Y0
m30

o1
G91 X2.5
G90
Z-1
G13 I1 F1000 (speed for sim  Smiley )
Z1
M99

Title: Re: Sub - M30 acts like M47
Post by: Overloaded on May 04, 2014, 09:28:32 PM
Thanks Brian, hope that didn't hold you up much.

I suppose that has always been the rule.
I never used subs much, only borrowed ones and didn't notice that.

Thanks for taking the time.
Regards,
Russ

Title: Re: Sub - M30 acts like M47
Post by: Brian Barker on May 04, 2014, 09:32:26 PM
That one took me looking at the file.. I didn't even need to load it to see that error :)

That has to be the upside to what we do.. we get good at screwing up so we can spot an error a mile away
Title: Re: Sub - M30 acts like M47
Post by: Overloaded on May 04, 2014, 09:50:01 PM
 ;D

If screwing up is a prerequisite, I should soon be catching a glimpse of the basic goof ups. :)

Thanks Brian,
Rookie  ;)
Title: Re: Sub - M30 acts like M47
Post by: Fastest1 on May 09, 2014, 08:28:59 AM
   Overloaded, I got you covered on the screw ups. I felt guilty til I was talking with Brian on the phone 1 day and he said they were having a code party! Really? Who has a party revolving around the writing of code? I have a hard enough time reading anything about it. Glad somebody likes it though ;-)
Title: Re: Sub - M30 acts like M47
Post by: Overloaded on May 09, 2014, 09:05:46 AM
Jeeesh, I can understand why they call it "Code".  :P Enigma has nothing on this.

To learn it: Start young, pay strict attention, stay focused and practice regularly. ;)

Being almost 60, ADD since the beginning and a connoisseur of moonshine puts me at an ever so slight disadvantage.  :)

Its just so much FUN, Code party at Brian's ? ? ? ? HECK YEAH ... I'm there man ! (and I've got my ceramic crucible  ;) )

Russ
Title: Re: Sub - M30 acts like M47
Post by: Chaoticone on May 10, 2014, 09:23:08 AM
 ;D