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
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
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
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
%