NEWS
LinuxCNC 2.5.2 Release
LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum General International LinuxCNC Users G CODE FOR REPEAT PROGRAM

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: G CODE FOR REPEAT PROGRAM

G CODE FOR REPEAT PROGRAM 08 Feb 2010 05:04 #1810

  • rich
  • rich's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
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?
The administrator has disabled public write access.

Re:G CODE FOR REPEAT PROGRAM 08 Feb 2010 08:00 #1814

  • acemi
  • acemi's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 55
  • Karma: 6
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.
The administrator has disabled public write access.

Re:G CODE FOR REPEAT PROGRAM 08 Feb 2010 15:15 #1824

  • robh
  • robh's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 117
  • Thank you received: 2
  • Karma: 21
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
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.948 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.