G CODE FOR REPEAT PROGRAM

More
08 Feb 2010 13:04 #1810 by rich
IS THERE A G CODE OR A LINE I CAN TYPE IN AT THE END OF MY PROGRAMS THAT WILL FORCE IT TO THE TOP AND RERUN THE PROGRAM?

Please Log in or Create an account to join the conversation.

More
08 Feb 2010 16:00 #1814 by acemi
Replied by acemi on topic Re:G CODE FOR REPEAT PROGRAM
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Oword

You can use Oword. Put your G codes in a "do while" loop. For example

#1 = 10
O100 do
...
...
...
#1 = [#1 - 1]
O100 while [#1 GT 0]
M30

Then your G code repeats 10 times.

Please Log in or Create an account to join the conversation.

More
08 Feb 2010 23:15 #1824 by robh
Replied by robh on topic Re:G CODE FOR REPEAT PROGRAM
if u just want to repeat a program or some code you can use
O12 REPEAT[10]
--- 
--- some code
---
O12 ENDREPEAT
this will repeat any code between the tags repeat - endrepeat 10 times, then drop out and process anything under.

number in [ ] being number of repeats

O <O not Zero 12 being subprogram number

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum