SlideShare una empresa de Scribd logo
1 de 34
Introduction to G-Code
Programming
Computer Integrated Manufacturing
Unit 2: CNC Machining
In this lesson:
Review Coordinate Geometry Basics
Identify common Terminology
Examine G and M - Code language
Provide opportunities for Review and
Practice
Rectangular Coordinate System
X-axis
Y-axis
Origin
.125 inch spacing
A (X,Y)(1,.875)
(1.000,1.000
)(-1.125,.625)
(-.375,-.500)
(.750,-1.000)
Ordered Pairs
A
B
C
D
3D Coordinate System (X,Y,Z)
X-axis
Z-
axis
Y-axis
Basic Machine Axes: 3 axis
Milling Machines: 3 axis
X – axis (table left and
right)
Y – axis (table in and out)
Z – axis (usually the
spindle axis)
Additional Axes
A – axis (angular axis about X - axis)
B – axis (angular axis about Y – axis)
C – axis (angular axis about Z – axis)
U – axis (secondary axis parallel to X)
V – axis (secondary axis parallel to Y)
W – axis (secondary axis parallel to Z)
Milling Machines: 4 axis
Terminology
NC – Numerical Control
CNC – Computer Numerical Control
DNC – Direct Numerical Control
APT – Automatic Programmed Tool
CAD – Computer Aided Design
CAM – Computer Aided Manufacturing
CIM – Computer Integrated Manufacturing
Download Code Sheet
Click here to open Code Sheet
G - Code Programming
G – Code Programming
Originally called the “Word Address”
programming format.
Processed one line at a time sequentially.
Common Format of a Block
Sequence
#
Preparatory
Function
Dimension
Words
Feed
Rate
Spindle
Function
Tool
Function
Misc.
Function
N50 G90 G01 X1.40Y2.25 F10 S1500 T01 M03
Individual Words
Word Address 1
N – Sequence or line number
A tag that identifies the beginning of a block of
code. It is used by operators to locate specific
lines of a program when entering data or verifying
the program operation.
G – Preparatory function
G words specify the mode in which the milling
machine is to move along its programmed axes.
Word Address 2
Dimension Words
X – Distance or position in X direction
Y – Distance or position in Y direction
Z – Distance or position in Z direction
M – Miscellaneous functions
M words specify CNC machine functions not
related to dimensions or axial movements.
F – Feed rate (inches per minute or millimeters per
minute)
Rate at which cutting tool moves along an axis.
S – Spindle speed (rpm – revolutions per minute)
Controls spindle rotation speed.
T – Tool number
Specifies tool to be selected.
Word Address 3
I – Circular cutting reference for x axis
J – Circular cutting reference for y axis
K – Circular cutting reference for z axis
Word Address 4
G Word
G words or codes tell the machine to
perform certain functions. Most G
words are modal which means they
remain in effect until replaced by
another modal G code.
Common G Codes
G00 – Rapid positioning mode
Tool is moved along the shortest route to
programmed X,Y,Z position. Usually NOT
used for cutting.
G01 – Linear Interpolation mode
Tool is moved along a straight-line path at
programmed rate of speed.
G02 – Circular motion clockwise (cw)
G03 – Circular motion counter clockwise
(ccw)
Common G Codes, con.,
G17 – XY plane
G18 – XZ plane
G19 – YZ plane
G20 – Inch Mode
G21 – Metric Mode
G28 – Return to axis machine Zero
(Home)
G Codes: G90, G91
G90 – Absolute Coordinate Reference
References the next position from an absolute
zero point which is set once for the entire
program.
G91 – Incremental Coordinate Reference
References the next position from the previous
position.
G Codes: Canned Cycles
G80 – Cancel canned cycle
G81 – Drilling cycle
G83 – Peck drilling cycle
G84 – Tapping cycle
G85 – Boring cycle
G86 – Boring cycle
NOTE: A canned cycle stays in effect until
cancelled by a G80.
Canned Cycles: G81
G81 – Drilling Cycle
Feed to depth, rapid return
Example of program code:
N35 G81 X.500Y.500Z-1.000 R.100 F1.50
N36 X1.000Y1.500
N37 X1.500Y2.000
N38 G80
Canned Cycles: G83, G84
G83 – Peck Drilling Cycle
Feed to an intermediate depth, rapid out, rapid
back to just above previous depth, feed to next
depth, rapid out, repeat until reaching full depth.
G84 – Tapping Cycle
This cycle creates internal threads in an existing
hole.
NOTE: One cannot over-ride the feed rate.
Canned Cycles: G85, G86
G85 - Boring Cycle
Feed to depth, feed back out.
G86 – Boring Cycle
Feed to depth, rapid out.
G Codes: Cutter Compensation
G40 – Cancel cutter diameter
compensation.
G41 – Cutter compensation left.
G42 – Cutter compensation right.
M Word
M words tell the machine to perform
certain machine related functions,
such as: turn spindle on/off, coolant
on/off, or stop/end program.
Professional Development ID Code: 6006
Common M words
M00 – Programmed pause
Automatically stops machine until operator pushes a button
to resume program.
M01 – Optional stop
A stop acted upon by the machine when operator has
signaled this command by pushing a button.
M02 – End of program
Stops program when all lines of code are completed. Must
be last command in program.
M03 – Turn spindle on
In clockwise direction
M04 – Turn spindle on
In counter clockwise direction
M05 – Stop spindle
Usually used prior to tool change or at end of program.
M06 – Tool change
Stops program and calls for a tool change, either
automatically or manually.
Common M words
M08 – Turns Accessory 1 on.
M09 – Turns Accessory 1 off.
M10 – Turns Accessory 2 on.
M11 – Turns Accessory 2 off.
M30 – End of program
Similar to M02 but M30 will also “rewind” the program.
Must be last statement in program. If used, DO NOT
use M02.
Common M words
Zero Points
Part Zero
– Used for absolute programming mode.
– Usually a position on the part that all absolute
coordinates are referenced to.
– Changes with different parts and programs.
Machine Zero or Machine Home Position
– Fixed for each machine from the manufacturer.
– Not changeable.
Cutter Path Generation
Cutter path is generated by moving the
tool from point to point. The points are
previously defined from the part
drawing dimensions.
Each line of code will show the
destination point of where the tool will
go to.
Interpolation
Method of determining intermediate
points along a cutting path.
Two methods:
• Linear interpolation – cut a path along a
specified angle at a specified feed rate.
• Circular interpolation – cut a path along an arc
or circle at a specified feed rate.
Axis movements: Caution!
Multiple axis movements are possible.
“Best Practice” is NOT to make a 3-axis
movement using one line of code.
Move to position using two axes, X,Y;
then move the Z with an additional
line of code.
Curriculum Alignment:
Unit 2: CNC Machining
Section 2.3 – CNC Machining
PowerPoint – Introduction to CNC
PowerPoint – CNC Programming

