Hello Guest it is March 28, 2024, 10:24:44 AM

Author Topic: subroutine code will not run  (Read 2913 times)

0 Members and 1 Guest are viewing this topic.

subroutine code will not run
« on: November 15, 2013, 12:06:34 PM »
Why does this code not work?  Machine will run the first call for the subroutine and stops on the last line of the sub Z1.0 and the spindle shuts down.  Acts like it is not seeing the M99

G43 M6 T1 H1
M3 S500
G54
G0 Z4.0
M98 P1234
G0 Z4.0
G55
M98 P1234
G0 Z4.0
Y80.0
M30

O1234
G0 X1.15 Y6.955
Z.1
G1 Z-.313 F20.0
X.786
X1.15 Y7.319
X1.514 Y6.955
X1.15 Y6.591
X.786 Y6.955
X1.15
G0 Z1.0
M99
Re: subroutine code will not run
« Reply #1 on: November 15, 2013, 12:25:46 PM »
there is no " return" after M99
you can use the % to avoid this
eg.

M30
%
M99
%

alex
Re: subroutine code will not run
« Reply #2 on: November 15, 2013, 02:55:40 PM »
Thanks,  Lack of a return after the M99 line was the problem.  Now everything works.