G02 CW / G03 CCW Circular Interpolation Motion (Group 01)

Next Generation Control Mill Operator's Manual

The Online Interactive Operator's Manual is currently available in English only.

A PDF version of the Operator's Manual is available for download in multiple languages. Click the link below to view the Operator's Manual in your language. Click "Continue" to view the online version in English.

Get a translated PDF Download Continue
F - Feedrate
*I - Distance along X Axis to center of circle
*J - Distance along Y Axis to center of circle
*K - Distance along Z Axis to center of circle
*R - Radius of circle
*X - X-Axis motion command
*Y - Y-Axis motion command
*Z - Z-Axis motion command
*A - A-Axis motion command

*indicates optional

note: I,J and K is the preferred method to program a radius. R is suitable for general radii.

These G codes are used to specify circular motion. Two axes are necessary to complete circular motion and the correct plane, G17-G19, must be used. There are two methods of commanding a G02 or G03, the first is using the I, J, K addresses and the second is using the R address.

Using I, J, K addresses

I, J and K address are used to locate the arc center in relation to the start point. In other words, the I, J, K addresses are the distances from the starting point to the center of the circle. Only the I, J, or K specific to the selected plane are allowed (G17 uses IJ, G18 uses IK and G19 uses JK). The X, Y, and Z commands specify the end point of the arc. If the X, Y, and Z location for the selected plane is not specified, the endpoint of the arc is the same as the starting point for that axis.

To cut a full circle the I, J, K addresses must be used; using an R address will not work. To cut a full circle, do not specify an ending point (X, Y, and Z ); program I, J, or K to define the center of the circle. For example:

G02 I3.0 J4.0 (Assumes G17; XY plane) ;

Using the R address

The R-value defines the distance from the starting point to the center of the circle. Use a positive R-value for radii of 180° or less, and a negative R-value for radii more than 180°.

Programming Example

Positive R Address Programming Example

% O60021 (G02 POSITIVE R ADDRESS) ; (G54 X0 Y0 is at the bottom-left of part) ; (Z0 is on top of the part) ; (T1 is a .5 in dia endmill) ; (BEGIN PREPARATION BLOCKS) ; T1 M06 (Select tool 1) ; G00 G90 G40 G49 G54 (Safe startup) ; G00 G54 X-0.25 Y-0.25 (Rapid to 1st position) ; S1000 M03 (Spindle on CW) ; G43 H01 Z0.1 (Activate tool offset 1) ; M08 (Coolant on) ; (BEGIN CUTTING BLOCKS) ; G01 Z-0.5 F20. (Feed to cutting depth) ; G01 Y1.5 F12. (Feed to Y1.5) ; G02 X1.884 Y2.384 R1.25 (CW circular motion) ; (BEGIN COMPLETION BLOCKS) ; G00 Z0.1 M09 (Rapid retract, Coolant off) ; G53 G49 Z0 M05 (Z home, Spindle off) ; G53 Y0 (Y home) ; M30 (End program) ; %

Negative R Address Programming Example

% O60022 (G02 NEGATIVE R ADDRESS) ; (G54 X0 Y0 is at the bottom-left of part) ; (Z0 is on top of the part) ; (T1 is a .5 in dia endmill) ; (BEGIN PREPARATION BLOCKS) ; T1 M06 (Select tool 1) ; G00 G90 G40 G49 G54 (Safe startup) ; G00 G54 X-0.25 Y-0.25 (Rapid to 1st position) ; S1000 M03 (Spindle on CW) ; G43 H01 Z0.1 (Activate tool offset 1) ; M08 (Coolant on) ; (BEGIN CUTTING BLOCKS) ; G01 Z-0.5 F20. (Feed to cutting depth) ; G01 Y1.5 F12. (Feed to Y1.5) ; G02 X1.884 Y0.616 R-1.25 (CW circular motion) ; (BEGIN COMPLETION BLOCKS) ; G00 Z0.1 M09 (Rapid retract, Coolant off) ; G53 G49 Z0 M05 (Z home, Spindle off) ; G53 Y0 (Y home) ; M30 (End program) ; %

Thread Milling

Thread milling uses a standard G02 or G03 move to create the circular move in X-Y, then adds a Z move on the same block to create the thread pitch. This generates one turn of the thread; the multiple teeth of the cutter generate the rest. Typical block of code:

N100 G02 I-1.0 Z-.05 F5. (generates 1-inch radius for 20-pitch thread) ;

Thread milling notes:

Internal holes smaller than 3/8 inch may not be possible or practical. Always climb cut the cutter.

Use a G03 to cut I.D. threads or a G02 to cut O.D. threads. An I.D. right hand thread will move up in the Z-Axis by the amount of one thread pitch. An O.D. right hand thread will move down in the Z-Axis by the amount of one thread pitch. PITCH = 1/Threads per inch (Example - 1.0 divided by 8 TPI = .125)