Más contenido relacionado

La actualidad más candente (20)

Cnc technology
Cnc technology Cnc technology
Cnc technology
 
CNC Lathe Operating & Programming
CNC Lathe Operating & ProgrammingCNC Lathe Operating & Programming
CNC Lathe Operating & Programming
 
Canned cycle
Canned cycleCanned cycle
Canned cycle
 
Manual part programming
Manual part programmingManual part programming
Manual part programming
 
CNC PROGRAMMING FOR BEGAINER Part 1
CNC PROGRAMMING FOR BEGAINER Part 1CNC PROGRAMMING FOR BEGAINER Part 1
CNC PROGRAMMING FOR BEGAINER Part 1
 
Various work holding devices
Various work holding devicesVarious work holding devices
Various work holding devices
 
Nc Machine
Nc MachineNc Machine
Nc Machine
 
Cnc milling turning
Cnc milling turning Cnc milling turning
Cnc milling turning
 
CNC Machines and its Components
CNC Machines and its ComponentsCNC Machines and its Components
CNC Machines and its Components
 
Machining Process
Machining ProcessMachining Process
Machining Process
 
Numerical control machines
Numerical control machines Numerical control machines
Numerical control machines
 
Cnc lathe
Cnc latheCnc lathe
Cnc lathe
 
