0% found this document useful (0 votes)
51 views26 pages

G - Code Review

Uploaded by

brandenpaquin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views26 pages

G - Code Review

Uploaded by

brandenpaquin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

G- Code Review

Most commonly used G- Codes

This list of G-Codes should get you through most LATHE programs
here at Diman
HAAS Lathe M Codes

- Keep in mind different machines with different options might


use different M Codes
Starting Program & Tools

- This is the format we are using to start ALL lathe


programs
- Only use Constant Surface Speed for Turning or Boring
Ending Program & Tools

- Use these codes to both end a program and to end tools


- Use M30 to end the program, and use M01 (Optional Stop) or M00 (Program
Stop) to end a tool
G71 Rough Turning Cycle

Once you have used the proper tool callup (see slide 26) it is time to start machining.
Format: G71 P, Q, U, W, D, F
P- Sequence # at the start of the operation
Q- Sequence # at end of operation
U- Finish allowance on your X (Diameter)
W- Finish allowance on your Z (Lengths) *BOTH U & W ARE WRITTEN AS DECIMALS*
D- Depth of cut (Per Side)
F- Feed Rate (IPR)
G70 Finish Turning Cycle

After using G71 for a roughing cycle, a finishing cycle can be performed by the following
command:

G70 P, Q (P & Q MUST MATCH G71 LINE)

P- Sequence # at the start of operation

Q Sequence # at the end of the operation


Beginning The Program
O7007 (LETTER O FOLLOWED BY FOUR DIGITS)

>G00G53X0Z-16.T0 (RAPID, RETURN TO MACHINE

REFERENCE; CANCEL TOOL OFFSET)

