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 never use the letter O it’s number zero

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

It will also do some really weird shit like trying to start a new program. Anyway just don’t do it.

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 the shit out of me.

  • Linear interpolation is movement in a straight line.
  • Circular interpolation in moving in a circle.
  • Interpolation is movement.
  • CNC Training Centre Reviews

    30 five star ratings on Google (just saying)

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

Which one of you bastards said interpolation?

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 controller 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, it’s OK to not know. (Just means you are little thick).

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.

Get yourself a pair of compasses and try it. It’s great fun.

 

G02 G03

 

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?

Fuckin hell I give up.

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

 

g02 g03 lathe

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.

G2 G3 No Pot of Gold

Your control will give you an alarm “End Point Not Found” which makes sense because it can’t find one. It’s like the pot of gold at the end of the rainbow.

 

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. I’m not going to explain anymore because this method is for wimps and peole who can’t be arsed to read my articles.

You know who you are, ordering Chicken Korma in an Indian Restaurant.

Well…… what follows is a full, blow your bollocks off, shit your pants the next day, vindaloo.

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 using 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 about it.

Anyway one really good simple way to use I and J is for a full circle. Oh and it’s bloody easy. That is 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 Spiro Graph.

Spirograph those were the days

It consisted of 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

So some clever bloke thought fucks this I’ll invent I and J.

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 or be clever like a newsreader or some twat off mastermind.

Why do you only need the I and not X and Y Dave?

For fucks sake don’t call me Dave my name is David.

I had this really nice guy phone me from Africa the other day. He explained to me that he needed to get his inheritance of 10 million pounds out of England and if I helped him he would give me £20,000. All I had to do was give him all my bank and credit card details. Oh and a small one off payment of £1000.

Of course I agreed, what a bargain. Just as I was about to do this the cheeky bastard called me Dave.

I immediately told him to fuck off. I just hate being called Dave.

I gave him my 96 year old mothers phone number because I thought at least she can benefit from it all. Her name is Mary so he couldn’t shorten that. She only has £1200 in savings so it would be doing her a massive favour.

 

Explanation

You don’t need to re-state the X  and Y because you are already at the endpoint

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.

CNC Training Centre Reviews

30 five star ratings on Google (just saying)


 



Fanuc G73

Call David: 07834 858 407

for Hurco training

Anyway here is a little thing about a Hurco control that is really useful. One of the things I always teach my pupils, or victims as they are sometimes called is this.

CNC Training Centre Reviews

30 five star ratings on Google (just saying)


G76 Threading Cycle How Many Passes

G76 Threading Cycle you must agree that it’s not easy to use.

Read this article, no more sleepless nights worrying about G76 Threading Cycle. Myth busting information that simplifies and demystified. Applies to Haas, Fanuc and Mazak ISO

G76 Threading Cycle

Be sure to read the end of this article to see a simple way to calculate the number of passes needed.

I noticed quite a few people posting problems on Machining forums etc and as usual loads of misinformation. I decided to do a search on this and frankly there is “Bugger All”. So here we are.

 What Exactly is a G76 Threading Cycle?

G76 Threading Cycle

To cut a thread with a long hand G code program would take ages. Just one thread could need 30 lines of code. So to me that means loads of opportunities to screw up and it’s complicated.

Oh and It Gets Worse.

If you want to change something it is a nightmare. You will have to reprogram it just to change the depth of cut.

And not to mention all that boring maths that you will have to do. You remember that teacher with the beard that kept banging on about ratios and differentiation? Well, maybe you should have paid more attention.

Just One or Two Lines and It’s Done.

Read on, it’s simple and it’s complicated.

Sounds daft I know but you can miss out a lot of the complicated stuff in the cycle as a lot of the values have defaults (meaning you can miss them out).

Some of them are just boring and only used by clever fuckers, not normal people like you and me.

G76 X16.93 Z-25. K1.534 D.485 F2.5 (Simple as this)

Multi Repetitive Cycles do you know what they are?

Really, you don’t need to know, it’s just me trying to impress. Most of the cycles on a CNC Lathe are wrongly call Canned Cycles. The correct name for a cycle like G76 Threading Cycle and G71 Roughing Cycle is a Multi Repetitive Cycle. No that’s not an illness it’s the correct name. So don’t start ringing the “no win no” fee lawyers.

Canned cycles repeat each time a position is given. Multi Repetitive Cycles do what the title suggests, they repeat moves within a process. In threading, the cycle creates all the repeated moves needed for the thread to be produced.

That’s another piece of useeless information.

G76 Threading Cycle. So How Does It Work?

On a Fanuc control this is either a one line cycle or a two line cycle depending on age of control and parameter setting. Haas is a one line cycle.

