Hello Guest it is July 21, 2019, 09:34:39 AM

Author Topic: Return Called with no sub in effect...Looping  (Read 9533 times)

0 Members and 1 Guest are viewing this topic.

Return Called with no sub in effect...Looping
« on: April 07, 2011, 11:10:03 PM »
When I single block through the last few lines of my subroutine there is an error message that says  "Return Called with no sub in effect...Looping"  M99 is only placed once at the end of the subroutine, what does this message mean?

Thanks
Mariah
Re: Return Called with no sub in effect...Looping
« Reply #1 on: April 08, 2011, 03:07:00 AM »
Try adding a P address after the M99 to try a different line for the return.

Maybe M99 P100 to return to line 100 or whatever line you want to return.


Jeff

Offline BR549

*
  •  6,874 6,874
    • View Profile
Re: Return Called with no sub in effect...Looping
« Reply #2 on: April 08, 2011, 03:55:24 PM »
IF you are just stepping down throught the sub without it being called you WILL get that message beacuse mach see the sub end without a return call to the main program.

(;-) TP
Re: Return Called with no sub in effect...Looping
« Reply #3 on: April 08, 2011, 04:09:50 PM »
I thought M99 meant end of sub & return to next line of main program.  How should I return call to main program for successive cuts that will feed Z farther into my part?  When I run in auto cycle it reads my whole main program but ignors any tool or fixture offsets to remove additional stock and it doesn't show any error message?

Offline BR549

*
  •  6,874 6,874
    • View Profile
Re: Return Called with no sub in effect...Looping
« Reply #4 on: April 08, 2011, 05:04:32 PM »
M99 means end of sub return back to the line (M98 P#L#) it was called from and continue the main program.

IF it is not seeing the offsets then something is wrong with your code.

For succesive lower cuts use the sub loop function  M98 P100 L10   the L10 loops the sub 10 times.

(;-) TP

Re: Return Called with no sub in effect...Looping
« Reply #5 on: April 10, 2011, 12:28:58 AM »
Jeff, TP,

Guys I want to thank you both for your help, but my brain is fried.  I have read Smid's 3rd edition programming manual over and over along with the Mach Turn pdf info and I just can't get my control to respond to the offsets.  I just realized that I have spent over 100hrs. troubleshooting a simple program with no progress...I give up.
Thanks,
Mariah
Re: Return Called with no sub in effect...Looping
« Reply #6 on: April 10, 2011, 01:21:37 AM »

Offline BR549

*
  •  6,874 6,874
    • View Profile
Re: Return Called with no sub in effect...Looping
« Reply #7 on: April 10, 2011, 04:11:43 PM »
Can you post your gcode file?? That way we can test it for you.

(;-) TP
Re: Return Called with no sub in effect...Looping
« Reply #8 on: April 10, 2011, 04:38:37 PM »
Jeff, TP,

Guys I want to thank you both for your help, but my brain is fried.  I have read Smid's 3rd edition programming manual over and over along with the Mach Turn pdf info and I just can't get my control to respond to the offsets.  I just realized that I have spent over 100hrs. troubleshooting a simple program with no progress...I give up.
Thanks,
Mariah

What helps me when I take in too much new information at one time is to give it a rest for a few days, when I go back to it I seem to forget a lot of useless junk and tend to find the solution quicker.....

Don't give up I've been lurking here for a year and these guy's will stick with it as long as you can!
Re: Return Called with no sub in effect...Looping
« Reply #9 on: November 16, 2013, 07:13:49 AM »
Put an M30 at the end of your main code.

see how Ya-Nvr-No has put an M30 at N180 in this code:

N10  G20 G17 G91 F30
N20  G0 z-.75

N30  M98 P1234 L5
N80  M98 P1235 L5

N150 G90
N160 G1 Z-2
N170 G0 Z0
N180 M30

O1234
N50  G1 Z-.5  F5
N60     Z.5
N70  M99

O1235
N100 G1 Z-.25 F10
N110    Z-.75
N120    Z.75
N130    Z.25
N140 M99
%