- Posts: 1
- Thank you received: 0
G CODE FOR REPEAT PROGRAM
16 years 8 months ago #1810
by rich
G CODE FOR REPEAT PROGRAM was created 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 to join the conversation.
16 years 8 months ago #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.
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 to join the conversation.
16 years 8 months ago #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
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
Code:
O12 REPEAT[10]
---
--- some code
---
O12 ENDREPEAT
number in [ ] being number of repeats
O <O not Zero 12 being subprogram number
Please Log in to join the conversation.
Time to create page: 0.289 seconds