This program I.D. thread mills a 1.5 diameter x 8 TPI hole with a 0.750" diameter x 1.0" thread hob.

  1. To start, take the hole diameter (1.500). Subtract the cutter diameter .750 and then divide by 2. (1.500 - .75) / 2 = .375

    The result (.375) is the distance the cutter starts from the I.D. of the part.

  2. After the initial positioning, the next step of the program is to turn on cutter compensation and move to the I.D. of the circle.

  3. The next step is to program a complete circle (G02 or G03) with a Z-Axis command of the amount of one full pitch of the thread (this is called Helical Interpolation).

  4. The last step is to move away from the I.D. of the circle and turn off cutter compensation.

You cannot turn cutter compensation off or on during an arc movement. You must program a linear move, either in the X or Y Axis, to move the tool to and from the diameter to cut. This move will be the maximum compensation amount that you can adjust.

Thread Milling Example

Thread Milling Example, 1.5 Diameter X 8 TPI: [1]Tool Path, [2] Turn on and off cutter compensation.

note: Many thread mill manufacturers offer free online software to help you create your threading programs.
% O60023 (G03 THREAD MILL 1.5-8 UNC) ; (G54 X0 Y0 is at the center of the bore) ; (Z0 is on top of the part) ; (T1 is a .5 in dia thread mill) ; (BEGIN PREPARATION BLOCKS) ; T1 M06 (Select tool 1) ; G00 G90 G40 G49 G54 (Safe startup) ; G00 G54 X0 Y0 (Rapid to 1st position) ; S1000 M03 (Spindle on CW) ; G43 H01 Z0.1 (Activate tool offset 1) ; M08 (Coolant on) ; (BEGIN CUTTING BLOCKS) ; G01 Z-0.5156 F50. (Feed to starting depth) ; (Z-0.5 minus 1/8th of the pitch = Z-0.5156) ; G41 X0.25 Y-0.25 F10. D01 (cutter comp on) ; G03 X0.5 Y0 I0 J0.25 Z-0.5 (Arc into thread) ; (Ramps up by 1/8th of the pitch) ; I-0.5 J0 Z-0.375 F20. (Cuts full thread) ; (Z moving up by the pitch value to Z-0.375) ; X0.25 Y0.25 I-0.25 J0 Z-0.3594 (Arc out of thread) ; (Ramp up by 1/8th of the pitch) ; G40 G01 X0 Y1 (cutter comp off) ; (BEGIN COMPLETION BLOCKS) ; G00 Z0.1 M09 (Rapid retract, Coolant off) ; G53 G49 Z0 M05 (Z home, Spindle off) ; G53 Y0 (Y home) ; M30 (End program) ; %

N5 = XY at the center of the hole

N7 = Thread depth, minus 1/8 pitch

N8 = Enable Cutter Compensation

N9 = Arcs into thread, ramps up by 1/8 pitch

N10 = Cuts full thread, Z moving up by the pitch value

N11 = Arcs out of thread, ramps up 1/8 pitch

N12 = Cancel Cutter Compensation

note: Maximum cutter compensation adjustability is 0.175.

Outside Diameter (O.D.) Thread Milling

O.D. Thread Milling Example, 2.0 diameter post x 16 TPI: [1] Tool Path [2] Rapid Positioning, Turn on and off cutter compensation, [3] Start Position, [4] Arc with Z.

% O60024 (G02 G03 THREAD MILL 2.0-16 UNC) ; (G54 X0 Y0 is at the center of the post) ; (Z0 is on top of the opost) ; (T1 is a .5 in dia thread mill) ; (BEGIN PREPARATION BLOCKS) ; T1 M06 (Select tool 1) ; G00 G90 G40 G49 G54 (Safe startup) ; G00 G54 X0 Y2.4 (Rapid to 1st position) ; S1000 M03 (Spindle on CW) ; G43 H01 Z0.1 (Activate tool offset 1) ; M08 (Coolant on) ; (BEGIN CUTTING BLOCKS) ; G00 Z-1. (Rapids to Z-1.) ; G01 G41 D01 X-0.5 Y1.4 F20. (Linear move) ; (Cutter comp on) ; G03 X0 Y0.962 R0.5 F25. (Arc into thread) ; G02 J-0.962 Z-1.0625 (Cut threads while lowering Z) ; G03 X0.5 Y1.4 R0.5 (Arc out of thread) ; G01 G40 X0 Y2.4 F20. (Linear move) ; (Cutter comp off) ; (BEGIN COMPLETION BLOCKS) ; G00 Z0.1 M09 (Rapid retract, Coolant off) ; G53 G49 Z0 M05 (Z home, Spindle off) ; G53 Y0 (Y home) ; M30 (End program) ; %
note: A cutter compensation move can consist of any X or Y move from any position as long as the move is greater than the amount being compensated.

Single-Point Thread Milling

This program is for a 1.0" diameter hole with a cutter diameter of 0.500" and a thread pitch of 0.125 (8TPI). This program positions itself in Absolute G90 and then switches to G91 Incremental mode on line N7.

The use of an Lxx value on line N10 allows us to repeat the thread milling arc multiple times, with a Single-Point Thread Mill.

% O60025 (G03 SNGL PNT THREAD MILL 1.5-8 UNC) ; (G54 X0 Y0 is at the center of the bore) ; (Z0 is on top of the part) ; (T1 is a .5 in dia thread mill) ; (BEGIN PREPARATION BLOCKS) ; T1 M06 (Select tool 1) ; G00 G90 G40 G49 G54 (Safe startup) ; G00 G54 X0 Y0 (Rapid to 1st position) ; S1000 M03 (Spindle on CW) ; G43 H01 Z0.1 (Activate tool offset 1) ; M08 (Coolant on) ; (BEGIN CUTTING BLOCKS) ; G91 G01 Z-0.5156 F50. (Feed to starting depth) ; (Z-0.5 minus 1/8th of the pitch = Z-0.5156) ; G41 X0.25 Y-0.25 F20. D01 (Cutter comp on) ; G03 X0.25 Y0.25 I0 J0.25 Z0.0156 (Arc into thread) ; (Ramps up by 1/8th of the pitch) ; I-0.5 J0 Z0.125 L5 (Thread cut, repeat 5 times) ; X-0.25 Y0.25 I-0.25 J0 Z0.0156 (Arc out of thread) ; (Ramps up by 1/8th of the pitch) ; G40 G01 X-0.25 Y-0.25 (Cutter comp off) ; (BEGIN COMPLETION BLOCKS) ; G00 Z0.1 M09 (Rapid retract, Coolant off) ; G53 G49 Z0 M05 (Z home, Spindle off) ; G53 Y0 (Y home) ; M30 (End program) ; %

Specific line description:

N5 = XY at the center of the hole

N7 = Thread depth, minus 1/8 pitch. Switches to G91

N8 = Enable Cutter Compensation

N9 = Arcs into thread, ramps up by 1/8 pitch

N10 = Cuts full thread, Z moving up by the pitch value

N11 = Arcs out of thread, ramps up 1/8 pitch

N12 = Cancel Cutter Compensation

N13 = Switches back to G90 Absolute positioning

Helical Motion

Helical (spiral) motion is possible with G02 or G03 by programming the linear axis that is not in the selected plane. This third axis will be moved along the specified axis in a linear manner, while the other two axes will be moved in the circular motion. The speed of each axis will be controlled so that the helical rate matches the programmed feedrate.

F - Feed rate
*I - Distance along X-axis to center of circle
*J - Distance along Y-axis to center of circle
*K - Distance along Z-axis to center of circle
*R - Radius of arc
*U - X-axis incremental motion command
*W - Z-axis incremental motion command
*X - X-axis absolute motion command
*Y - Y-axis absolute motion command
*Z - Z-axis absolute motion command

* indicates optional

These G codes are used to specify a circular motion (CW or CCW) of the linear axes (Circular motion is possible in the X and Z axes as selected by G18). The X and Z values are used to specify the end point of the motion and can use either absolute (X and Z) or incremental motion (U and W). If either the X or Z is not specified, the endpoint of the arc is the same as the starting point for that axis. There are two ways to specify the center of the circular motion; the first uses I or K to specify the distance from the starting point to the center of the arc; the second uses R to specify the radius of the arc.

For information on G17 and G19 Plane Milling, see the Live Tooling section.

G02 Axis Definitions: [1] Turret Lathes, [2] Table Lathes.

G02 and G03 Programs

R is used to specify the radius of the arc. With a positive R, the control will generate a path of 180 degrees or less; to generate a radius of over 180 degrees, specify a negative R. X or Z is required to specify an endpoint if different from the starting point.

The following lines cut an arc of less than 180 degrees:

G01 X3.0 Z4.0 ; G02 Z-3.0 R5.0 ;

G02 Arc Using Radius

I and K are used to specify the center of the arc. When I and K are used, R may not be used. The I or K is the signed distance from the starting point to the center of the circle. If only one of I or K is specified, the other is assumed to be zero.

G02 Defined X and Z: [1] Start.

Be aware: Many service and repair procedures should be done only by authorized personnel. The service technicians at your Haas Factory Outlet (HFO) have the training, experience, and are certified to do these tasks safely and correctly. You should not do machine repair or service procedures unless you are qualified and knowledgeable about the processes.

Danger: Some service procedures can be dangerous or life-threatening. DO NOT attempt a procedure that you do not completely understand. Contact your Haas Factory Outlet (HFO) and schedule a service technician visit if you have any doubts about doing a procedure.

Feedback