0% found this document useful (0 votes)
116 views28 pages

Unique G Codes

The document describes several unique G-codes available on Haas CNC machines, including G12/G13 for circular pocket milling, G51 for scaling, and G68 for rotation. G12/G13 automate circular pocket milling by allowing entry of radius, depth, and step values. G51 proportionally scales X,Y,Z values using a scaling center and factor. G68 rotates subsequent movements around a center point by a specified angle.

Uploaded by

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

Unique G Codes

The document describes several unique G-codes available on Haas CNC machines, including G12/G13 for circular pocket milling, G51 for scaling, and G68 for rotation. G12/G13 automate circular pocket milling by allowing entry of radius, depth, and step values. G51 proportionally scales X,Y,Z values using a scaling center and factor. G68 rotates subsequent movements around a center point by a specified angle.

Uploaded by

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

HAAS UNIQUE G-CODES

UNIQUE MILL G-CODES

 G12/13 - CIRCULAR POCKET MILLING


 G51 - SCALING
 G53 - NON-MODAL MACHINE
COORDINATE SYSTEM
 G68 - ROTATION
 G101 - MIRROR IMAGE
 G150 GENERAL PURPOSE POCKET
MILLING
OVERVIEW

•Description of Codes
•Code Format
•Effects of Settings
•Unique Features
•Examples
G12/G13-CIRCULAR
POCKET MILLING
• Used for milling circular pockets
• G12 [D.. ] [F… ] [I…] [K… ] [L…]
[Q…] [Z…] (Clockwise move)
• G13 is used for counter clockwise
moves
 D - Tool radius offset selection
 F - Feedrate
 I - Radius of first circle(or finished circle
if no K)
 K - Radius of finished circle (optional)
 L - Loop count for deeper pockets (used
with a G91)
 Q - Incremental radius step (required
with K)
 Z - Depth of cut (or increment with L)
This is an standard feature
G12/G13-CIRCULAR
POCKET MILLING (cont)
• G12 and G13 are Non-modal
• Cutter Compensation is included
in this routine
• Use D00 to ignore tool offset
• Use I without K and Q for small
pockets or holes
• When using K and Q, only K
should be the radius of the
desired finished pocket
• Position cutter in a previous block
or add an X and Y to the G12/G13
line
G12 Example using I
(Finished Radius)
O0010 ;
T1 M06 ;
G90 G54 G00 X1.0 Y1.0 ;
S1500 M03 ;
G43 Z0.1 H1 M08;
G12 Z-0.5 I0.4 D01 F15. ;
G00 Z0.1 M09 ;
G28 G91 Y0 Z0 ;
M30 ;

We want to mill a 0.8” diameter Only one pass is required for


0.5” deep pocket using a 0.5”
this example, so there is only
endmill. The picture shows the
tool path for the code given. an I value (circle radius) in the
G12 line. G12 will use
conventional rather than
climb milling
G13 Example
using I, K, Q
O0010 ;
T1 M06 ;
G90 G54 G00 X1.0 Y1.0 ;
S1500 M03 ;
G43 Z0.1 H1 M08;
G12 G91 Z-0.5 I0.3 K1.5 Q0.3
D01 F15. L3;
G90 ;
G00 Z0.1 M09 ;
G28 G91 Y0 Z0 ;
M30 ;
We want to mill a 3.0” diameter
1.5” deep pocket using a 0.5” As seen in the picture, the first pass is
endmill. the I value (0.3”). Additional passes
of Q increments (also 0.3”) are made
This example requires more until the full radius (K1.5) is cut. Then
passes in both the radius and the tool will move down in Z another
depth so K, Q and L (and a 0.5” and repeat the process. The G13
cycle will repeat three times (L3) to
G91) are used in addition to I. produce a depth of 1.5”
G51-SCALING
• Used to proportionally increase or
decrease X, Y, Z, I, J, K, or R
values in subsequent lines of
code
• G51 [X…] [Y…] [Z…] [P…]
 X - Optional X-axis center of scaling
 Y - Optional Y-axis center of scaling
 Z - Optional Z-axis center of scaling
 P - Optional scaling factor, 3 place
decimal from 0.001 to 8383.000
• With G51, you can easily create
different size parts by just
changing the P value.
• G50
This - Cancel
is an optional Scaling
feature along with G68 - Rotation.
G51-SCALING
(cont)

• Setting 71- If P is not used, Setting 71


