Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: MikeF2 on July 30, 2013, 02:47:33 PM

Title: Code for repeating 5000 times
Post by: MikeF2 on July 30, 2013, 02:47:33 PM
Hi,

I wrote a little program to make a z-axis go up and down for a test.  It looks like this:

O001
M98 P17 L900
M30

O17
G1 Z.38 F50
Z0
M99

The problem is I can only go to about 950 times before getting a "too many nests" error.
I'd like to go 5,000 up-down cycles before stopping.  Any ideas out there?

Thanks,
Mike
Title: Re: Code for repeating 5000 times
Post by: BR549 on July 30, 2013, 02:58:08 PM
M98 P17 L50
M30

o17
M98 P18 L100
M99

o18
G1 Z.38 F50
Z0
M99
Title: Re: Code for repeating 5000 times
Post by: MikeF2 on July 30, 2013, 05:40:27 PM
Ha,

Very clever, thanks!
Title: Re: Code for repeating 5000 times
Post by: BR549 on July 30, 2013, 09:51:04 PM
(;-)

(;-) TP