ppt on cnc
ppt on cncppt on cnc
ppt on cnc
 
Chapter 3 CNC turning and machining centers
Chapter 3 CNC turning and machining centersChapter 3 CNC turning and machining centers
Chapter 3 CNC turning and machining centers
 
Cnc pgrming seminar-
Cnc pgrming   seminar-Cnc pgrming   seminar-
Cnc pgrming seminar-
 
Jigs and Fixture
Jigs and FixtureJigs and Fixture
Jigs and Fixture
 
CNC Programming
CNC Programming CNC Programming
CNC Programming
 
Cnc cutting tools
Cnc cutting toolsCnc cutting tools
Cnc cutting tools
 
CNC part programming
CNC part programmingCNC part programming
CNC part programming
 
machining and machine tool (Indexing milling machine)
machining and machine tool (Indexing milling machine)machining and machine tool (Indexing milling machine)
machining and machine tool (Indexing milling machine)
 

Destacado

Introduction to cnc machines (1)
Introduction to cnc machines (1)Introduction to cnc machines (1)
Introduction to cnc machines (1)someshking
 
4 basic cnc programming milling
4 basic cnc programming milling4 basic cnc programming milling
4 basic cnc programming millingMahesh Namdev
 
G and m codes
G and m codesG and m codes
G and m codessnakeaye
 
CNC Machines
CNC MachinesCNC Machines
CNC Machinespratik207
 
Mach3 g code language reference
Mach3 g code language referenceMach3 g code language reference
Mach3 g code language referenceLong Nhu
 
G and m_programming_for_mills_manual
G and m_programming_for_mills_manualG and m_programming_for_mills_manual
G and m_programming_for_mills_manualTaliya Hemanth
 
CNC Programmingmodifies examination 1
CNC Programmingmodifies examination 1CNC Programmingmodifies examination 1
CNC Programmingmodifies examination 1Prof. S.Rajendiran
 
Fanuc ot g code training manual
Fanuc ot g code training manualFanuc ot g code training manual
Fanuc ot g code training manualHien Dinh
 
CNC Milling
CNC MillingCNC Milling
CNC Millingendika55
 
Haas mill programming workbook
Haas mill programming workbook Haas mill programming workbook
Haas mill programming workbook Mihaela Lupoian
 
2D & 3D Modelling with Mathematica
2D & 3D Modelling with Mathematica2D & 3D Modelling with Mathematica
2D & 3D Modelling with MathematicaMiles Ford
 
Me 443 4 plotting curves Erdi Karaçal Mechanical Engineer University of Gaz...
Me 443   4 plotting curves Erdi Karaçal Mechanical Engineer University of Gaz...Me 443   4 plotting curves Erdi Karaçal Mechanical Engineer University of Gaz...
Me 443 4 plotting curves Erdi Karaçal Mechanical Engineer University of Gaz...Erdi Karaçal
 

Destacado (20)

Introduction to cnc machines (1)
Introduction to cnc machines (1)Introduction to cnc machines (1)
Introduction to cnc machines (1)
 
Complete g code list
Complete g code listComplete g code list
Complete g code list
 
Catalogue G-Code 2015
Catalogue G-Code 2015Catalogue G-Code 2015
Catalogue G-Code 2015
 
4 basic cnc programming milling
4 basic cnc programming milling4 basic cnc programming milling
4 basic cnc programming milling
 
G and m codes
G and m codesG and m codes
G and m codes
 
Cnc Steps
Cnc StepsCnc Steps
Cnc Steps
 
CNC Seminar
CNC SeminarCNC Seminar
CNC Seminar
 
CNC Machines
CNC MachinesCNC Machines
CNC Machines
 
part programming (cnc)
part programming (cnc)part programming (cnc)
part programming (cnc)
 
Mach3 g code language reference
Mach3 g code language referenceMach3 g code language reference
Mach3 g code language reference
 
