Hello Guest it is March 29, 2024, 11:26:52 AM

Author Topic: Sub - M30 acts like M47  (Read 3525 times)

0 Members and 1 Guest are viewing this topic.

Sub - M30 acts like M47
« 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
 :)
Re: Sub - M30 acts like M47
« Reply #1 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

Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Sub - M30 acts like M47
« Reply #2 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

Re: Sub - M30 acts like M47
« Reply #3 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
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Sub - M30 acts like M47
« Reply #4 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  ;)

Offline Fastest1

*
  •  920 920
  • Houston, TX
    • View Profile
Re: Sub - M30 acts like M47
« Reply #5 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 ;-)
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)
Re: Sub - M30 acts like M47
« Reply #6 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

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Sub - M30 acts like M47
« Reply #7 on: May 10, 2014, 09:23:08 AM »
 ;D
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!