>T0101 (TOOL #1 & OFFSET #1)

G50S1800 (G50 SETS MAXIMUM SPINDLE SPEED TO 1800)

>G97S1600M03 (G97 TURNS OFF CONSTANT SURFACE


SPEED, S SETS SPINDLE RPM TO 1600 & M03 TURNS ON
SPINDLE CW)

>G0X1.050 Z0.100M08 (RAPID, APPROACH WORK;.050


ABOVE LARGEST X DIAMETER, .100 AWAY FROM FACE,
COOLANT ON)

G96S500(CONSTANT SURFACE SPEED IF APPLICABLE, FOR


TURNING OR BORING)
G71 Rough Turning Cycle

G71 P1 Q2 U0.015 W0.005 D0.025 F.015 (Starts the rough turning


cycle, leaving .015 to finish on the X and .005 on the Z. Taking
a depth of cut of .025 (PER SIDE) at a Feed Rate of .015 IPR)
N1 G00 X-.05 (Rapid past center, No cutter comp)
G01 Z0. F.005 (Linear move to face)
X.5 (Up to first diameter)
Z-.5 (Back to first length)
X1. (Up to second diameter)
Z-1.0 (Back to second length)
N2 X1.05 (Up to where you started your X)
G70 Finish Turning Cycle & Ending The Program

G70 P1 Q2 (Tells the machine to do a finish turning cycle using the


information between lines 10 and 16)

G97 S500 (Turns the spindle RPM to 500)

G00G53X0Z-16.M09 (RAPID TOOL TO X/Z-AXIS REFERENCE (G53); SHUT OFF


COOLANT)

T0 (Cancels tool offset)

M05 (Turns off spindle)

M30 (Ends program)


All Together
Your Turn
Cutter Compensation

Cutter Compensation is necessary on lathes when it comes to machining


chamfers and radii. It helps compensate for the radius of the tool nose and
keeps you from having to do more math than necessary.
The codes for Cutter Compensation are:
G40= Cancel Cutter Compensation
G41= Cutter Compensation Left
G42= Cutter Compensation Right
Using Cutter Comp is as simple as adding the correct code to the right spot,
it is usually put on the line where you make a linear move (G01) to the face of
the part
Tool Nose Radius Compensation

**Standard Turning on the TL Lathe uses


G42**
Creating a Chamfer/Radius Less Than .030

• This command is for “breaking” sharp corners.

• Where a sharp corner is created, place a negative R to make a


radius, or a negative K to make a chamfer.
• The command is only executed on the FINISH CUT so values
should be kept relatively small (less than .030”).
• The desired command is placed on the line with “X” move.
• The following program line must be a negative “Z” move.
What the Code Should Look Like for a Chamfer

- USE BEGINNING FORMAT FIRST (SEE SLIDE 4)


- G71 P1 Q2 U0.015 W0.005 D0.025
F.015
- N1 G00 X-.05
- G01 Z0. F.005 G42
- X.75 K-.015 (Up to first diameter
w/ -K move)
- Z-.5 (Back to first length)
- X1. K-.015 (Up to second diameter
w/ -K move)
- Z-.875 (Back to second length)
- N2 X1.05 G40 (Up to where you
started your X, Cancel Cutter Comp)
- USE G70 FINISH CYCLE (SLIDE 10) AND END
PROGRAM (SLIDE 5)
What the Code Should Look Like for a Radius

- USE BEGINNING FORMAT FIRST (SEE SLIDE 4)


- G71 P1 Q2 U0.015 W0.005 D0.025 F.015
- N1 G00 X-.05
- G01 Z0. F.005 G42
- X.75 R-.015 (Up to first diameter w/ -R
move)
- Z-.5 (Back to first length)
- X1. R-.015 (Up to second diameter w/ -R
move)
- Z-.875 (Back to second length)
- N2 X1.05 (Up to where you started your X)
- USE G70 FINISH CYCLE (SLIDE 10) AND END PROGRAM
(SLIDE 5)
Your Turn
What if it is MORE than .030?

- This is when we manually put in our coordinates in order to accurately


machine the chamfer/radius
- When doing this it is important to remember that you have to DOUBLE the
chamfer/radius value to calculate your X
- When calculating the Z just add the size of the chamfer/radius, it DOES NOT
need to be doubled
- We are going to check this by making charts with all the points on them
- A line with a radius on it looks like this G03 X1.5 Z-1.0 R.25

THE LINE HAS TO HAVE AN ARC COMMAND AS WELL AS THE SIZE OF THE RADIUS
Circular Interpolation

- In order to “spin” a radius, you will have to use a G02 or G03 which will initiate Circular
Interpolation, this allows the machine to move in 2 axes simultaneously
- We are going to start with simple commands that do not require an I or a J but more
complex radius commands are possible
- Your machine is always assumed to be at the start of the arc before reading the G2 or G3,
so the G2 or G3 contains an X and Y component which describes the final position after
the arc has been traversed.
Point # X Z

1 1.225 0
Start by Making a Chart of your Points
2 1.725 -.25

3 1.725 -.75

4 2.225 -1.00

5 2.75 -1.00

6 2.75 -2.00

7 3.3 -2.00

8 4.00 -2.35

9 4.00 -2.50

10 4.25 -2.625

11 4.50 -2.625

12 4.50 -3.375
Let’s Program it

https://docs.google.com/document/d/1c5Qnn48eIRjHrMIAOLhcqLuAcT-69qln7Kd4eYd6vZk/
edit

We’ll look here how we’re going to program this piece


Chamfers

- In order to program large chamfers you are going to do it the same way, just without using
the G02 or G03 lines as you are not interpolating anything, given that you are
programming radii, we are not going to spend a ton of time on large chamfers
Your Turn
Position Move Grooving

- This is probably the most popular way you are going to see grooves made when it comes
to longhand programming
- The process of making a groove by position moves is fairly simple, it uses G01 movements
and a lower feed rate in order to machine the groove properly
- Get your positions right, get your feed right, and this will be one of the simplest things you
program
What it looks like

T0202 *REMEMBER TO USE A DIFFERENT TOOL # THAN YOUR TURNING TOOL*

G97S1600M03 (SPINDLE ON)

G0X2.05 Z0.100M08 (RAPID MOVEMENT .050 ABOVE DIAMETER .100 AWAY)

G1 Z-1.625 F.005 (FEED MOVE TO LOCATION, MAKE SURE YOU ACCOUNT FOR WHICH
SIDE OF THE CUTTER YOU TOUCH OFF ON)

X.75 F.002 (LOWERED FEED RATE TO DIAMETER)

X2.05 (OUT OF GROOVE)

*SEND EVERYTHING AWAY AND CANCEL TOOL OFFSET*

You might also like