SlideShare a Scribd company logo
1 of 48
CNC Codes and Letters
NOTE: The following will be a listing and description of
Computer Numerical Control (CNC) Codes and Letter
designations. We will try to stick with only “generic”
codes that will work on most machines. Some
examples may be specifically for the machines we
have at South Adams / Area 18 Machine Trades.
Please contact the instructor if you find any errors,
missing items, or anything you would like to see
added. jdailey@southadams.k12.in.us
You should already have a
list of G&M Codes and
CNC Letters as shown. If
you do not have one, see
your instructor, or
download one off of the
South Adams / Area 18
Machine Trades
Code Meaning Letter Meaning
G00 Positioning (Rapid Traverse) A Rotary indexing axis around the "X" axis
G01 Linear Interpolation (Feed) B Rotary indexing axis around the "Y" axis
G02 Circular Interpolation CW C Rotary indexing axis around the "Z" axis
G03 Circular Interpolation CCW D Cutter Radius / Diameter offset number
G04 Dwell E Feedrate in inches per revolution (Lathe)
G17 X,Y Plane of Interpolation F Feedrate in inches per minute (can be used on lathes)
G18 X,Z Plane of Interpolation G Preparatory commands
G19 Y,Z Plane of Interpolation H Offset Number (Mill - tool length)(Lathe - Position offset)
G20 Input in Inch I Arc center location in the "X" axis
G21 Input in MM J Arc center location in the "Y" axis
G28 Return to Machine zero (reference point) K Arc center location in the "Z" axis
G40 Cutter Compensation cancel L Fixed Cycle repetion count / subprogram repetition count
G41 Cutter Compensation left M Miscellaneous function
G42 Cutter Compensation right N Block / Sequence number
G43 Tool length compensation + O Program Number
G44 Tool length compensation - P Subprogram / Macro Number call
G54-G59 Set Local Coordinate Systems (Datum Shifts) P Dwell time in milliseconds
G80 Canned Cycle cancel P Block number in main program when used with M99
G81 Spot Drilling Cycle (no dwell) Q Depth of peck in fixed cycles (G73and G83)
G82 Drill/Counterbore (with dwell) Q Shift amount in fixed cycle (G76 and G87)
G83 Peck Drilling Cycle R Retract point in fixed cycles
G85 Bore R Arc Radius designation
G90 Absolute Programming S Spindle speed in RPMs
G91 Incremental Programming T Tool function
G92 Set Program Zero U Incremental move in "X" axis
G94 IPM Programming V Incremental move in "Y" axis
G95 IPR Programming W Incremental move in "Z" axis
M00 Program stop X "X" axis coordinate value designation
M01 Optional stop Y "Y" axis coordinate value designation
M02 End of Program Z "Z" axis coordinate value designation
M03 Start Spindle (Clockwise)
M04 Start Spindle (Counterclockwise)
M05 Spindle off
M06 Tool change
M08 Coolant on
M09 Coolant off
M30 Program reset/tape rewind
M98 Sub-Program call
M99 Return to previous program
“G” Codes
- “G” Codes are known as Preparatory Commands
which means they are preparing the CNC machine
to do something.
- Normally there should only be one “G” code per
line, one exception is in the “Safety Line” at the
beginning of the program.
- “G” Codes are to be at the start of the “Block” of
Program.
Safety Line Example: G17 G20 G40 G80 G90
G00 Positioning Rapid Traverse
-First of all notice that it is “G” “Zero” “Zero” all of
the G&M Codes use Zero and not the letter “O”.
-“G00” means the tool is going to move from
where ever it currently is to the next position in a
straight line as fast as the machine will go.
- Think of “G00” as a dragster, something that will
go from point A to point B in a straight line as fast
as possible
Example: G00 X2.00 Y3.00
G01 Linear Interpolation
- “G01” means the tool is going to move from where ever it currently
is to the next position in a straight line but this time with a given
feedrate.
- Think of “G01” as a truck driving on highway 218 or 124 through
Adams County, Indiana, these highways are straight AND they have a
speed limit.
- On Milling Machines, the feedrate will typically be in IPM (inches
per minute) and labeled with an “F”.
-On Turning Machines, the feedrate will typically be in IPR (inches
per revolution) and labeled with an “E or F”
Example: G01 X2.00 Y3.00 F6.00
G02 Circular Interpolation (CW)
-“G02” Used anytime you need an arc in the Clockwise
direction.
- As with any Interpolation (machine movement), the
machine already knows where it is, you only need to
tell it where you want to go next.
-For example: if you are setting at X0,Y0 and you want
to put a 1.00” radius to X1.00, Y1.00 the “Block”
would look like one of the following:
G02 X1.00 Y1.00 R1.00 F12.0
G02 X1.00 Y1.00 I1.00 J0 F12.0
G03 Circular Interpolation (CCW)
-Just like with the “G02” preparatory command, the
“G03” will move from point A to Point B only this time
in a Counter Clockwise direction.
- The “Block” of code will look identical to the code for
“G02” only the code will change.
G03 X1.00 Y1.00 R1.00 F12.0
G03 X1.00 Y1.00 I1.00 J0 F12.0
- Always keep an eye on the details, the difference between “G02”
and “G03” would be devastating if you wanted one and entered the
other into a program!
CNC Vocab pit stop
- Modal [mohd-l]
- A Command that is to remain in a
certain mode until canceled by
another mode
- In other words: it keeps going and
going and going and going….. Until
it is told to stop later in the program
- Antonym = Non-modal
G04 Dwell
-“G04” is used anytime you want to pause or dwell
at a position
- A common “Block” when “Dwell” is required
would be – G04 P500
-The “G04” of course specifies Dwell
-The “P500” states that it will be for 500 milliseconds
- Note: 1 Second equals 1000 milliseconds
- Therefore if you need to pause for 4.5 seconds you
would program the “Block” as: G04 P4500
Example: G04 P1000
G17 X,Y Plane of Interpolation
-“G17” is the most common plane to choose for a
vertical machining center.
-“G17” will normally be one of if not THE first “G”
code in a program.
- The reason the “G17” is so popular is that it could
also refer to the table in front of you, the “X axis”
is right and left movements while the “Y axis”
would be towards and away from you
G18 X,Z Plane of Interpolation
-“G18” could best be described as a normal engine
lathe because the “Z axis” is the longitudinal travel
of the lathe and the “X axis” would be your cross
slide.
- On a vertical machining center, this plane would
be like looking at the screen of the controller since
the “X axis” is right and left and the “Z axis” is up
and down.
G19 Y,Z Plane of Interpolation
-On a Vertical milling machine, this would be the
plane parallel to the side of the machine.
- Once again, just think it through, the “Y axis” is
towards and away from you and the “Z axis” is up
and down.
G20 Inch Input
-“G20” will typically be at the beginning of the
program, that way the CNC knows right away that
every dimension entered will be Inch and not
metric.
- “G20” is very important to enter into each
program you want to be inch, imagine if the
program that ran prior to yours was a metric
program and you do not switch it to inch, every
dimension you enter will be read by the CNC as
metric…. OPPS!
G21 Metric Input
-Many shops have switched over to total metric, so
“G21” is becoming more popular in this area.
- How you program using “G21” is identical to
“G20” the only difference is you are entering
Metric dimensions instead of Inch.
G28 Return to Machine Zero
-AKA: Return to Reference Point
- “G28” can be very handy, On a Vertical Machining
Center anytime you want the tool as far away from
the part vertically as possible you would enter
“G28 G91 Z0”. If you want the part to come as
close to you as possible for easy part changing you
would enter “G28 Y0”
-Example: G28 G91 X0 Y0 Z0 Would bring the
machine as fast as it can to its home position
G40 Cutter Compensation Cancel
-Typically found in the “Safety Line” of the program
- Just like the description implies, “G40” is used to
cancel any cutter compensations whether it is for
length (or height) compensation or Diameter
Compensation.
- Keep in mind that the person operating the
machine prior to you could have done something
with cutter compensation totally legal BUT different
than what you need, cutter compensation cancel will
clear everything out and be ready for you to add.
G41 Cutter Compensation Left
-Cutter compensation is used to program a part
exactly to size using the dimensions provided on
the print…. THEN at the machine, offset that
geometry to compensate for the tool you are using
- Imagine climb milling around the outside of this
picture the cutter would be rotating clockwise and
moving around the picture clockwise, now guess
which side of the part the cutter is…. Your right,
the LEFT side!
G42 Cutter Compensation Right
- Just like the “G41” compensation only the
opposite. Imagine conventional milling the same
outside of this picture, the cutter is still spinning
clockwise but this time the cutter is traveling
counterclockwise around the outside of the part.
NOW which side of the part is the cutter traveling
on? You are right the Right side!
G43 Tool Length Compensation +
- Tool length compensation allows a machine to
adjust for the different lengths of the tools.
- Basically it is telling the machine how far it is
from its “Z” home position to the position when
the part touches the “Z origin” of the part.
- The “H” value will be Added (+) to programmed
“Z” position
Example: G43 Z1.0 H01
G44 Tool Length Compensation -
- Tool length compensation allows a machine to
adjust for the different lengths of the tools.
- Basically it is telling the machine how far it is
from its “Z” home position to the position when
the part touches the “Z origin” of the part.
- The “H” value will be Subtracted (-) from the
programmed “Z” position
Example: G44 Z1.0 H01
G54-G59 Work Offsets
- AKA: Datum Shifts
- AKA: Set Local Coordinate Systems
- Specifies the distance the machine would need
to move from its home position to the origin of
the part or fixture.
- Used mostly when multiple parts / fixtures /
Set-ups are on the same table
Example: G55 G90 G00 X0.000 Y0.000
G80 Canned Cycle Cancel
- AKA: Fixed Cycle Cancel
- Clears out any “Modal” Canned or Fixed cycles
used earlier in a program
- Used in the Safety Line to insure that what
someone else did before does not affect what
you will be doing in your program
Example: G82 X2.00 Y3.00 R.100 Z-.500 F6.0
G80
G81 Spot Drill Cycle (no dwell)
- Specifies that you want to drill to a given depth
- Along with the G81 you will also need to specify
the following:
- Hole Position
- R-Plane
- Z Depth
- Feedrate
Example: G81 X2.00 Y3.00 R.100 Z-.250 F6.0
G82 Spot Drill Cycle (dwell)
- Specifies that you want to drill to a given depth
- Along with the G82 you will also need to specify
the following:
- Hole Position
- R-Plane
- Z Depth
- Feedrate
- Dwell time
Example: G82 X2.00 Y3.00 R.100 Z-.250 F6.0 P500
G83 Peck Drill Cycle
- Specifies that you want to drill to a given depth
- Along with the G83 you will also need to specify
the following:
- Hole Position
- R-Plane
- Z Depth
- Feedrate
- Peck Increment
Example:
G83 X2.00 Y3.00 Z-1.500 R.100 Q.250 F6.0
G83 Peck Drill Cycle Comparison
G83 X2.00 Y3.00 Z-1.500 R.100 Q.250 F6.0
- OR -
N0110 G00 X2.00 Y3.00
N0120 G00 Z.100
N0130 G01 Z-.150 F6.0
N0140 G00 Z.1
N0150 G00 Z-.150
N0160 G01 Z-.400
N0170 G00 Z.1
WE ARE NOT DONE YET…
N0180 G00 Z-.400
N0190 G01 Z-.650
N0200 G00 Z.100
N0210 G00 Z-.650
N0220 G01 Z-.900
N0230 G00 Z.100
N0240 G00 Z-.900
N0250 G01 Z-1.150
N0260 G00 Z.100
STILL A COUPLE MORE LINES…
N0270 G00 Z-1.150
N0280 G01 Z-1.250
N0290 G00 Z.100
That is just for one hole! Now imagine doing that
for EVERY deep hole!
One line per hole versus 19 Lines… you decide!
G73 Peck Drill Cycle (High Speed)
- Specifies that you want to drill to a given depth
- Does NOT fully retract after each peck depth
- Along with the G73 you will also need to specify
the following:
- Hole Position
- R-Plane
- Z Depth
- Feedrate
- Peck Increment
Example:
G73 X2.00 Y3.00 Z-1.500 R.100 Q.250 F6.0
G84 Tapping Cycle (RH)
- Specifies that you want to Tap a previously
drilled hole
- Along with the G85 you will also need to specify
the following:
- Hole Position
- R-Plane
- Z Depth
- Feedrate = RPM X Lead of the thread
- 1/4-20 Thread at 800RPM = F40.0
Example: G84 X2.00 Y3.00 R.100 Z-.250 F40.0
G85 Boring Cycle
- Specifies that you want to Bore to a given depth
- Along with the G85 you will also need to specify
the following:
- Hole Position
- R-Plane
- Z Depth
- Feedrate
Example: G85 X2.00 Y3.00 R.100 Z-.250 F6.0
CNC Vocab pit stop
- Cartesian Coordinate System (kärtē'zhən)
A system in which the location of a point is given
by coordinates that represent its distances from
perpendicular lines that intersect at a point called
the origin.
G90 Absolute Programming
- The Origin or Datum location of your part does
not move.
- ALL coordinates are in relationship to one
location in space
Example: G90 G00 X2.00 Y3.00 Z1.00
G91 Incremental Programming
- The Origin or Datum location of your part does
moves as your tool moves
- ALL coordinates are in relationship to the point
the tool is located at
Example: G91 G00 X2.00 Y3.00 Z1.00
“M” Codes
- “M” Codes are known as Miscellaneous
Functions.
- Normally there should only be one “M” code per
line. Most machines are really picky about this,
more so than with “G” codes.
- “M” Codes are to be at the start of the “Block” of
Program.
Example: M03 S1500
M00 Program Stop
- REMINDER: notice that it is “M” “Zero” “Zero”
all of the G&M Codes use Zero and not the
letter “O”.
- M00 will stop the program without pressing
“Feed Hold”
- Insert M00 whenever you want to stop the
program no matter what the conditions are.
- Note: on some machines this will also turn off
the spindle and not restart it without a M03
Example: M00
M01 Optional Stop
- M01 is a conditional stop, it is determined by an
operator activated switch on the control panel
- If the switch is on, it will stop the program
identical to a M00
- If the switch is off, it will ignore the M01
- Best uses:
- Before or After Tool Changes
- Anytime you want to inspect, oil or manipulate the
part or tool
Example: M01
M02 End of Program
- M02 is used only at the end of the program
- Some machines will not start a program unless
it knows there is an end
- M02 does not rewind the program
Example: M02
%
M03 Spindle Rotation Normal
- M03 – Mill Clockwise rotation – If you were on
top of a vertical milling machine looking down
- M03 – Lathe Normal Rotation – the direction
the chuck would need to spin if you had a
normal right hand helix drill bit
Example: M03 S1200
M04 Spindle Rotation Reverse
- M04 – Mill Counter-Clockwise rotation – If you
were on top of a vertical milling machine
looking down
- M03 – Lathe Reverse Rotation – the opposite
direction the chuck would need to spin if you
had a normal right hand helix drill bit
Example: M04 S1200
M05 Spindle Off
- Turns spindle off
Example: M05
M06 Automatic Tool Changer
- AKA: “ATC”
- Will put away the tool that is in the spindle and
replace it with the tool that is identified on the
same line as the M06
Example: M06 T01
or
T01 M06
M07 Mist Coolant On
- Turns on Mist Coolant
Example: M07
M08 Flood Coolant On
- Turns on Flood Coolant
Example: M08
M08 Coolant Off
- Turns Off All Coolant pumps / Soleniods
Example: M09
M30 End of Program & Rewind
- M30 is used only at the end of the program
- Some machines will not start a program unless
it knows there is an end
- M30 does rewind the program
- All you have to do is change the part and press cycle
start
- More common than M02
- Especially if more than one part is to be made
Example: M30
%
M98 Sub-Program Call
- Used in a main program when you want to call
up another program while still in the main
program.
Example: M98 P1001
M99 Sub-Program End
- Used in place of an M30 when a program is
used as a sub-program
Example: M99
%

More Related Content

Similar to cnc_codes_and_letters.ppt

Codigos de-programacion cnc
Codigos de-programacion cncCodigos de-programacion cnc
Codigos de-programacion cnclmelmelme
 
G code and M code
G code and M codeG code and M code
G code and M codesaqibmuneer5
 
LATHE - TRAINING.pptx
LATHE - TRAINING.pptxLATHE - TRAINING.pptx
LATHE - TRAINING.pptxssuser2b6e89
 
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.pptxsahils237192101
 
Lecture 25.pdf
Lecture 25.pdfLecture 25.pdf
Lecture 25.pdfkprudhviraj5
 
CNC Milling (fanuc system)
CNC Milling (fanuc system)CNC Milling (fanuc system)
CNC Milling (fanuc system)NavinBurnwal1
 
Computer integrated Manufacture & design Lab Manual
Computer integrated Manufacture & design Lab  ManualComputer integrated Manufacture & design Lab  Manual
Computer integrated Manufacture & design Lab ManualSpikeAerotek
 
Cam presentation..
Cam presentation..Cam presentation..
Cam presentation..Akash Maurya
 
Cnc part programming 4 unit
Cnc part programming 4 unitCnc part programming 4 unit
Cnc part programming 4 unitpalanivendhan
 
15 me404l manual - ex 1 to 4
15 me404l   manual - ex 1 to 415 me404l   manual - ex 1 to 4
15 me404l manual - ex 1 to 4ShivamSRIVASTAVA194
 
Cnc programming
Cnc programmingCnc programming
Cnc programmingRohan Desai
 
Cnc programming
Cnc programmingCnc programming
Cnc programmingRohan Desai
 
4 basic cnc programming milling
4 basic cnc programming milling4 basic cnc programming milling
4 basic cnc programming millingMahesh Namdev
 

Similar to cnc_codes_and_letters.ppt (20)

Codigos de-programacion cnc
Codigos de-programacion cncCodigos de-programacion cnc
Codigos de-programacion cnc
 
5 g-code
5   g-code5   g-code
5 g-code
 
G code and M code
G code and M codeG code and M code
G code and M code
 
LATHE - TRAINING.pptx
LATHE - TRAINING.pptxLATHE - TRAINING.pptx
LATHE - TRAINING.pptx
 
Akshit
AkshitAkshit
Akshit
 
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
 
Complete g code list
Complete g code listComplete g code list
Complete g code list
 
CNC.ppt
CNC.pptCNC.ppt
CNC.ppt
 
Lecture 25.pdf
Lecture 25.pdfLecture 25.pdf
Lecture 25.pdf
 
CNC Milling (fanuc system)
CNC Milling (fanuc system)CNC Milling (fanuc system)
CNC Milling (fanuc system)
 
Computer integrated Manufacture & design Lab Manual
Computer integrated Manufacture & design Lab  ManualComputer integrated Manufacture & design Lab  Manual
Computer integrated Manufacture & design Lab Manual
 
Cam presentation..
Cam presentation..Cam presentation..
Cam presentation..
 
Me3m02 expt p3
Me3m02 expt p3Me3m02 expt p3
Me3m02 expt p3
 
Cnc milling
Cnc millingCnc milling
Cnc milling
 
Cnc part programming 4 unit
Cnc part programming 4 unitCnc part programming 4 unit
Cnc part programming 4 unit
 
15 me404l manual - ex 1 to 4
15 me404l   manual - ex 1 to 415 me404l   manual - ex 1 to 4
15 me404l manual - ex 1 to 4
 
Cnc programming
Cnc programmingCnc programming
Cnc programming
 
Cncprogramming
CncprogrammingCncprogramming
Cncprogramming
 
Cnc programming
Cnc programmingCnc programming
Cnc programming
 
4 basic cnc programming milling
4 basic cnc programming milling4 basic cnc programming milling
4 basic cnc programming milling
 

More from MohammedAlobaidy16 (19)

1684424.ppt
1684424.ppt1684424.ppt
1684424.ppt
 
Lab 4 (1).pdf
Lab 4 (1).pdfLab 4 (1).pdf
Lab 4 (1).pdf
 
Lab 3.pptx
Lab 3.pptxLab 3.pptx
Lab 3.pptx
 
Lab 3.pptx
Lab 3.pptxLab 3.pptx
Lab 3.pptx
 
ch22.ppt
ch22.pptch22.ppt
ch22.ppt
 
ch07.ppt
ch07.pptch07.ppt
ch07.ppt
 
LAB3_CADCAM_using_MasterCam.pptx
LAB3_CADCAM_using_MasterCam.pptxLAB3_CADCAM_using_MasterCam.pptx
LAB3_CADCAM_using_MasterCam.pptx
 
oopusingc.pptx
oopusingc.pptxoopusingc.pptx
oopusingc.pptx
 
MS Office Word.pptx
 MS Office Word.pptx MS Office Word.pptx
MS Office Word.pptx
 
MT 308 Industrial Automation.ppt
MT 308 Industrial Automation.pptMT 308 Industrial Automation.ppt
MT 308 Industrial Automation.ppt
 
ch25.ppt
ch25.pptch25.ppt
ch25.ppt
 
ch05.ppt
ch05.pptch05.ppt
ch05.ppt
 
ch02.ppt
ch02.pptch02.ppt
ch02.ppt
 
Lab1 - Introduction to Computer Basics Laboratory.pdf
Lab1 - Introduction to Computer Basics Laboratory.pdfLab1 - Introduction to Computer Basics Laboratory.pdf
Lab1 - Introduction to Computer Basics Laboratory.pdf
 
lab3&4.pdf
lab3&4.pdflab3&4.pdf
lab3&4.pdf
 
LAB2_Gcode_Mcode.pptx
LAB2_Gcode_Mcode.pptxLAB2_Gcode_Mcode.pptx
LAB2_Gcode_Mcode.pptx
 
4_5931536868716842982.pdf
4_5931536868716842982.pdf4_5931536868716842982.pdf
4_5931536868716842982.pdf
 
ch01.ppt
ch01.pptch01.ppt
ch01.ppt
 
Lab 1.pptx
Lab 1.pptxLab 1.pptx
Lab 1.pptx
 

Recently uploaded

Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoĂŁo Esperancinha
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 

Recently uploaded (20)

Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 

cnc_codes_and_letters.ppt

  • 1. CNC Codes and Letters NOTE: The following will be a listing and description of Computer Numerical Control (CNC) Codes and Letter designations. We will try to stick with only “generic” codes that will work on most machines. Some examples may be specifically for the machines we have at South Adams / Area 18 Machine Trades. Please contact the instructor if you find any errors, missing items, or anything you would like to see added. jdailey@southadams.k12.in.us
  • 2. You should already have a list of G&M Codes and CNC Letters as shown. If you do not have one, see your instructor, or download one off of the South Adams / Area 18 Machine Trades Code Meaning Letter Meaning G00 Positioning (Rapid Traverse) A Rotary indexing axis around the "X" axis G01 Linear Interpolation (Feed) B Rotary indexing axis around the "Y" axis G02 Circular Interpolation CW C Rotary indexing axis around the "Z" axis G03 Circular Interpolation CCW D Cutter Radius / Diameter offset number G04 Dwell E Feedrate in inches per revolution (Lathe) G17 X,Y Plane of Interpolation F Feedrate in inches per minute (can be used on lathes) G18 X,Z Plane of Interpolation G Preparatory commands G19 Y,Z Plane of Interpolation H Offset Number (Mill - tool length)(Lathe - Position offset) G20 Input in Inch I Arc center location in the "X" axis G21 Input in MM J Arc center location in the "Y" axis G28 Return to Machine zero (reference point) K Arc center location in the "Z" axis G40 Cutter Compensation cancel L Fixed Cycle repetion count / subprogram repetition count G41 Cutter Compensation left M Miscellaneous function G42 Cutter Compensation right N Block / Sequence number G43 Tool length compensation + O Program Number G44 Tool length compensation - P Subprogram / Macro Number call G54-G59 Set Local Coordinate Systems (Datum Shifts) P Dwell time in milliseconds G80 Canned Cycle cancel P Block number in main program when used with M99 G81 Spot Drilling Cycle (no dwell) Q Depth of peck in fixed cycles (G73and G83) G82 Drill/Counterbore (with dwell) Q Shift amount in fixed cycle (G76 and G87) G83 Peck Drilling Cycle R Retract point in fixed cycles G85 Bore R Arc Radius designation G90 Absolute Programming S Spindle speed in RPMs G91 Incremental Programming T Tool function G92 Set Program Zero U Incremental move in "X" axis G94 IPM Programming V Incremental move in "Y" axis G95 IPR Programming W Incremental move in "Z" axis M00 Program stop X "X" axis coordinate value designation M01 Optional stop Y "Y" axis coordinate value designation M02 End of Program Z "Z" axis coordinate value designation M03 Start Spindle (Clockwise) M04 Start Spindle (Counterclockwise) M05 Spindle off M06 Tool change M08 Coolant on M09 Coolant off M30 Program reset/tape rewind M98 Sub-Program call M99 Return to previous program
  • 3. “G” Codes - “G” Codes are known as Preparatory Commands which means they are preparing the CNC machine to do something. - Normally there should only be one “G” code per line, one exception is in the “Safety Line” at the beginning of the program. - “G” Codes are to be at the start of the “Block” of Program. Safety Line Example: G17 G20 G40 G80 G90
  • 4. G00 Positioning Rapid Traverse -First of all notice that it is “G” “Zero” “Zero” all of the G&M Codes use Zero and not the letter “O”. -“G00” means the tool is going to move from where ever it currently is to the next position in a straight line as fast as the machine will go. - Think of “G00” as a dragster, something that will go from point A to point B in a straight line as fast as possible Example: G00 X2.00 Y3.00
  • 5. G01 Linear Interpolation - “G01” means the tool is going to move from where ever it currently is to the next position in a straight line but this time with a given feedrate. - Think of “G01” as a truck driving on highway 218 or 124 through Adams County, Indiana, these highways are straight AND they have a speed limit. - On Milling Machines, the feedrate will typically be in IPM (inches per minute) and labeled with an “F”. -On Turning Machines, the feedrate will typically be in IPR (inches per revolution) and labeled with an “E or F” Example: G01 X2.00 Y3.00 F6.00
  • 6. G02 Circular Interpolation (CW) -“G02” Used anytime you need an arc in the Clockwise direction. - As with any Interpolation (machine movement), the machine already knows where it is, you only need to tell it where you want to go next. -For example: if you are setting at X0,Y0 and you want to put a 1.00” radius to X1.00, Y1.00 the “Block” would look like one of the following: G02 X1.00 Y1.00 R1.00 F12.0 G02 X1.00 Y1.00 I1.00 J0 F12.0
  • 7. G03 Circular Interpolation (CCW) -Just like with the “G02” preparatory command, the “G03” will move from point A to Point B only this time in a Counter Clockwise direction. - The “Block” of code will look identical to the code for “G02” only the code will change. G03 X1.00 Y1.00 R1.00 F12.0 G03 X1.00 Y1.00 I1.00 J0 F12.0 - Always keep an eye on the details, the difference between “G02” and “G03” would be devastating if you wanted one and entered the other into a program!
  • 8. CNC Vocab pit stop - Modal [mohd-l] - A Command that is to remain in a certain mode until canceled by another mode - In other words: it keeps going and going and going and going….. Until it is told to stop later in the program - Antonym = Non-modal
  • 9. G04 Dwell -“G04” is used anytime you want to pause or dwell at a position - A common “Block” when “Dwell” is required would be – G04 P500 -The “G04” of course specifies Dwell -The “P500” states that it will be for 500 milliseconds - Note: 1 Second equals 1000 milliseconds - Therefore if you need to pause for 4.5 seconds you would program the “Block” as: G04 P4500 Example: G04 P1000
  • 10. G17 X,Y Plane of Interpolation -“G17” is the most common plane to choose for a vertical machining center. -“G17” will normally be one of if not THE first “G” code in a program. - The reason the “G17” is so popular is that it could also refer to the table in front of you, the “X axis” is right and left movements while the “Y axis” would be towards and away from you
  • 11. G18 X,Z Plane of Interpolation -“G18” could best be described as a normal engine lathe because the “Z axis” is the longitudinal travel of the lathe and the “X axis” would be your cross slide. - On a vertical machining center, this plane would be like looking at the screen of the controller since the “X axis” is right and left and the “Z axis” is up and down.
  • 12. G19 Y,Z Plane of Interpolation -On a Vertical milling machine, this would be the plane parallel to the side of the machine. - Once again, just think it through, the “Y axis” is towards and away from you and the “Z axis” is up and down.
  • 13. G20 Inch Input -“G20” will typically be at the beginning of the program, that way the CNC knows right away that every dimension entered will be Inch and not metric. - “G20” is very important to enter into each program you want to be inch, imagine if the program that ran prior to yours was a metric program and you do not switch it to inch, every dimension you enter will be read by the CNC as metric…. OPPS!
  • 14. G21 Metric Input -Many shops have switched over to total metric, so “G21” is becoming more popular in this area. - How you program using “G21” is identical to “G20” the only difference is you are entering Metric dimensions instead of Inch.
  • 15. G28 Return to Machine Zero -AKA: Return to Reference Point - “G28” can be very handy, On a Vertical Machining Center anytime you want the tool as far away from the part vertically as possible you would enter “G28 G91 Z0”. If you want the part to come as close to you as possible for easy part changing you would enter “G28 Y0” -Example: G28 G91 X0 Y0 Z0 Would bring the machine as fast as it can to its home position
  • 16. G40 Cutter Compensation Cancel -Typically found in the “Safety Line” of the program - Just like the description implies, “G40” is used to cancel any cutter compensations whether it is for length (or height) compensation or Diameter Compensation. - Keep in mind that the person operating the machine prior to you could have done something with cutter compensation totally legal BUT different than what you need, cutter compensation cancel will clear everything out and be ready for you to add.
  • 17. G41 Cutter Compensation Left -Cutter compensation is used to program a part exactly to size using the dimensions provided on the print…. THEN at the machine, offset that geometry to compensate for the tool you are using - Imagine climb milling around the outside of this picture the cutter would be rotating clockwise and moving around the picture clockwise, now guess which side of the part the cutter is…. Your right, the LEFT side!
  • 18. G42 Cutter Compensation Right - Just like the “G41” compensation only the opposite. Imagine conventional milling the same outside of this picture, the cutter is still spinning clockwise but this time the cutter is traveling counterclockwise around the outside of the part. NOW which side of the part is the cutter traveling on? You are right the Right side!
  • 19. G43 Tool Length Compensation + - Tool length compensation allows a machine to adjust for the different lengths of the tools. - Basically it is telling the machine how far it is from its “Z” home position to the position when the part touches the “Z origin” of the part. - The “H” value will be Added (+) to programmed “Z” position Example: G43 Z1.0 H01
  • 20. G44 Tool Length Compensation - - Tool length compensation allows a machine to adjust for the different lengths of the tools. - Basically it is telling the machine how far it is from its “Z” home position to the position when the part touches the “Z origin” of the part. - The “H” value will be Subtracted (-) from the programmed “Z” position Example: G44 Z1.0 H01
  • 21. G54-G59 Work Offsets - AKA: Datum Shifts - AKA: Set Local Coordinate Systems - Specifies the distance the machine would need to move from its home position to the origin of the part or fixture. - Used mostly when multiple parts / fixtures / Set-ups are on the same table Example: G55 G90 G00 X0.000 Y0.000
  • 22. G80 Canned Cycle Cancel - AKA: Fixed Cycle Cancel - Clears out any “Modal” Canned or Fixed cycles used earlier in a program - Used in the Safety Line to insure that what someone else did before does not affect what you will be doing in your program Example: G82 X2.00 Y3.00 R.100 Z-.500 F6.0 G80
  • 23. G81 Spot Drill Cycle (no dwell) - Specifies that you want to drill to a given depth - Along with the G81 you will also need to specify the following: - Hole Position - R-Plane - Z Depth - Feedrate Example: G81 X2.00 Y3.00 R.100 Z-.250 F6.0
  • 24. G82 Spot Drill Cycle (dwell) - Specifies that you want to drill to a given depth - Along with the G82 you will also need to specify the following: - Hole Position - R-Plane - Z Depth - Feedrate - Dwell time Example: G82 X2.00 Y3.00 R.100 Z-.250 F6.0 P500
  • 25. G83 Peck Drill Cycle - Specifies that you want to drill to a given depth - Along with the G83 you will also need to specify the following: - Hole Position - R-Plane - Z Depth - Feedrate - Peck Increment Example: G83 X2.00 Y3.00 Z-1.500 R.100 Q.250 F6.0
  • 26. G83 Peck Drill Cycle Comparison G83 X2.00 Y3.00 Z-1.500 R.100 Q.250 F6.0 - OR - N0110 G00 X2.00 Y3.00 N0120 G00 Z.100 N0130 G01 Z-.150 F6.0 N0140 G00 Z.1 N0150 G00 Z-.150 N0160 G01 Z-.400 N0170 G00 Z.1
  • 27. WE ARE NOT DONE YET… N0180 G00 Z-.400 N0190 G01 Z-.650 N0200 G00 Z.100 N0210 G00 Z-.650 N0220 G01 Z-.900 N0230 G00 Z.100 N0240 G00 Z-.900 N0250 G01 Z-1.150 N0260 G00 Z.100
  • 28. STILL A COUPLE MORE LINES… N0270 G00 Z-1.150 N0280 G01 Z-1.250 N0290 G00 Z.100 That is just for one hole! Now imagine doing that for EVERY deep hole! One line per hole versus 19 Lines… you decide!
  • 29. G73 Peck Drill Cycle (High Speed) - Specifies that you want to drill to a given depth - Does NOT fully retract after each peck depth - Along with the G73 you will also need to specify the following: - Hole Position - R-Plane - Z Depth - Feedrate - Peck Increment Example: G73 X2.00 Y3.00 Z-1.500 R.100 Q.250 F6.0
  • 30. G84 Tapping Cycle (RH) - Specifies that you want to Tap a previously drilled hole - Along with the G85 you will also need to specify the following: - Hole Position - R-Plane - Z Depth - Feedrate = RPM X Lead of the thread - 1/4-20 Thread at 800RPM = F40.0 Example: G84 X2.00 Y3.00 R.100 Z-.250 F40.0
  • 31. G85 Boring Cycle - Specifies that you want to Bore to a given depth - Along with the G85 you will also need to specify the following: - Hole Position - R-Plane - Z Depth - Feedrate Example: G85 X2.00 Y3.00 R.100 Z-.250 F6.0
  • 32. CNC Vocab pit stop - Cartesian Coordinate System (kärtÄ“'zhÉ™n) A system in which the location of a point is given by coordinates that represent its distances from perpendicular lines that intersect at a point called the origin.
  • 33. G90 Absolute Programming - The Origin or Datum location of your part does not move. - ALL coordinates are in relationship to one location in space Example: G90 G00 X2.00 Y3.00 Z1.00
  • 34. G91 Incremental Programming - The Origin or Datum location of your part does moves as your tool moves - ALL coordinates are in relationship to the point the tool is located at Example: G91 G00 X2.00 Y3.00 Z1.00
  • 35. “M” Codes - “M” Codes are known as Miscellaneous Functions. - Normally there should only be one “M” code per line. Most machines are really picky about this, more so than with “G” codes. - “M” Codes are to be at the start of the “Block” of Program. Example: M03 S1500
  • 36. M00 Program Stop - REMINDER: notice that it is “M” “Zero” “Zero” all of the G&M Codes use Zero and not the letter “O”. - M00 will stop the program without pressing “Feed Hold” - Insert M00 whenever you want to stop the program no matter what the conditions are. - Note: on some machines this will also turn off the spindle and not restart it without a M03 Example: M00
  • 37. M01 Optional Stop - M01 is a conditional stop, it is determined by an operator activated switch on the control panel - If the switch is on, it will stop the program identical to a M00 - If the switch is off, it will ignore the M01 - Best uses: - Before or After Tool Changes - Anytime you want to inspect, oil or manipulate the part or tool Example: M01
  • 38. M02 End of Program - M02 is used only at the end of the program - Some machines will not start a program unless it knows there is an end - M02 does not rewind the program Example: M02 %
  • 39. M03 Spindle Rotation Normal - M03 – Mill Clockwise rotation – If you were on top of a vertical milling machine looking down - M03 – Lathe Normal Rotation – the direction the chuck would need to spin if you had a normal right hand helix drill bit Example: M03 S1200
  • 40. M04 Spindle Rotation Reverse - M04 – Mill Counter-Clockwise rotation – If you were on top of a vertical milling machine looking down - M03 – Lathe Reverse Rotation – the opposite direction the chuck would need to spin if you had a normal right hand helix drill bit Example: M04 S1200
  • 41. M05 Spindle Off - Turns spindle off Example: M05
  • 42. M06 Automatic Tool Changer - AKA: “ATC” - Will put away the tool that is in the spindle and replace it with the tool that is identified on the same line as the M06 Example: M06 T01 or T01 M06
  • 43. M07 Mist Coolant On - Turns on Mist Coolant Example: M07
  • 44. M08 Flood Coolant On - Turns on Flood Coolant Example: M08
  • 45. M08 Coolant Off - Turns Off All Coolant pumps / Soleniods Example: M09
  • 46. M30 End of Program & Rewind - M30 is used only at the end of the program - Some machines will not start a program unless it knows there is an end - M30 does rewind the program - All you have to do is change the part and press cycle start - More common than M02 - Especially if more than one part is to be made Example: M30 %
  • 47. M98 Sub-Program Call - Used in a main program when you want to call up another program while still in the main program. Example: M98 P1001
  • 48. M99 Sub-Program End - Used in place of an M30 when a program is used as a sub-program Example: M99 %