is the default scaling factor.
 G51 X1. 5 Y1.0 (Scaling center is at X1.5,
Y1.0 and the scale factor is determined by
Setting 71)
• If X, Y, or Z are not used, the current
work coordinate is used as the
scaling center
 G00 X1.0 Y2.0
 G51 P2. (Scaling center is at X1.0, Y2.0
with a scale factor of 2.)
The factory default for setting 71 is 1.0,
meaning no scaling would take place.
G51-SCALING
(Example)
O0010 ;
T1 M06 ;
G54 G90 G00 X0 Y0 ;
G43 Z0.1 H1 ;
S500 M03 ;
G51 P2. ; (Scale factor of 2.)
M97 P10 ;
G28 G91 Y0 Z0 ;
M30 ;
N10 G00 X1. Y1. ;
G01 Z-0.5 F15. ;
X2. F20. ;
(Original
Y2. ; geometry)
G03 X1. R0.5 ;
G01 Y1. ;
Take geometry shown by dashed line and G00 Z0.1 ;
double the size. Use the original work M99 ;
coordinate origin as the scaling center.
= Work coordinate origin Z values will also be doubled, so
= Center of scaling depth of pocket will be -1.0.
G51-SCALING
(Example 2)
O0010 ;
T1 M06 ;
G54 G90 G00 X0 Y0 ;
G43 Z0.1 H1 ;
S500 M03 ;
G51 X1.5 Y1.5 P2.; (Scaling center
X1.5 Y1.5)
M97 P10 ;
G28 G91 Y0 Z0 ;
M30 ;
N10 G00 X1. Y1. ;
G01 Z-0.5 F15. ;
X2. F20. ; (Original
Y2. ; G03 X1. R0.5 ; geometry)
Take geometry shown by dashed line and G01 Y1. ;
double the size. Use a different work G00 Z0.1 ;
coordinate as the scaling center. M99 ;
= Work coordinate origin
= Center of scaling
G51-SCALING (Example 3)
O0010 ;
T1 M06 ;
G54 G90 G00 X0 Y0 ;
G43 Z0.1 H1 ;
S2500 M03 ;
G51 P1.5 ; (Scale Factor of 1.5)
M97 P10 ;
G28 G91 Y0 Z0 ;
M30 ;
N10 G00 X-0.125. Y-0.2. ;
G01 Z-0.5 F50. ;
Y3.125. F20. ;
G02 X0.25Y3.375 R0.375 ;
G01 X1.6562 ;
G02 x2. Y3.0313 R0.3437 ;
G01 Y2.125 ; (Original
G03 X2.375 Y1.75 R0.375 ; geometry)
G01 X3.5 ;
The smaller area is the original geometry. G02 4. Y1.25 R0.5 ;
You can make the part 1.5 times larger G01 Y0.4375 ;
with a G51 P1.5 like shown at right. G02 X3.4375 Y-0.125 R0.5625 ;
= Work coordinate origin G01 X-0.2 ;
= Center of scaling G00 Z0.1 M09 ;
M99 ;
G53-NON-MODAL
COORDINATE SYSTEM
• Cancels existing work coordinate
system
• Can be used to return spindle or
table to machine zero
 G53 Y0.
 Moves table to machine zero in Y
• Must be used with a G49 if you have
a Z value (G49 cancels tool offset)
 G53 G49 Z0.
 Returns spindle to machine zero
• An alternative to G28 G91 Z0;
 With G28 you must remember to add a
G90 afterwards
• With G53 you stay in G90 mode
This is a standard feature.
G68-ROTATION
• Used to rotate subsequent X, Y, Z, I,
J, or K values by a specified angle
using a center of rotation
• [G17] [G18] [G19] G68 [a] [b] [R]
 G17, G18, G19 - Plane of Rotation
 a - Center of rotation for the first axis
 b - Center of rotation for the second
axis
 R - Angle of rotation in degrees, from -
360.000 to -360.000, 3-place decimal
• G69 - Cancels G68-Rotation

This is an optional feature along with G51 - Scaling.


