Page 1 of 1

Loop gcode

PostPosted: Tue Oct 10, 2017 1:24 pm
by Kasper
Hi All.

I dont know what happened to my last topic, did it get removed?

Anyway, i'm trying to find out how to loop a gcode program in UCCNC.
Should i add or remove some code to have it endlessly loop?

Thanks :-)

Re: Loop gcode

PostPosted: Tue Oct 10, 2017 1:53 pm
by cncdrive
Nothing happened to your post, but it was your first post which requires moderator approval,
because we want to avoid spammers to get to the forum, so every user's first post has to be approved by the moderators.
From the first post we see if the user is a real person or a spamming bot.

You can loop a g-code file with the M47 macro at the end of the g-code file. That will make an endless loop.
Or you could use subroutines to make a non endless loop, to call a subroutine N times.

Re: Loop gcode

PostPosted: Tue Oct 10, 2017 3:02 pm
by Kasper
Yea i noticed that just after my second post :-) sorry.

I tried adding the M47 to the end of the gcode - didnt work.
I'm not a gcode wizard so if you could dumb it down a bit and maybe tell me exactly what to put in the gcode? :oops:

Re: Loop gcode

PostPosted: Tue Oct 10, 2017 8:14 pm
by Greolt
Kasper wrote:I tried adding the M47 to the end of the gcode - didnt work.


Perhaps you did not remove an existing M30 first. This will end program and rewind code before reading the M47