%
o1000 sub
(making a rectangular inner slot)
(use climb milling)
(center cut the material, stepover = 1.5 * tool radius)
(o200 call [x1] [y1] [x2] [y2] [tool number] [depth per cut] [depth] [safety height] [feedrate])
# = #1
# = #2
# = #3
# = #4
# = #5
# = #6
# = #7
# = #8
# = #9
# = [0.0625]
; G42 X# Y[#] D#
; # = [# + 2 *#]
; # = [# + 2 *#]
; # = [# - 2 *#]
; # = [# - 2 *#]
# = [[#+#]/2]
# = [[#+#]/2]
G0 X[#] Y[#]
; o1100 while [# GT #]
; o1100 while [[[#-#] GT #]]
; o1100 while [[[#-#] GT #] OR [# GT #]]
; o1100 while [[# GT #] OR [# GT #]]
# = [[#+#]/2]
# = [[#+#]/2]
(plunge and start working)
G01 Z# F#
(draw the rectangle)
(mark a 0.40"x2" rectangle)
(rapid to the starting XY)
(start cutting with diameter offset)
G42 G01 X# F# D#
G01 X# Y# F#
G01 X# Y# F#
G01 X# Y# F#
G01 X# Y# F#
G01 X# Y# F#
G40 (cancel diameter offset)
(get back to starting position without offset)
G01 X[#] Y[#] F#
; o1110 if [[#+1.5*#] LE [#-1.5*#]]
o1110 if [[#+2*#] LE [#-2*#]]
# = [#+1.5*#]
# = [#-1.5*#]
o1110 endif
; o1120 if [[#+1.5*#] LE [#-1.5*#]]
o1120 if [[#+2*#] LE [#-2*#]]
# = [#+1.5*#]
# = [#-1.5*#]
o1120 endif
(increment depth by parametr #1 by 0.01)
; #1 = [#+#]
; o1100 endwhile
; G0 Z#
o1000 endsub
(program to make a 0.40 inch x 3 inch slotted rectangle)
G17 (XY plane select)
G20 (inch mode)
G40 (cancel diameter comp)
G49 (cancel length offset)
G54 (coordinate system 1)
G80 (cancel motion)
G90 (non-incremental motion)
G94 (feed/minute mode)
(home)
G53 G0 Z-0.5 (temporarily cancel offsets, retract quill)
M05 M09 (spindle and coolant off)
G53 X11.5 Y0.15 (move X and Y to home)
(set the coordinate system to workpiece offset)
(origin of the second coordinate system is set to X=11.5, Y=5 and Z=-0.5)
(second coordinate system is selected by G54)
G10 L2 P2 X9.5 Y0.15 Z-4.76
; G10 L2 P2 X9.5 Y0.15 Z-1.76
(set the tool parameters)
(diameter of dremel 561 cutter = 1/8 inch)
(radius of dremel 561 cutter = 1/16 inch)
(tool length offset = 1 inches and radius of cutter bit = 1/16 inches)
(P1 means the tool number 1, which can later be referenced by G41's D1)
G20 G10 L1 P1 Z0 R0.0625
G55 X0 Y0 Z0 (start using the second coordinate system)
G01 F4 (setting the feed rate to 4 inches per minute)
G0 X0.5 Y2 (rapid to the starting XY)
; o100 call [0.30] [1] [.7] [4] [1] [0.4] [.1] [0.02] [.0625]
o1000 call [0.3] [1] [0.7] [4] [1] [-0.4] [-1] [0.02] [10]
( getting back to start position )
G0 Z0 (rapid to 0 above the part)
M05 M09 (spindle and coolant off)
G0 X0 Y0 (rapid to the starting XY)
G54 (coordinate system 1)
(back to home)
G53 G0 Z-0.5 (temporarily cancel offsets, retract quill)
M05 M09 (spindle and coolant off)
G53 X11.5 Y5 (move X and Y to home)
G49 (cancel length offset)
M2 (end program)
%