%
O1
; (EXAMPLE PROG - TURN PLUG)
; (STOCK: ALUM 1.5" X 17MM + 10MM)
; (ALUM CUTTING SPEED: 75M/MIN ROUGH, 185M/MIN FINISH)
;
; (VARIABLES)
#500=38.1    (STOCK DIAMETER)
#501=17.0    (STOCK LENGTH)
#502=75.0    (SURFACE M/MIN)
#503=0.4     (ROUGHING FEED: MM/REV)
#504=150.0   (SURFACE M/MIN FINISHING)
#505=0.1     (FINISHING FEED: MM/REV)
;
N1
G54          (WORK OFFSET)
G21          (METRIC)
G28 U0 W0    (GO HOME)
G50 S2000    (MAX SPINDLE SPEED)
;
; (FACE WITH 80DEG DIAMOND TOOL AND SPEED LIMITING)
G00 T0101          (80DEG DIAMOND TOOL, TOOL 1)
G50 S1000          (CLAMP SPEED AT 1000RPM)
G96 S#502          (CONST SURF SPEED)
G99                (FEED PER REV)
;
M03                (SPINDLE ON, NORMAL DIR)
G00 Z#501          (INITIAL Z POSITION)
G00 X[#500+1.0]    (INITIAL X POSITION)
M08                (TURN ON COOLANT)
G01 X-0.1 F#503     (FACE FROM OUTSIDE DOWN TO -0.1)
G01 Z[#501+1.0] F1.0 (MOVE OFF FROM FACE)
M09                (TURN OFF COOLANT)
M05                (TURN OFF SPINDLE)
G28 U0 W0          (RETURN TO HOME)
M01                (OPTIONAL STOP)
; (ROUGH OD 38.0 TO 20.5MM)
; (USE 2.0MM DOC -> 8 PASSES)
N2
G00 T0101          (80DEG DIAMOND TOOL, TOOL 1)
G50 S2000          (CLAMP SPEED AT 2000)
G96 S#502          (CONST SURF SPEED)
G99                (FEED PER REV)
G00 X[#500 + 0.5] Z#501   (INITIAL POINT FOR ROUGHING)
M03                (SPINDLE ON)
M08                (TURN ON COOLANT)
G00 X36.0 Z#501
G01 X36.0 Z5.5 F#503 (FIRST PASS)
G01 X[#500+0.5] F#503 (RETRACT X)
G00 Z#501           (RETRACT Z)
G00 X34.0
G01 X34.0 Z5.5 F#503 (SECOND PASS)
G01 X[#500+0.5] F#503
G00 Z#501
G00 X32.0
G01 X32.0 Z5.5 F#503 (THIRD PASS)
G01 X[#500+0.5] F#503
G00 Z#501
G00 X30.0
G01 X30.0 Z5.5 F#503 (FOURTH PASS)
G01 X[#500+0.5] F#503
G00 Z#501
G00 X28.0
G01 X28.0 Z5.5 F#503 (FOURTH PASS)
G01 X[#500+0.5] F#503
G00 Z#501
G00 X26.0
G01 X26.0 Z5.5 F#503 (FIFTH PASS)
G01 X[#500+0.5] F#503
G00 Z#501
G00 X24.0
G01 X24.0 Z5.5 F#503 (SIXTH PASS)
G01 X[#500+0.5] F#503
G00 Z#501
G00 X22.0
G01 X22.0 Z5.5 F#503 (SEVENTH PASS)
G01 X[#500+0.5] F#503
G00 Z#501
G00 X20.5
G01 X20.5 Z5.5 F#503 (EIGHTH PASS)
M09                (TURN OFF COOLANT)
M05                (TURN OFF SPINDLE)
G28 U0 W0          (RETURN TO HOME)
M01                (OPTIONAL STOP)
; (FINISH OD 20.3MM)
N3
G00 T0202          (30DEG DIAMOND TOOL, TOOL 2)
G50 S2000          (CLAMP SPEED AT 2000)
G96 S#504          (CONST SURF SPEED)
G99                (FEED PER REV)
G00 X[#500+0.5]
G00 Z#501
G00 X20.3
G01 X20.3 Z5.0 F#505
G01 X[#500+0.5] F#505
G00 Z#501
M09
M05
G28 U0 W0
M01
; (CUTOFF)
G00 T1010
G00 Z-3.0           (CUTOFF BLADE IS 3.0MM WIDE)
G00 X[#500+2.0]
M03
M08
G50 S1000           (CLAMP SPEED AT 1000RPM)
G96 S#502           (CSS)
G01 X-0.1 F0.05     (CUTOFF)
G01 X[#500+2.0] F4.0 (RETRACT)
M09
M05
G28 U0 W0
M30                 (END PROGRAM)
%