You tell the cycle the depth, pitch, core diameter, length and maybe a few more “bits n bobs”. Then at the push of a button your thread appears.

Haas and Some Fanucs

G76 X16.93 Z-25. K1.534 D.485 A60 Q0 P2 F2.5

X = Core diameter of thread
Z = Thread end point
K = Depth of thread (as a radius)
D = Depth of first cut
A = Insert angle (Assumed A0 if not entered)
Q = The thread start angle this is used for multi start threads and can be omitted.
P = Cutting method (see later explanation, can be omitted)
F = Pitch of thread

Note on the Fanuc control you would have to enter the D value with no decimal point (D485)

So G76 Threading Cycle in it’s simplest form

You could write:
G76 X16.93 Z-25. K1.534 D.485 F2.5

Fanuc

G76 P010060 Q20 R.02
G76 X16.93 Z-25. P1534 Q485 F2.5

G76 Threading Cycle First Line
P01   One spring pass       00   Chamfer        60   Thread angle
Q       Minimum depth of cut
R       Finishing allowance

G76 Threading Cycle Second line

X         Core diameter of thread
Z         Thread end point
P         Depth of thread (as a radius no decimal point)
Q        Depth of first cut no decimal point.
F         Pitch of thread

On the Fanuc control it uses a two line display the P010060 is split into three sets of two digits.

First two being the number of spring passes.
Second two are chamfer. (More Details)
Third two are the tool angle.

So G76 Threading Cycle (Two Line) in it’s simplest form

Sorry there ain’t one, it’s complicated!

What on Earth are Spring Passes?

G76 Threading Cycle

When you cut a thread you get push off on the last cut so you can go over this a few times to get the correct size. These extra cuts are called spring passes. It depends on the material as to how many you will need.

Fuck The Zeus Book

Oh and by the way don’t go looking up the thread depth in some Zeus Book or some such thing. Just multiply the pitch by .614

Lets Cut an M20 x 2.5  Thread Using The G76 Threading Cycle

Thread Depth =.614 x Pitch

.614 x 2.5 = 1.535

X Minor Diameter to cut = 20 – (1.535 x 2)

X Minor Diameter to cut = 16.93

 

G76 Threading Cycle

G76 X16.93 Z-25. K1.535 D.485 F2.5


Have You Been Doing it Wrong for Years?

As I said above when I started googling G76, it’s not a pretty sight. For one there’s not that much information and not least of all some of it is wrong.

There are some absolute pricks out there claiming to know all about CNC Programming who actually know Jack Shit.

The way you use this cycle makes a big difference to the way the tool performs. The default above for the Haas G76 Threading Cycle would give you what is known as a “plunge cut”.
G76 Threading Cycle

It is where the tool plunges into the thread and the cut gets wider and therefore is more prone to chatter as it deepens. It is going straight down the centre of the thread vee.

If you put in A60 then the cycle will flank cut.

Flank Cut?????

See below:

Don’t know what flank cutting is? Don’t worry it just means you are stupid. I won’t tell anyone, your secret is safe with me.

Help is At Hand

Ways to cut a thread

(1) Plunge: cut straight down the middle of the thread programme. A0 or simply miss it out.

 

G76 Threading Cycle

(2) Flank cut: Cuts down the flank of the thread. A60 on a 60 degree thread form.

G76 Threading Cycle

(3) Alternate flank Cut: Switched from side to side cutting down the flank of the thread. A60 P2 if you have the option.

G76 Threading Cycle

So Which One Is Best.

The last one number (3) is the best and number (1) is worst.

Sorry to you geeks but I am going to over simplify it.

Why?

With method three you get a nice even cut with less chatter and less tool wear. It’s also kinder to your insert and better for the environment.

G76 Threading Cycle

If you don’t believe me then talk to your tooling guy. He knows more than me anyway.

G76 has a P value of 1 to 4 (P1 P2 etc). This determines the four different methods you can use. My advice is just ignore them all and use P2. This means the tool cuts by alternating between the two sides of the thread as above. You will also need to input A60 for the angle of the tread.

G76 D.485 K1.534 X16.93 Z-25. A60 P2 F2.5

Yes and as Always There’s a Catch

You will only have alternate flank cutting on a newer machine if you have an old banger then you’re stuffed.

Not to worry just use method (2) flank cutting it’s fine.

G76 Threading Cycle

Providing you input the insert angle A60 on a 60 degree thread form then you will get flank cutting.


 Cut Depth (The Elephant in The Room)

How do you work out the number of cuts?

G76 Threading Cycle

Be honest I know what you do, you guess. Well you are not alone actually I think loads of people do this. They guess a depth for the first cut then they just run the cycle and see how many passes they get.

Is this you?

Come on now this is not good.

For years I had seen that formula in the big yellow Fanuc Manual.

To be honest it just looked way too complicated. Then one day when my counselling sessions had finished I gingerly opened the big yellow book and decided once and for all to conquer it.


Wooppee It’s Easy

It’s just the depth of the thread divided by the square root of the number of passes. Bit of a mouthful.

So on your calculator:

(1) Press keys for depth of the thread eg 1.534

G76 Threading Cycle


(2) Press divide key (÷)

then press the √ key

G76 Threading Cycle


(3)Enter the number then press 10 then press =

 

G76 Threading Cycle

1.534 ÷ √10 = 0.4854

This is the value to enter for D

D.485


So Easy You Can Do it Backwards

So your cycle reads

G76 D.485 K1.534 X16.93 Z-25. A60 P2 F2.5

So how many passes will I get from this?

  1. Enter the depth of thread (K Value).
  2. Press ÷
  3. Enter depth of first cut (D value)
  4. Press =
  5. Press the squared key (²)

The answer is:

10.01689871 that’s 10 to you.

G76 Threading Cycle

So next time you cut a thread don’t guess the number of passes uses this formula it’s dead easy. You can also loose weight if you do this as part of a calorie controlled diet.

As I Said You Can Do it Backwards

Depth of thread divided by the depth of first pass squared.

As in the example above.

I know my depth of thread is 1.534 and I have

(1.534 / .4854)²

1.534/.4854 = 3.1602

3.1602 x 3.1602 = 9.98737 (10 to you)

Read on To See How to Get Every pass.

So you can use this formula to calculate the depth of every pass.

1.534 ÷√1   = 1.534      Cut = .000
1.534 ÷√2  = 1.084     Cut = .450
1.534 ÷√3  = 0.885     Cut = .199
1.534 ÷√4  = 0.767     Cut = .118
1.534 ÷√5  = 0.686     Cut = .081
1.534 ÷√6  = 0.626     Cut = .060
1.534 ÷√7  = 0.579      Cut = .047
1.534 ÷√8  = 0.542     Cut = .037
1.534 ÷√9  = 0.511      Cut = .031
1.534 ÷√10 = 0.485     Cut = .026

Notice how as the thread gets deeper the cuts become smaller. This is because the width of the cut gets bigger.

So making the depth less levels out the load on the tool.

Some friendly Advice

Keep it simple on your first attempt. That means missing out as much as possible. Cut your thread in fresh air (no component in the chuck). Then you can play around with all the little adjustments and watch what they do. This engineering business is so much fun. Oh and slow the speed down when you are testing it so you can see exactly what is happening. You can get ready with the E Stop.

Oh Yea Here Is Another Tip

Run your spindle really slow (like 100 rpm) that way you can stop the machine with the E Stop if it looks like it’s going to collide with a shoulder.

You only need run one pass like this. It may just scratch the first pass. Put your speed back up and you won’t see it. (It can be our secret)

Single Block, What about that?

When using G76 you can’t use feedhold. On some controls the tool will retract but please check the small print first or try it in fresh air.

Why? ……. Come on think about it.

You also can’t use spindle override. These are both blocked by the cycle to stop you messing up your precious thread.

In “Single Block” each press of the cycle start will give you one complete pass.

A Few Rules

Rules rules always stupid dumb ass rules.

  1. Always use G97 speed in RPM you can’t use G96.
  2. Don’t move the Z start position unless it’s by a multiple of the pitch.
  3. Don’t change the speed.
  4. Machine has to accelerate into the thread so start at Z5. depending on the speed and pitch this may need to be more.
  5. Watch out for that Z end point. That’s the one that will make it hit the chuck if you get it wrong.
  6. Come and train with us.

Some more useful information from Vardex.

Thanks For Reading

Don’t forget there’s loads more folks.

And a YouTube channel

Contact Us

Services offered at CNC Training Centre

Siemens Sinumerik Training

Edgecam training.

Classroom programmer training.

Onsite CNC Machine Training.

CNC Training on all controls and machines.

 

Mazak Training Fanuc Training

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



G71 and G70 Use to Rough and Finish Turn

New video about the G71 roughing cycle on a Haas or a Fanuc control, also covers the G70 finishing cycle.

CNC Training Call David: 07834 858 407

30 Five Star Reviews

CNC Training Centre Reviews

Contact CNC Training Centre

 

 

G71 is sometimes known as a canned cycle when in fact it is a multi repetitive cycle. The G70 cycle goes with it and can pick up the same lines to finish.

The N numbers are important as the cycle uses these as the points of reference to jump to.

G71 cycle interprets the shape between these two N numbers and then breaks up the shape for roughing.

“Read More”

Careers in CNC

View all current vacancies in CNC

Click here

Call David: 07834 858 407