G and m_programming_for_mills_manual
G and m_programming_for_mills_manualG and m_programming_for_mills_manual
G and m_programming_for_mills_manual
 
CNC Programmingmodifies examination 1
CNC Programmingmodifies examination 1CNC Programmingmodifies examination 1
CNC Programmingmodifies examination 1
 
Fanuc ot g code training manual
Fanuc ot g code training manualFanuc ot g code training manual
Fanuc ot g code training manual
 
CNC Milling
CNC MillingCNC Milling
CNC Milling
 
Nc programming
Nc programmingNc programming
Nc programming
 
Understanding G codes
Understanding G codesUnderstanding G codes
Understanding G codes
 
5 g-code
5   g-code5   g-code
5 g-code
 
Haas mill programming workbook
Haas mill programming workbook Haas mill programming workbook
Haas mill programming workbook
 
2D & 3D Modelling with Mathematica
2D & 3D Modelling with Mathematica2D & 3D Modelling with Mathematica
2D & 3D Modelling with Mathematica
 
Me 443 4 plotting curves Erdi Karaçal Mechanical Engineer University of Gaz...
Me 443   4 plotting curves Erdi Karaçal Mechanical Engineer University of Gaz...Me 443   4 plotting curves Erdi Karaçal Mechanical Engineer University of Gaz...
Me 443 4 plotting curves Erdi Karaçal Mechanical Engineer University of Gaz...
 

Similar a 5 g-code

Similar a 5 g-code (20)

5 g-code
5   g-code5   g-code
5 g-code
 
CAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptx
CAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptxCAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptx
CAD-CAM-Module-4-Subtractive-Manufacturing-1-print.pptx
 
CNC1.ppt
CNC1.pptCNC1.ppt
CNC1.ppt
 
CNC1.ppt
CNC1.pptCNC1.ppt
CNC1.ppt
 
CNC1 (1).ppt
CNC1 (1).pptCNC1 (1).ppt
CNC1 (1).ppt
 
CNC Training.ppt
CNC Training.pptCNC Training.ppt
CNC Training.ppt
 
Cnc1
Cnc1Cnc1
Cnc1
 
Computer integrated Manufacture & design Lab Manual
Computer integrated Manufacture & design Lab  ManualComputer integrated Manufacture & design Lab  Manual
Computer integrated Manufacture & design Lab Manual
 
CNC1.ppt
CNC1.pptCNC1.ppt
CNC1.ppt
 
cadcampart11.ppt
cadcampart11.pptcadcampart11.ppt
cadcampart11.ppt
 
Lecture 25.pdf
Lecture 25.pdfLecture 25.pdf
Lecture 25.pdf
 
CNC(computerized Numeric Coding) Lecture.pptx
CNC(computerized Numeric  Coding) Lecture.pptxCNC(computerized Numeric  Coding) Lecture.pptx
CNC(computerized Numeric Coding) Lecture.pptx
 
Production automation lab
Production automation labProduction automation lab
Production automation lab
 
CNC Programming.pptx.pdf
CNC Programming.pptx.pdfCNC Programming.pptx.pdf
CNC Programming.pptx.pdf
 
internship presentation.pptx
internship presentation.pptxinternship presentation.pptx
internship presentation.pptx
 
Numerical control and CNC
Numerical control and CNCNumerical control and CNC
Numerical control and CNC
 
Cnc programming
Cnc programmingCnc programming
Cnc programming
 
Cncprogramming
CncprogrammingCncprogramming
Cncprogramming
 
Cnc programming
Cnc programmingCnc programming
Cnc programming
 
CNC.ppt
CNC.pptCNC.ppt
CNC.ppt
 

Más de sundar sivam

Más de sundar sivam (20)

2.plant loyout patterns
2.plant loyout patterns2.plant loyout patterns
2.plant loyout patterns
 
8. chapter 7 work study (time and motion study)
8. chapter 7   work study (time and motion study)8. chapter 7   work study (time and motion study)
8. chapter 7 work study (time and motion study)
 
