Quote Originally Posted by Ulsterman View Post
Learn to use Do /while on Fanuc controls
This will help a lot with repeat cycles

O1000(Drill Holes 2mm deep 5 mm apart*10)
#501=10 (number of holes )
Goo G90 G54 p1 Xo Yo Z50 Mo3 S1000 G43 H1
G00 Z2.0
()
While [#501 GT 0]Do 1
Go1 G91 Z-4.0 F100.0
Goo z4.0
G00 x-5.0
#501=[#501-1]
END 1


Commands to Home
Bit late this Ulster man but anyway think Tenson use's Mach3 control which doesn't support conditional code like Do/while in the main G-code file so needs to be done thru macro's. And think he was meaning more for the CAD/CAM software to post process it in main G-code file has most folks on here don't get into running macro's and sub routines etc.