G68-ROTATION
(cont)
• Setting 72 - If R is not included in
the G68 line, Setting 72 is the
default angle of rotation
• Setting 73 - Must be on to have the
rotational value incrementally
change in G91 mode
• Can be combined with Scaling -
Scaling should be activated first
• Cutter Comp should be turned on
after G51 or G68 commands and
turned off before G50 and G69.
The factory default of Setting 72 is 0.0.
G68 - ROTATION
(Example)
O0010 ;
T1 M06 ;
G54 G90 G00 X0 Y0 ;
G43 Z0.1 H1 ;
S500 M03 ;
M97 P10 L8; (Pocket routine is
G69 M09 ; done 8 times.)
G28 G91 Y0 Z0 ;
M30 ;
N10 G91 G68 X0 Y0 R45. ; (Rotate 45°)
G90 ;
G00 X1. Y1. Z0.1 ;
G01 Z-0.5 F15. M08 ;
X2. F20. ;
(Window
Y2. ; geometry)
We will take one of the arched windows G03 X1. R0.5 ;
and rotate it around the origin in 45 degree G01 Y1. ;
increments. G00 Z0.1 ;
= Work coordinate origin M99 ;
= Center of scaling
By altering the “L” and “R” in the underlined blocks you can vary
the number of windows cut.
G68 - ROTATION
(Example 2)
O0010 ;
T1 M06 ;
G54 G90 G00 X0 Y0 ;
G43 Z0.1 H1 ;
S500 M03 ;
M97 P10 L6;
G69 M09 ;
G28 G91 Y0 Z0 ;
M30 ;
N10 G91 G68 X0 Y0 R60. ; (Rotate 60°)
G90 ;
G00 X-0.4911 Y2.9062 ;
G01 Z-0.5 F15. M08 ;
G02 X0.4911 Y2.9062 I0.4911 J0.0938;
(Pocket G01 X0.1228 Y0.9774 ;
We will take a pocket that is geometry)G02 X-0.1228 Y0.9766 I-0.1228 J0.0234;
uniform around the X-axis, and
G01 X-0.4911 Y2.9062
rotate it around the origin in 60
G00 Z0.1 ;
degree increments. M99 ;
= Work coordinate origin
= Center ofNote
scaling
that in this and the last example we included an X and Y in
the G68 line to define the center of rotation.
G101-MIRROR IMAGE

• Used to produce a mirror image of a


sequence of codes around an X, Y,
Z, A or B axis
• G101 [X] [Y] [Z] [A] [B]
 Atleast one axis must be specified
 Any value given will be ignored
 G100 cancels mirror image

You can mirror image more than one axis at a time.


This is an standard control feature.
G101-MIRROR IMAGE
(cont)
• Setting 45 - Mirror image X-axis
• Setting 46 - Mirror image Y- axis
• Setting 47 - Mirror image Z-axis
• Setting 48 - Mirror image A-axis
• Setting 80 - Mirror image B-axis
• These settings activate mirror imaging
without using G101
• If only one axis is mirrored, climb
milling will be changed to
conventional milling (i.e. direction of
travel will be reversed). Cutter
When you use these settings,
compensation is also mirror imaging will be
reversed.
active until you manually turn the settings off.
G101-MIRROR IMAGE
(Example)
O0010 ;
T1 M06 ;
G54 G90 G00 X0 Y0 ;
G43 Z0.1 H1 ;
S500 M03 ;
M97 P20 ;
N10 G101 X0 ;
M97 P20 ;
G100 ;
G00 Z0.1 ;
M09 ;
G28 G91 Y0 Z0 ;
M30 ;
N20 G00 X-0.4653 Y0.052 ;
In this example, we will mirror G01 Z-0.5 F15. M08 ;
G01 X-1.2153 Y0.552 ;
the Pocket on the right in the X- G03 X-1.3059 Y0.528 R.0625 ;
axis, producing a similar pocket G01 X-1.5559 Y0.028 ; (Pocket
on the left. G03 X-1.5559 Y-0.028 R.0625 ; geometry)
G01 X-1.3059 Y-0.528 ;
Because the pocket is symmetrical around the G03 X-1.2153 Y-0.552 R.0625 ;
X-axis, we could add a Y0 in line N10 and not G01 X-0.4653 Y-0.052 ;
change the part. This would allow us to Climb G03 X-0.4653 Y0.052 R.0625 ;
M99 ;
Mill on the second pocket as well as the first.
G101-MIRROR IMAGE
(Example 2)
O0010 ;
T1 M06 ;
G54 G90 G00 X0 Y0 ;
G43 Z0.1 H1 ;
S500 M03 ;
M97 P10 ;
N10 G101 Y0 ; (Mirror in Y-axis)
M97 P20 ;
G28 G91 Y0 Z0 ;
M30 ;
N20 G00 X2. Y2. ;
G01 Z-0.5 F15. ;
X4. F20. ; (Original
Y4. ; geometry)
G03 X2. R1. ;
In this example, we will mirror the pocket on
G01 Y2. ;
top, in the Y-axis, producing a similar
pocket on the bottom. G00 Z0.1 ;
M99 ;
In this example, Climb Milling on the first pocket is changed
to Conventional on the second pocket.
G101-MIRROR IMAGE
(Example 3)
O0010 ;
T1 M06 ;
G54 G90 G00 X0 Y0 ;
G43 Z0.1 H1 ;
S500 M03 ;
M97 P10 ;
N10 G101 Y0 X0;
X0 (Mirror in X-
M97 P20 ; and Y- axes)
G28 G91 Y0 Z0 ;
M30 ;
N20 G00 X2. Y2. ;
G01 Z-0.5 F15. ;
X4. F20. ;
If we add an X0 to line N10, it will Y4. ;
produce results shown above. G03 X2. R1. ;
Climb Milling will also take place G01 Y2. ;
on the second pocket. G00 Z0.1 ;
M99 ;
G150-POCKET MILLING
• Used to mill a pocket by defining only the
outside shape of the pocket
• G150 G41* P… F… D… I… J… K… Q… R…
X… Y… Z… [L…] [S…]
 P - Number of Sub-program defining pocket(required)
 F - Feedrate
 D - Tool diameter offset selection
 I - X-axis cut increment (I or J is required)
 J - Y-axis cut increment
 K - Finish cut allowance
 Q - Incremental Z-axis cut depth per pass (>0) (reqiuired)
 R - R plane position (required)
 X & Y - Position of starting hole
 Z - Final depth of pocket
 L - Optional repetition count for additional pockets
 S - Optional spindle speed
