G02 G03 Circular Interpolation

G02 G03 Circular Interpolation

G02 G03 Circular Interpolation

On a Fanuc or Haas control G02 G03 are the two G codes we use to move around clockwise and counterclockwise circles. You don’t need the leading zeros so from now on I will call them G2 and G3.

And by the way neve use the letter O it’s number zero

GO2 GO2 looks almost exactly the same as G02 G03. But your control will blow it’s mind and get real mad with you.

If you want to know how to do this on your Heidenhain control you need to read this article.

Oh and please don’t call it interpolation as it annoys me.

  • Linear interpolation is movement in a straight line.
  • Circular interpolation in moving in a circle.
  • Interpolation is the movement.

Now that’s the telling off out of the way let’s move on. It’s ok I don’t hold a grudge.

Let’ Talk About Milling A Shape

When you are milling a shape and you want to move in a circular motion you use G2 or G3

For a clockwise arc use G2 and for a counter clockwise arc use G3.

They both work the same way. On a modern control you programme the endpoint (an XY figure on a milling machine) and the radius you require.

Then your CNC controler magically creates your circle. You can programme any arc like this with one exception.

Do you know what it is?

Ok I will tell you later.

Lets go back to school.

Remember construction? Of course you do.

We are going to mill the top section of this part

G02 G03

Let’s see what the control has to do to work out where the centre of the circle is. It knows its current position and in your G3 line you tell it the end point and the radius you want.

G02 G03

Well it gets out its little compasses and draws two circles at the radius you told it.

G02 G03


It positions the compass first on the start point and draws an arc. Then on the end point and draws an arc.

Where these two arcs cross it places the point of the compass. Now it can strike an arc that touches your start point and your end point.


G02 G03


And that’s how the maths works.

Tell me did you really believe that inside your CNC machine there is a little man with a pair of compasses?

Sorry I lied it’s all done with simple trigonometry. But at least I tricked you into understanding the principle.


G02 G03

So you should now begin to work out why you get an alarm when the radius is too small. Your two arcs just don’t cross. In other words you are trying to fit an arc between two point that simply miss one another.


G02 G03

Oh Before you Go More on G02 G03

What about the question. When can you not use endpoint and radius with G02 and G03 ?

Answer: When you want to machine a full circle using G02 and G03.

You can do it but you would have to break it into two halves.

And Now Ladies and Gentlemen the Infamous I and J

At the CNC Training Centre we don’t get too excited about I and J when it comes to programming circles. That’s because you don’t need to worry your pretty head about it anymore. You almost never need it.

Did he say almost?

Well yes almost. You could programme forever and never bother about I and J with G02 G03. So just go off and watch some porn for awhile and I will explain to the real programmers when you can use it.

In the old days I and J was the only way to programme an arc. You would tell the control where the centre of the circle is and the endpoint. This is cumbersome and a bit tricky. That’s why I’m not telling you fully how to use it.

Anyway one really good simple way to use I and J is for a full circle. Oh and it’s bloody easy. That’s once I’ve explained it to you.

Click here for more info on full circle

When I was a boy hundreds of years ago I had a toy called a spirograph. A series of plastic gears. You stuck your pen in a hole in the gear and rotated it around another gear. With a bit of practice you could make some really nice pictures. Kept us happy for hours the crime rate dropped dramatically in my area when these things came out.

What’s this to do with CNC programming you ask? Well if you tried to use end point and radius for a full circle this is what you would get:

If your start point was X0 Y0 you would program G3 X0 Y0 R100. assuming radius was 100mm.

So in a full circle your endpoint is the same as your start point. There are millions of circles the computer could pick. It would be just like the shapes above. If you do the compass trick you will see what I mean. That’s why it’s impossible.

In Comes I and J

G02 G03

Now if we use I and J there are four options as above.

You would simply program as below for a full circle (20mm Radius)

  • G3 I-20.
  • G3 I20.
  • G3 J20.
  • G3 J-20.

And that’s it.

G02 G03

So these are the four options


G02 G03

So there you have a fantastic way to programme a full circle without having to break it down into two halves.

Why only one figure G3 I-20.

That’s because you are already at the endpoint so there is no need to repeat it.

Click here for more info on full circle

If you want to do this on a Sinumeric Siemens 840D read this

Thanks For Reading

Don’t forget there’s loads more folks.

And a YouTube channel

Services offered at CNC Training Centre

Edgecam training.

Classroom programmer training.

Onsite CNC Machine Training.

CNC Training on all controls and machines.

Mazak Training Fanuc Training

Siemens Sinumerik

Don’t forget we offer training on all types of Mazak Machines and all Fanuc Controls 6m to 31i Oi old to young.


Log out of this account

Leave a Reply

CNC Training Centre
WP to LinkedIn Auto Publish Powered By : XYZScripts.com