% ( tell that this is the beginning of the program) (Start up program by giving the following commands) G18 g21 G40 G49 G61 G80 G90 g94 S550 F100 M3 g0 g53 z0 (rapid home as set by home switches) g0 x41 (rapid x axis out to material diameter) g0 z1 (rapid z1) g01 z0 (feedrate to z0) g01 x0 (feedrate face off to x0 ) g0 z2 x41 (rapid tool away from the cut) g0 x45 (rapid out x axis to material diameter) g28 (end of facing off-----------------------------------------) G0 X41 Z1 (rapid to X41 -material diameter- z=1) g01 x39 (feedrate to position tool at start of rough cut) G01 Z-19 (feedrate the first cut dia 39 as far as z20 +1mm away from final size) G0 X41 Z-17 (rapid tool away from the job to x+5 and z-2) g0 x45 (rapid out) G0 Z4 (rapid to z4) g28 (od roughed out) #1=38 (parm #1 value is 38) f200 (feed 200 rpm) (call sub o1 to machine od) m98 p1 l2 (go to subroutine 1 and repeat 4 times) g28 (--go home for debugging) (od finishing cut------------------) f100 (feed 200 rpm) g0 X30.5 z1 ( rapid to z1 x30.5) g01 z-19.5 (feedrate to z-19.5-- .fmm away from final size) g0 z-17 x35 (rapid away from material) g0 z1 (rapid to Z1) f100 (feed 100mm per minute) G01 x30 G01 z-20 (feedrate to x30 z-20 -final cut) (last cut on diameter finished---) g28 (go home) #2=-1 f50 g0 x32 z1 m98 p2 l3 ( called subroutine 2 -taper-to repeat 3 times) ( subroutine o2 taper is finished--------------------------) g28 ( call subroutine o3 to turn the step down--------------------) #3=18 F100 g0 x32 g0 z--15 m98 p3 l5 (subroutine 3 finished---------- final cut ) g28 g0 x32 g0 z18 g01 x19 g01 z-30 g0 x 40 g0 z21 go1 x-1 g01 x45 (rapid tool out) g28 (go home) m30 (end program) ( subroutines start ######################---------------------------------------) O3 (start sub#3) g0 x32 g0 z-#3 g01 x19.6 g0 x32 #3=[#3-3] M99 (End subroutine #3--------------------------------------) ( sub o2 turns taper -----------------------------------) O2 ( first line of subroutine 2-machine the taper ) g0 x30.5 z#2 (rapid to first cut) g01 x0 z0 (feed first cut) #2=[#2-1] (adjust parm) m99 (subroutine ends) (end of sub #2 which turns the taper---------------------------------------- (Subroutine o1-------turns down OD---------------------------) O1 ( first line of subroutine 1- rough the od ) g0 x#1 (rapid to first cut on dia) g01 z-20 (feed cut on diameter) g0 x39 (rapid tool out) #1=[#1-2] ( adjust parm) g0 z1 (rapid to start of next cut) m99 (subroutine ends) (end of sub#1----------------------------------------------------)