Unit 1
Unit 1Unit 1
Unit 1
 
Peripheral1
Peripheral1Peripheral1
Peripheral1
 
Implementacion de lean manufacturing en mipymes en el valle del cauca
Implementacion de lean manufacturing en mipymes en el valle del caucaImplementacion de lean manufacturing en mipymes en el valle del cauca
Implementacion de lean manufacturing en mipymes en el valle del cauca
 
42 2
42 242 2
42 2
 
42
4242
42
 
38
3838
38
 
19888 annals 2_head
19888 annals 2_head19888 annals 2_head
19888 annals 2_head
 
5626
56265626
5626
 
5206
52065206
5206
 
715 2216-1-pb
715 2216-1-pb715 2216-1-pb
715 2216-1-pb
 
265 268 tanase-popovici
265 268 tanase-popovici265 268 tanase-popovici
265 268 tanase-popovici
 
247
247247
247
 
78 semenov eng_2
78 semenov eng_278 semenov eng_2
78 semenov eng_2
 
78 semenov eng
78 semenov eng78 semenov eng
78 semenov eng
 
13.50
13.5013.50
13.50
 
3 d
3 d3 d
3 d
 
Release notes 3_d_v61
Release notes 3_d_v61Release notes 3_d_v61
Release notes 3_d_v61
 
Deform 3 d_v61_unix_installation_notes
Deform 3 d_v61_unix_installation_notesDeform 3 d_v61_unix_installation_notes
Deform 3 d_v61_unix_installation_notes
 

