Compiled by V.K.Modi BBIT V.V.Nagar
Examples of G Code and M Code Programs for Milling
Compiled by V.K.Modi Mechanical Department BBIT V.V.Nagar
Objective:
To study the given drawing for prepare part program
To calculate cutting process parameters
To Develop part program for given drawing
Program:-1
Using ISO Format for G & M Code).prepare part program for following figure for
contouring operation... State your assumptions & Necessary calculations for cutting tool
and cutting parameters
Figure:1
Size of Work Piece 200*200 *20 All Dimensions Are In Mm
Compiled by V.K.Modi BBIT V.V.Nagar
Assumptions & Calculations
Work Piece Material Cast Iron Ductile
Operation:-Contouring
Cutting speed - 6m/min
Tool material: -HSS (High Speed Steed
Tool diameter =2 mm
Feed = 0.075mm/tooth
For end milling feed =50 % of base speed =0.0375 mm/tooth
Cutting speed=954 rpm
No of Flutes on End mill=4
Feed=f*no of flutes *N
=0.0375*4*954
= 143.1 mm/min = Take Feed =140 mm/min
Speed V=6m/min
N= V*1000/3.14*2 (Where 2=Diameter of End Mill)
Depth of cut=1mm
N=954 RPM =950 RPM
First starting point coordinate is 20, 20
Part program
%
N100 G00 G40 G49 G80 G90
/ N102 G91 G28 Z0.
/ N104 G28 X0. Y0.
/ N106 G92 X0. Y0. Z0.
N108 G00 G90 X20. Y20. S950 M03
N110 G43 H1 Z50. (For Tool offset)
N112 G00
N114 Z10.
Compiled by V.K.Modi BBIT V.V.Nagar
N116 G01 Z-1. F15. (Plungė feed)
N118 G01 X50. F140
N120 G02 X100. I25. J0.
N122 G01 X130.
N124 G02 X150. Y40. I20. J0.
N126 G01 X170.
N128 Y20.
N130 X185.
N132 Y50.
N134 G02 Y90. I0. J20.
N136 G01 Y120.
N138 X155.
N140 Y140.
N142 X175.
N144 Y170.
N146 X145.
N148 G03 X95. I-25. J0.
N150 G02 X55. I-20. J0.
N152 G1 X20.
N154 Y140.
N156 Y20.
N158 G00 Z50.
N162 M05 (Spinale Stop)
N164 G91 G28 Z0.
/ N166 G28 X0. Y0.
N168 G90
N170 M30 Program End
%
Compiled by V.K.Modi BBIT V.V.Nagar
Program: - 2
Using ISO Format (G & M Code) Prepare part program for following figure. State your
assumptions & Necessary calculations for cutting tool and cutting
Figure:2
Speed 6m/min
Feed=0.075mm/tooth
Compiled by V.K.Modi BBIT V.V.Nagar
W.P Material:- CAST IRON ductile
Tool Material: H.S.S
Tool Diameter =4 Mm
Speed=477 RPM =475 Rpm
Feed =71.55 mm/min =70 mm/min
Calculation Same as above Program
Operation:-Contouring
Depth of Cut= 2mm
First starting point coordinate is 20,20 (From Origin 0,0)
%
N100 G00 G40 G49 G80 G90
/ N102 G91 G28 Z0.
/ N104 G28 X0. Y0.
/ N106 G92 X0. Y0. Z0.
N108 G00 G90 X20. Y20. S0475M03
N110 G43 H1 Z50.(Tool offset stting)
N114 Z10.
N116 G01 Z-2 F15.04
N120 Y210.F70
N122 X25.
N124 X30.
N126 X130.
N128 Y175.
N130 G03 X170. I20. J0.
N132 G01 Y210.
N134 X215.
N136 Y170.
N138 G02 Y130. I0. J-20.
Compiled by V.K.Modi BBIT V.V.Nagar
N140 G01 Y110.
N142 G02 Y50. I0. J-30.
N144 G01 Y20.
N146 X205.
N148 G02 X180. Y45. I0. J25.
N150 G01 X150.
N152 G02 X125. Y20. I-25. J0.
N154 G01 X100.
N156 Y70.
N158 G03 X50. I-25. J0.
N160 G01 Y20.
N162 X20.
N164 G0 Z50.
N168 M05
N170 G91 G28 Z0.
/ N172 G28 X0. Y0.
N174 G90
N176 M30 (Program End)
%
Compiled by V.K.Modi BBIT V.V.Nagar
Program No:-3
Using ISO Format for G & M Code prepare part program for following figure. State
your assumptions & Necessary calculations for cutting tool and cutting
Figure:3
Depth of cut =2 mm
Operation contouring
Dia of end mill=5mm
RPM= 700 RPM (From Calculation)
Feed =61.6 mm/min = 60mm/min
%
N10 G00 G40 G49 G80 G90
/ N15 G91 G28 Z0.
/ N20 G28 X0. Y0.
/ N25 G92 X0. Y0. Z0.
Compiled by V.K.Modi BBIT V.V.Nagar
N30 G00 G90 X30. Y11. S0700 M03
N35 G43 H1 Z50.
N45 Z10.
N50 G01 Z-2. F15.00 (Plungė Feed 1/4th)
N55 G01 X90. F60
N60 G03 Y23. I0. J6.
N65 G01 X70.
N70 G02 X64. Y29. I0. J6.
N75 G01 Y44.
N80 X40.
N85 G01 Y34.
N90 G02 X28. I-6. J0.
N95 G01 Y50.
N100 G03 X22. Y44. I0. J-6.
N105 G01 Y19.
N110 G03 X30. Y11. I8. J0.
N115 G00 Z50.
N125 M05
N130 G91 G28 Z0.
/ N135 G28 X0. Y0.
N140 G90
N145 M30 (Program End)
%

Examples of g code an d m code programs for milling

  • 1.
    Compiled by V.K.ModiBBIT V.V.Nagar Examples of G Code and M Code Programs for Milling Compiled by V.K.Modi Mechanical Department BBIT V.V.Nagar Objective: To study the given drawing for prepare part program To calculate cutting process parameters To Develop part program for given drawing Program:-1 Using ISO Format for G & M Code).prepare part program for following figure for contouring operation... State your assumptions & Necessary calculations for cutting tool and cutting parameters Figure:1 Size of Work Piece 200*200 *20 All Dimensions Are In Mm
  • 2.
    Compiled by V.K.ModiBBIT V.V.Nagar Assumptions & Calculations Work Piece Material Cast Iron Ductile Operation:-Contouring Cutting speed - 6m/min Tool material: -HSS (High Speed Steed Tool diameter =2 mm Feed = 0.075mm/tooth For end milling feed =50 % of base speed =0.0375 mm/tooth Cutting speed=954 rpm No of Flutes on End mill=4 Feed=f*no of flutes *N =0.0375*4*954 = 143.1 mm/min = Take Feed =140 mm/min Speed V=6m/min N= V*1000/3.14*2 (Where 2=Diameter of End Mill) Depth of cut=1mm N=954 RPM =950 RPM First starting point coordinate is 20, 20 Part program % N100 G00 G40 G49 G80 G90 / N102 G91 G28 Z0. / N104 G28 X0. Y0. / N106 G92 X0. Y0. Z0. N108 G00 G90 X20. Y20. S950 M03 N110 G43 H1 Z50. (For Tool offset) N112 G00 N114 Z10.
  • 3.
    Compiled by V.K.ModiBBIT V.V.Nagar N116 G01 Z-1. F15. (Plungė feed) N118 G01 X50. F140 N120 G02 X100. I25. J0. N122 G01 X130. N124 G02 X150. Y40. I20. J0. N126 G01 X170. N128 Y20. N130 X185. N132 Y50. N134 G02 Y90. I0. J20. N136 G01 Y120. N138 X155. N140 Y140. N142 X175. N144 Y170. N146 X145. N148 G03 X95. I-25. J0. N150 G02 X55. I-20. J0. N152 G1 X20. N154 Y140. N156 Y20. N158 G00 Z50. N162 M05 (Spinale Stop) N164 G91 G28 Z0. / N166 G28 X0. Y0. N168 G90 N170 M30 Program End %
  • 4.
    Compiled by V.K.ModiBBIT V.V.Nagar Program: - 2 Using ISO Format (G & M Code) Prepare part program for following figure. State your assumptions & Necessary calculations for cutting tool and cutting Figure:2 Speed 6m/min Feed=0.075mm/tooth
  • 5.
    Compiled by V.K.ModiBBIT V.V.Nagar W.P Material:- CAST IRON ductile Tool Material: H.S.S Tool Diameter =4 Mm Speed=477 RPM =475 Rpm Feed =71.55 mm/min =70 mm/min Calculation Same as above Program Operation:-Contouring Depth of Cut= 2mm First starting point coordinate is 20,20 (From Origin 0,0) % N100 G00 G40 G49 G80 G90 / N102 G91 G28 Z0. / N104 G28 X0. Y0. / N106 G92 X0. Y0. Z0. N108 G00 G90 X20. Y20. S0475M03 N110 G43 H1 Z50.(Tool offset stting) N114 Z10. N116 G01 Z-2 F15.04 N120 Y210.F70 N122 X25. N124 X30. N126 X130. N128 Y175. N130 G03 X170. I20. J0. N132 G01 Y210. N134 X215. N136 Y170. N138 G02 Y130. I0. J-20.
  • 6.
    Compiled by V.K.ModiBBIT V.V.Nagar N140 G01 Y110. N142 G02 Y50. I0. J-30. N144 G01 Y20. N146 X205. N148 G02 X180. Y45. I0. J25. N150 G01 X150. N152 G02 X125. Y20. I-25. J0. N154 G01 X100. N156 Y70. N158 G03 X50. I-25. J0. N160 G01 Y20. N162 X20. N164 G0 Z50. N168 M05 N170 G91 G28 Z0. / N172 G28 X0. Y0. N174 G90 N176 M30 (Program End) %
  • 7.
    Compiled by V.K.ModiBBIT V.V.Nagar Program No:-3 Using ISO Format for G & M Code prepare part program for following figure. State your assumptions & Necessary calculations for cutting tool and cutting Figure:3 Depth of cut =2 mm Operation contouring Dia of end mill=5mm RPM= 700 RPM (From Calculation) Feed =61.6 mm/min = 60mm/min % N10 G00 G40 G49 G80 G90 / N15 G91 G28 Z0. / N20 G28 X0. Y0. / N25 G92 X0. Y0. Z0.
  • 8.
    Compiled by V.K.ModiBBIT V.V.Nagar N30 G00 G90 X30. Y11. S0700 M03 N35 G43 H1 Z50. N45 Z10. N50 G01 Z-2. F15.00 (Plungė Feed 1/4th) N55 G01 X90. F60 N60 G03 Y23. I0. J6. N65 G01 X70. N70 G02 X64. Y29. I0. J6. N75 G01 Y44. N80 X40. N85 G01 Y34. N90 G02 X28. I-6. J0. N95 G01 Y50. N100 G03 X22. Y44. I0. J-6. N105 G01 Y19. N110 G03 X30. Y11. I8. J0. N115 G00 Z50. N125 M05 N130 G91 G28 Z0. / N135 G28 X0. Y0. N140 G90 N145 M30 (Program End) %