Hello Guest it is April 18, 2024, 06:52:54 PM

Author Topic: M98 - M99 loop with M00 in  (Read 2474 times)

0 Members and 1 Guest are viewing this topic.

M98 - M99 loop with M00 in
« on: March 03, 2014, 09:06:44 AM »
I'm not able to get to my machine to test this, but I've been trying to figure out a way of doing a subroutine, and having the machine stop temporarily afterwards, to give the user the option of either repeating the subroutine or continuing through the main code. So far I've come up with this:-

o0001
g21
g90
g64
g00 a2 f2500
m06 t001
g00 x0 y20
m98 p0002
m00
g01 x10 etc...

o0001
g01 a0.5 z120
g01 a0
g01 a0.2
m99

The idea being that the user can manually select and run from either the line 'm98 p0002' to repeat the routine, or the line 'g01 a0.2' to continue through the code.

Is this a normal way of achieving this? I've used lower case here to distinguish between 'o' and '0'.

Thanks

Re: M98 - M99 loop with M00 in
« Reply #1 on: March 03, 2014, 12:41:16 PM »
I've noticed the typos... should be o0002 for the subroutine, also missing the % at start of main code.