NEWS
emc2_2.4.3 Release
A fresh bugfix release (Changelog).
You can get it:
as a source package from sourceforge, from Git, or as a precompiled package which works on Ubuntu as described here.
 
Ubuntu 8.04&EMC2 Live CD
The EMC2 team has a custom Live-CD (EU mirror) based on Ubuntu 8.04 with emc 2.3.x included, that will let you try out EMC2 before installing, and it's also the easiest way to install Ubuntu and EMC2 together. (more)
 
emc2_2.4.2 Release
A fresh bugfix release (Changelog). You can get it: as a source package from sourceforge , from Git , or as a precompiled package which works on Ubuntu as described here .
 
Site Search
Google
Web LinuxCNC
Login
Home arrow Forum

EMC Support Forum
Welcome, Guest
Please Login or Register.    Lost Password?
G CODE FOR REPEAT PROGRAM
(1 viewing) 1 Guest
Go to bottom
TOPIC: G CODE FOR REPEAT PROGRAM
#1810
rich (User)
Fresh Boarder
Posts: 3
User Offline Click here to see the profile of this user
G CODE FOR REPEAT PROGRAM 6 Months, 3 Weeks ago 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?
 
Logged Logged  
  The administrator has disabled public write access.
#1814
acemi (User)
Senior Boarder
Posts: 55
User Offline Click here to see the profile of this user
Re:G CODE FOR REPEAT PROGRAM 6 Months, 3 Weeks ago 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.
 
Logged Logged  
  The administrator has disabled public write access.
#1824
robh (User)
Senior Boarder
Posts: 52
User Offline Click here to see the profile of this user
Re:G CODE FOR REPEAT PROGRAM 6 Months, 3 Weeks ago Karma: 10  
if u just want to repeat a program or some code you can use
Code:


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
 
Logged Logged  
  The administrator has disabled public write access.
Go to top
© 2010 LinuxCNC.org
Joomla! is Free Software released under the GNU/GPL License.