[Home]History of G-Wiz

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Revision 6 . . August 10, 2010 10:37 am by Sammel Lothar [Subroutine for direkt pocketing Circular]
Revision 5 . . June 26, 2008 7:28 pm by KennethLerman
  

Difference (from prior major revision) (no other diffs)

Added: 58a59,116


----------------------------------------------------------------------------------------------------------------------------
Here is a Soubroutine for a Circular Spiral Pocket in EMC G-code
Just change the Values
for Users how want the Tooloffset ad G41 to the Final Circel (G1 G41 X[#4-[#2/2.0]] , G3 I[#2/2.0] , G1 G90 G40 X#4 Y#5)


(Circular Spiral Pocket)
#1=3.000 (tooldiameter)
#2=30.000 (Diameter)
#4=15.000 (centerX)
#5=15.000 (centerY)
#6=-5.000 (Final Depth)
#7=2.000 (safeZ)
#8=1.35 (stepover R)
#9=-2.000 (stepover Z)
#10=100.00 (feedrateZ)
#11=200.00 (feedrateXY)
(calculate How many times into while)
#20=FIX[[[#2-#1]/#8]/2]
(Preamble)
G17 (XY Plane)
G21 (Metric)
G90 (Absolute)
G61 (Exact Path)

(spiral)
G0 X#4 Y#5
G0 Z#7
G1 Z0 F#10 (Move to Zero Z to start increment Z Cycle)
O95 while [#6 lt 0]
O97 If [#6 lt #9]
G1 G91 Z#9
O97 else
G1 G91 Z#6
O97 endif
#6=[#6-#9]
#30=#8
#31=1.0
#21=1
G1 G90 X[#4+#30] F#11
O10 while [#21 lt #20]
G3 X[#4-[#21*#8]] I-[[#31*#8]]
#31=[#31+0.5]
#21=[#21+1]
G3 X[#4+[#21*#8]] I[[#31*#8]]
#31=[#31+0.5]
O10 endwhile
G3 X[#4-[#2/2.0]+[#1/2.0]] Y#5 I-[[[#4+[#21*#8]]-[#4-[#2/2.0]+[#1/2.0]]]/2.0]
G3 I[[#2/2.0]-[#1/2.0]]
G1 G90 X#4 Y#5
O95 endwhile
G0 G90 Z#7
M5
M30



LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
Search:
Published under a Creative Commons License