This Comp
* G42, Cutter is an standard control
Right, is also feature.
permissible
G150-POCKET
MILLING (cont)
• You should first drill a hole at the X,Y entry
location.
• The Pocket definition must be in a Sub-
program, not a subroutine.
• The Sub-program must have less than 40
strokes.
 Codes other than G, I, R, X and Y in the Sub-
program are ignored
 The first move in the Sub-program should be from
the clearing hole to a point on the pocket edge
 The last move in the Sub-program should be to
that same starting point on the pocket edge
 You can use either G91 (Incremental) or G90
(Absolute) moves in the Sub-program
G150-POCKET
MILLING (cont)
• There is no finishing pass in the Z depth.
• Q is a positive value for the amount of incremental
step down in Z for deeper pockets.
• You cannot use both I and J.
• If you use L for additional pockets, you must have
a G91 and incremental positioning in the G150 line
– You will also need to drill all your clearing holes prior to
the G150 line
• The finishing pass, K, is taken at the full depth (Z)
of the pocket.
• It is also possible to program an island within a
pocket. (See the Operators Manual for an example of
this.)
• You can not use a G68 with G150
G150-POCKET MILLING
(Example)
O0010 ;
T1 M06 ;
G54 G90 G00 X3.0 Y3.5 ;
G43 Z0.1 H1 ;
S2500 M03 ;
N10 G81 Z-0.5 R0.1 F25. ;
T2 M06 ;
G43 Z0.1 H2 ;
S2000 M03 ;
G150 P200 G41 X3.0 Y3.5 Z-0.5 F30. R0.1
Q0.2 I0.3 K0.02 ;
G00 Z0.1 M09 ;
G28 G91 Y0 Z0 ;
M30 ;
In this example, we will mill the pocket O0200 ;
shown using steps along the X-axis of G01 X2.0 ;
Y2.0 ; (Sub-
0.3”(I). We will take a maximum depth
X4.0 ; program for
of cut of 0.2”(Q). (The first pass will Pocket
Y4.0 ;
only be 0.1”). We will leave 0.02”(K) for G03 X2.0 Y4.0 R1.0 ; geometry)
a finishing pass. The geometry is in G01 Y3.5 ;
program number O0200(P) M99 ;
Notice that there is a drill cycle in
line N10 for a clearing hole.
Visit our web site,
http://www.haascnc.com/training
to view Information Modules on
other features of the Haas
Control. You can also download
training booklets on the Haas
Control and CNC Programming.
Prepared by Haas Automation
Training Department
Oxnard, CA 93030

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy