G02 CNC Code | Circular Interpolation (CW)

Mastering G02 Circular Interpolation: The Complete Guide for All CNC Professionals

In the precision-driven world of CNC machining, circular interpolation stands as a fundamental technique that differentiates basic cutting operations from advanced contouring capabilities. This comprehensive guide explores G02 circular interpolation—a cornerstone command that enables clockwise arc movements across various CNC platforms including lathes and machining centers.

What Is G02 Circular Interpolation?

G02 is a G-code command that instructs a CNC machine to move in a clockwise circular path. Unlike linear movements (G01), circular interpolation allows the cutting tool to follow curved paths with mathematical precision, creating arcs and circular features without the need for multiple linear approximations.

The ability to cut smooth arcs is essential for manufacturing countless components—from simple rounded corners to complex contoured surfaces found in aerospace, automotive, and medical industries.

Key Parameters of G02 Command

For successful circular interpolation, the G02 command requires specific parameters:

  • End point coordinates (X, Y, Z)
  • Arc center point (I, J, K) or radius (R)
  • Feed rate (F)

The control unit calculates intermediate points along the arc path, ensuring smooth tool movement between the start and end positions.

G02 Applications Across Different CNC Machines

:counterclockwise_arrows_button: CNC Turning Centers (Lathes)

In CNC lathes, G02 circular interpolation primarily functions in two axes simultaneously:

  • X-Z plane: Creates convex contours on cylindrical workpieces
  • X-C plane: Enables face milling of circular features when using live tooling

Turning centers typically use G02 for:

  • Creating rounded corners on shoulders
  • Cutting convex radii
  • Producing tapered threads with rounded profiles
  • Facing operations with circular patterns

:counterclockwise_arrows_button: CNC Machining Centers

Machining centers utilize G02 across multiple planes:

  • XY plane (G17): Most common for typical milling operations
  • ZX plane (G18): For vertical wall contouring
  • YZ plane (G19): For lateral contouring operations

Applications include:

  • Pocket milling with rounded corners
  • Contour milling of curved surfaces
  • Helical interpolation for thread milling
  • Circular slot cutting
  • Boring operations

Control Unit Differences: G02 Implementation Across Major CNC Systems

Fanuc Control Systems

Fanuc, being one of the most widespread control systems, implements G02 using:

G02 X... Y... Z... I... J... K... F...

Or alternatively:

G02 X... Y... Z... R... F...

Where:

  • I, J, K represent distances from start point to arc center
  • R represents arc radius (negative values for arcs greater than 180°)

Unique to Fanuc:

  • Radius programming (R-value) limited to arcs less than 360°
  • Supports single-block execution of complete circles
  • Decimal point programming for all parameters

Example program for a complex contour on Fanuc:

O1000 (COMPLEX FANUC G02 EXAMPLE)
N10 G90 G17 G21 G40 G80
N20 T1 M06
N30 G54 G00 X0 Y0 S1200 M03
N40 G43 Z100 H01
N50 Z5
N60 G01 Z-5 F150
N70 X10 Y10 F200
N80 G02 X30 Y30 I10 J10
N90 G01 X50 Y30
N100 G02 X70 Y10 R20
N110 G01 X90 Y10
N120 G02 X90 Y-10 I0 J-10
N130 G01 X10 Y-10
N140 G02 X10 Y10 I0 J10
N150 G00 Z100
N160 M30

Siemens Control Systems

Siemens SINUMERIK controls offer additional flexibility with G02 programming through:

G02 X... Y... Z... I... J... K... F...

Or:

G02 X... Y... Z... CR=... F...

Unique to Siemens:

  • Uses CR= parameter instead of R for radius programming
  • Positive CR= values for arcs less than 180°, negative for arcs greater than 180°
  • Full support for programmable rounding of contour transitions
  • Supports intermediate points programming (CIP command)

Example program for Siemens SINUMERIK:

PROG SIEM_G02_EX
N10 G90 G17 G710
N20 T="MILL_10" D1 M6
N30 S3000 M3 F300
N40 G0 X0 Y0 Z50
N50 Z2
N60 G1 Z-5
N70 X20 Y20
N80 G2 X50 Y20 CR=15
N90 G1 X70 Y40
N100 G2 X70 Y70 I0 J15
N110 G1 X20 Y70
N120 G2 X20 Y20 CR=25
N130 G0 Z50
N140 M30
END

Haas Control Systems

Haas control implements G02 with simplified programming but maintains compatibility with traditional formats:

G02 X... Y... Z... I... J... K... F...

Or:

G02 X... Y... Z... R... F...

Unique to Haas:

  • Intuitive visual programming interface for arc creation
  • Default modal group behavior may differ from other controls
  • Special parameter settings for controlling acceleration during arc movements

Example program for Haas:

O12345 (HAAS G02 EXAMPLE)
N10 G90 G54 G17 G21
N20 T1 M06
N30 G00 X0 Y0 S2500 M03
N40 G43 H01 Z25
N50 Z2
N60 G01 Z-3.5 F150
N70 X25 Y25 F250
N80 G02 X50 Y0 I0 J-25
N90 G02 X25 Y-25 I-25 J0
N100 G02 X0 Y0 I0 J25
N110 G02 X25 Y25 I25 J0
N120 G01 X35 Y35
N130 G02 X55 Y35 R10
N140 G01 X65 Y45
N150 G02 X65 Y25 I0 J-10
N160 G01 X25 Y25
N170 G00 Z25
N180 M30

Mazatrol Control Systems

Mazatrol offers both conversational programming and G-code based programming. In G-code mode, G02 functions as:

G02 X... Y... Z... I... J... K... F...

Or:

G02 X... Y... Z... R... F...

Unique to Mazatrol:

  • Dual-mode programming (conversational or G-code)
  • In conversational mode, arcs are defined through point-to-point or geometric feature selection
  • Automatic selection of optimized cutting paths

Example program in Mazatrol G-code mode:

%
O0001 (MAZATROL G02 EXAMPLE)
N1 G90 G17 G21
N2 G00 G54 X0 Y0 Z50
N3 T01 M06
N4 G43 H01 Z50
N5 S2000 M03
N6 G00 X0 Y0 Z2
N7 G01 Z-5 F150
N8 X10 Y0 F200
N9 G02 X20 Y10 I0 J10
N10 G01 X30 Y10
N11 G02 X40 Y0 I0 J-10
N12 G01 X40 Y-20
N13 G02 X20 Y-40 I-20 J0
N14 G01 X0 Y-20
N15 G02 X0 Y0 I0 J20
N16 G00 Z50
N17 M30
%

Heidenhain Control Systems

Heidenhain TNC controls implement circular interpolation using their unique format:

CT X... Y... DR-

or

CC X... Y...
C X... Y... DR-

Where:

  • CT defines circular tangential connection
  • CC defines circle center
  • C defines circular path
  • DR- indicates clockwise direction (equivalent to G02 in other systems)

Unique to Heidenhain:

  • More descriptive command structure
  • Circle center definition separate from movement commands
  • Smart contour detection for automatic radius determination

Example program for Heidenhain TNC:

BEGIN PGM HEIDEN_G02 MM
BLK FORM 0.1 Z X0 Y0 Z-20
BLK FORM 0.2 X+100 Y+100 Z+0
TOOL CALL 1 Z S3500 F300
L Z+50 R0 FMAX M3
L X+0 Y+0 Z+2 R0 FMAX
L Z-5 F150
L X+20 Y+20 F200
CC I+20 J+0
C X+40 Y+20 DR-
L X+60 Y+40
CC X+60 Y+20
C X+80 Y+20 DR-
L X+80 Y+0
CC X+60 Y+0
C X+40 Y+0 DR-
L X+20 Y+20
L Z+50 R0 FMAX
L X+0 Y+0 R0 FMAX
END PGM HEIDEN_G02 MM

Mitsubishi Control Systems

Mitsubishi MELDAS/M700/M800 series controls use G02 with:

G02 X... Y... Z... I... J... K... F...

Or:

G02 X... Y... Z... R... F...

Unique to Mitsubishi:

  • High-precision mode specifically for circular interpolation
  • Fine control of arc error tolerance through parameters
  • Special circular interpolation commands for specific industries

Example program for Mitsubishi:

O0001 (MITSUBISHI G02 EXAMPLE)
N10 G90 G17 G21
N20 G00 G54 X0 Y0 Z50
N30 T1 M06
N40 S2500 M03
N50 G43 Z50 H01
N60 G00 X0 Y0 Z2
N70 G01 Z-6 F120
N80 X15 Y15 F180
N90 G02 X45 Y15 I15 J0
N100 G01 X60 Y30
N110 G02 X60 Y60 I0 J15
N120 G01 X15 Y60
N130 G02 X15 Y15 I0 J-22.5
N140 G00 Z50
N150 M30

Advanced G02 Techniques and Considerations

3D Helical Interpolation

By adding Z-axis movement to a G02 command, you can create helical paths for:

  • Thread milling
  • Ramping into materials
  • Creating springs and helical features

Example helical interpolation (Fanuc format):

G17 G90
G00 X0 Y0 Z0
G01 Z-2 F100
G02 X0 Y0 I10 J0 Z-10 F150

Error Compensation and Accuracy Considerations

Circular interpolation accuracy depends on:

  1. The control unit’s interpolation algorithm
  2. Machine mechanics and feedback systems
  3. Programmed feed rates
  4. Arc size and plane selection

To optimize accuracy:

  • Use higher-resolution encoders for critical applications
  • Adjust feed rates based on arc size (slower for smaller radii)
  • Consider acceleration limits of machine axes
  • Properly configure machine parameters for circular interpolation

Common Error Codes and Troubleshooting

Control System Error Code Description Solution
Fanuc P/S33 No arc center specified Add I, J, K or R values
Siemens 14080 End point not on arc Check endpoint coordinates
Haas 37 Illegal I, J, K value Verify arc center values
Mazatrol E105 Arc radius too small Increase radius value
Heidenhain 160 End point deviates from circle Check endpoint or use CT command

Best Practices for G02 Programming Across Different Systems

  1. Use absolute positioning (G90) for consistent results across all control units
  2. Specify plane selection explicitly (G17, G18, or G19)
  3. Follow manufacturer-recommended programming styles for each control type
  4. Maintain consistent units (G20/G21) throughout the program
  5. Consider acceleration/deceleration characteristics of your specific machine
  6. Use smaller incremental movements for higher accuracy on complex contours
  7. Document radius and center point calculations in program comments

Conclusion

Mastering G02 circular interpolation across different CNC systems opens up endless possibilities for creating precise curved features in machined parts. While the fundamental principle remains consistent—clockwise arc movement—the implementation details vary across control units from Fanuc to Heidenhain.

Understanding these differences and learning to adapt your programming approach to each control system is essential for CNC professionals working across multiple machine platforms. Whether you’re a beginner just starting with basic arc movements or an experienced programmer optimizing complex contoured surfaces, this guide provides the foundation for success with G02 circular interpolation.

By applying the techniques, examples, and best practices outlined in this article, you’ll be well-equipped to leverage the full potential of circular interpolation in your CNC programming projects—regardless of which control system you encounter.