5 g-code

  • 1. Introduction to G-Code Programming Computer Integrated Manufacturing Unit 2: CNC Machining
  • 2. In this lesson: Review Coordinate Geometry Basics Identify common Terminology Examine G and M - Code language Provide opportunities for Review and Practice
  • 5. 3D Coordinate System (X,Y,Z) X-axis Z- axis Y-axis
  • 6. Basic Machine Axes: 3 axis Milling Machines: 3 axis X – axis (table left and right) Y – axis (table in and out) Z – axis (usually the spindle axis)
  • 7. Additional Axes A – axis (angular axis about X - axis) B – axis (angular axis about Y – axis) C – axis (angular axis about Z – axis) U – axis (secondary axis parallel to X) V – axis (secondary axis parallel to Y) W – axis (secondary axis parallel to Z)
  • 9. Terminology NC – Numerical Control CNC – Computer Numerical Control DNC – Direct Numerical Control APT – Automatic Programmed Tool CAD – Computer Aided Design CAM – Computer Aided Manufacturing CIM – Computer Integrated Manufacturing
  • 10. Download Code Sheet Click here to open Code Sheet
  • 11. G - Code Programming G – Code Programming Originally called the “Word Address” programming format. Processed one line at a time sequentially.
  • 12. Common Format of a Block Sequence # Preparatory Function Dimension Words Feed Rate Spindle Function Tool Function Misc. Function N50 G90 G01 X1.40Y2.25 F10 S1500 T01 M03 Individual Words
  • 13. Word Address 1 N – Sequence or line number A tag that identifies the beginning of a block of code. It is used by operators to locate specific lines of a program when entering data or verifying the program operation. G – Preparatory function G words specify the mode in which the milling machine is to move along its programmed axes.
  • 14. Word Address 2 Dimension Words X – Distance or position in X direction Y – Distance or position in Y direction Z – Distance or position in Z direction M – Miscellaneous functions M words specify CNC machine functions not related to dimensions or axial movements.
  • 15. F – Feed rate (inches per minute or millimeters per minute) Rate at which cutting tool moves along an axis. S – Spindle speed (rpm – revolutions per minute) Controls spindle rotation speed. T – Tool number Specifies tool to be selected. Word Address 3
  • 16. I – Circular cutting reference for x axis J – Circular cutting reference for y axis K – Circular cutting reference for z axis Word Address 4
  • 17. G Word G words or codes tell the machine to perform certain functions. Most G words are modal which means they remain in effect until replaced by another modal G code.
  • 18. Common G Codes G00 – Rapid positioning mode Tool is moved along the shortest route to programmed X,Y,Z position. Usually NOT used for cutting. G01 – Linear Interpolation mode Tool is moved along a straight-line path at programmed rate of speed. G02 – Circular motion clockwise (cw) G03 – Circular motion counter clockwise (ccw)
  • 19. Common G Codes, con., G17 – XY plane G18 – XZ plane G19 – YZ plane G20 – Inch Mode G21 – Metric Mode G28 – Return to axis machine Zero (Home)
  • 20. G Codes: G90, G91 G90 – Absolute Coordinate Reference References the next position from an absolute zero point which is set once for the entire program. G91 – Incremental Coordinate Reference References the next position from the previous position.
  • 21. G Codes: Canned Cycles G80 – Cancel canned cycle G81 – Drilling cycle G83 – Peck drilling cycle G84 – Tapping cycle G85 – Boring cycle G86 – Boring cycle NOTE: A canned cycle stays in effect until cancelled by a G80.
  • 22. Canned Cycles: G81 G81 – Drilling Cycle Feed to depth, rapid return Example of program code: N35 G81 X.500Y.500Z-1.000 R.100 F1.50 N36 X1.000Y1.500 N37 X1.500Y2.000 N38 G80
  • 23. Canned Cycles: G83, G84 G83 – Peck Drilling Cycle Feed to an intermediate depth, rapid out, rapid back to just above previous depth, feed to next depth, rapid out, repeat until reaching full depth. G84 – Tapping Cycle This cycle creates internal threads in an existing hole. NOTE: One cannot over-ride the feed rate.
  • 24. Canned Cycles: G85, G86 G85 - Boring Cycle Feed to depth, feed back out. G86 – Boring Cycle Feed to depth, rapid out.
  • 25. G Codes: Cutter Compensation G40 – Cancel cutter diameter compensation. G41 – Cutter compensation left. G42 – Cutter compensation right.
  • 26. M Word M words tell the machine to perform certain machine related functions, such as: turn spindle on/off, coolant on/off, or stop/end program. Professional Development ID Code: 6006
  • 27. Common M words M00 – Programmed pause Automatically stops machine until operator pushes a button to resume program. M01 – Optional stop A stop acted upon by the machine when operator has signaled this command by pushing a button. M02 – End of program Stops program when all lines of code are completed. Must be last command in program.
  • 28. M03 – Turn spindle on In clockwise direction M04 – Turn spindle on In counter clockwise direction M05 – Stop spindle Usually used prior to tool change or at end of program. M06 – Tool change Stops program and calls for a tool change, either automatically or manually. Common M words
  • 29. M08 – Turns Accessory 1 on. M09 – Turns Accessory 1 off. M10 – Turns Accessory 2 on. M11 – Turns Accessory 2 off. M30 – End of program Similar to M02 but M30 will also “rewind” the program. Must be last statement in program. If used, DO NOT use M02. Common M words
  • 30. Zero Points Part Zero – Used for absolute programming mode. – Usually a position on the part that all absolute coordinates are referenced to. – Changes with different parts and programs. Machine Zero or Machine Home Position – Fixed for each machine from the manufacturer. – Not changeable.
  • 31. Cutter Path Generation Cutter path is generated by moving the tool from point to point. The points are previously defined from the part drawing dimensions. Each line of code will show the destination point of where the tool will go to.
  • 32. Interpolation Method of determining intermediate points along a cutting path. Two methods: • Linear interpolation – cut a path along a specified angle at a specified feed rate. • Circular interpolation – cut a path along an arc or circle at a specified feed rate.
  • 33. Axis movements: Caution! Multiple axis movements are possible. “Best Practice” is NOT to make a 3-axis movement using one line of code. Move to position using two axes, X,Y; then move the Z with an additional line of code.
  • 34. Curriculum Alignment: Unit 2: CNC Machining Section 2.3 – CNC Machining PowerPoint – Introduction to CNC PowerPoint – CNC Programming