Category Archives: Haas Mill

CNC Milling G02 G03 to Mill a Full Circle

CNC Milling G02 G03

 

CNC Milling G02 G03

To produce a full circle on a Fanuc or Haas G code type programming system is really easy.

Last week I was training four very experienced programmers and I asked them how they would programme a full circle.

The answers they gave shocked me, I had to take out my hip flask and drink a large shot of brandy.

What they were doing was perfectly correct but definitely not the simplest way.

One said he broke the circle into two halves. One said he copied some code he already had in the machine. The other one said he got the bloke who did it in two halves to do it for him. Oh and the other one used I and J and X and Y.

OK so just imagine you want to mill internally around a 40mm diameter circle.

Training Courses Let Me at Em

CNC Milling G02 G03 to Produce a Full Circle, here’s the code.

First in two halves

G0 X0 Y0 S1500 M3
G43 Z3. H01 M8
G1 Z-5. F100.

G41 X20. Y0 D1 F200.    (Apply Cutter Compensation)
G3 X-20. R20.                   (First Half)
X20.                                     (Second Half)
G1 G40 X0 Y0                   (Cancel Cutter Compensation)

G0 G53 Z0

All in one complete with wasted Code

G1 G41 X20. Y0 D1 F200.
G3 X20. Y0  I-20. J0 (Mill Full Circle)
G1 G40 X0 Y0

But this is really all you need

G1 G41 X20. Y0 D1 F200.
G3 I-20.         (Mill Full Circle….. Sooo Simple)
G1 G40 X0 Y0

Remember that song by the Average white Band “Let’s Go round Again”? I used to love it.

Actually I still do, as an old twat I’m allowed to like this shit.

Ok let’s go round again. It’s so easy and it saves leaving a mark.

G1 G41 X20. Y0 D1 F200.
G3 I-20. (Mill Full Circle)
I-20.        (Lets go round again)
G1 G40 X0 Y0

Now if you have a Toshiba with Tosnuc control or Haas or maybe a Yasnac CNC control…..

CNC Milling G02 G03 to produce a full circle you just need this:

G13 D1 I20. F200. (Everything all in one)

                G13 (Counter Clockwise) G12 (Clockwise)
                D1 (Use offset 1)
                I20. (20mm Radius)

G13 does everything. It’s the an all inclusive holiday of circular milling except you don’t gain weight and you’re not pissed everyday.

How cool is that and you even get a tangential approach. At my age you’re glad of all the tangential approaches you can get.

No there is no sexual innuendo here it just means you approach the circle using a circular move. You sort of creep up when it’s not looking.

Know what I mean??

Here is a nice picture to demonstrate.

CNC Milling G02 G03

Think about it, why would we do this?

Well the older and more inaccurate your CNC machine is the more likely it is that your machine will leave a mark at the entry and exit point. This is also dependant on the material and the size of the cut you are using.

A quick workaround for this is to just go round the circle twice (let’s go round again). It very often does the trick.

CNC Milling G02 G03

Oh by the way if I saw a tangential move that big I would think it was a wasted move. (It’s just to demonstrate). You only need a short tangential move to do the job.

The easiest way to programme a tangential approach is like the ones above. Coming in from North, South, East or West on the compass.

Now look at this.

CNC Milling G02 G03

This is the best way, although it’s more difficult to programme.

I think it’s South West on a Compass?? 

 

 

The reason is that there is no axis change of direction and no animals are injured or hurt in any way during the process.

If you watch the movement above and watch carefully what the X axis is doing. It changes direction before it is in contact with the circle. And the same thing on the way out of cut with the Y axis.

Direction Change When Using G02 G03 to mill full circle

When milling a full circle each time an axis changes direction there is a chance you will be left with a visible mark on the circle. These points are North South West and East on a compass.

Watch below to see where these points are. If you have a new machine there should be no visible mark on this change of direction.

On an old machine this can be really noticeable and cause real problem.

CNC Milling G02 G03

 

Circular Motion and Skid Marks

If you have an old machine you will know what I mean. Those little annoying marks where the machine changes direction. If CNC Machines were underpants then these would be the skid marks.

For my American readers in the UK we call those annoying brown marks at the back of your underwear skid marks. I don’t think you get them in America.

 

I have been working on a 12 year old Mazak Horizontal machine recently and was amazed at just how good a circle it produced. It beats the shit out of using a reamer. Oh and you can easily adjust the size with your D offset.

CNC Milling G02 G03

Just a note. If you do use circular milling to produce a bore just remember that if your cutter is not parallel then your bore won’t be either. So don’t use that crappy old re-ground cutter. Try n get the boss to buy you a shiny new one.

 

CNC Milling G02 G03

oh and just one other thing………..

Measure the bore at the top and the bottom.

Simple Full Circle Programme

G1 G41 X20. Y0 D1 F200.
G3 I-20.     
G1 G40 X0 Y0

There are actually four choices which produce four totally different circles.

And potentially a scrap part. So use those machine graphics to check your code if you got em!!

CNC Milling G02 G03

G3 I-20.    (The one on the left and the one we used)

G3 I20.     (The one on the right)

G3 J20.    (The top one)

G3 J-20.  (The bottom one)

Here They Are In Action

CNC Milling G02 G03

 

CNC Milling G02 G03

Click for More on G02 and G03

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

Call David

Learn CNC Programming

Services offered at CNC Training Centre

Edgecam programming and training.

Classroom programmer training.

Onsite CNC Machine Training.

CNC Programming and 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.


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 



CNC Milling G Code List For Beginners

CNC Milling G Code List

Download and print this nice large print CNC Milling G Code List

Download CNC Milling G Code List PDF

I always begin my training sessions by telling my students not to remember anything I say.

This sounds completely stupid and my excuse is it wasn’t my idea to say it.

About ten years ago I worked in France. After about a year and it seemed obvious that I would need to speak to people to order “Fish n Chips” and stuff like that.

Anyway I got these CD’s to teach me French and the bloke (can’t remember his name) started off by telling you not to remember anything he told you.

I think there is a bit of reverse psychology going on but the main idea is that you understand not remember. It didn’t work for me because I still managed to completely fuck up the language. Not realizing French Canadians speak differently to native Frenchmen (I was working for Bombardier) . Anyway I asked this bloke, in French, to “come with me”. I can’t remember what it is in French and after all the bloke on the CD had specifically told me not to remember.

Anyway turns out this had a sexual connotation and made me the complete laughing stock everywhere I went from then on. (I’ll let you do the maths on that one.)

“OK who bought all The fuckin toilet paper?”

When it comes to CNC Programming the idea of not remembering loads of G Codes is really important. Truth is you only need a few and it’s all about understanding what they do.

For Example I want to drill a hole.

You completed a training course at the CNC Training Centre. You understood it all and you practiced with you free simulation software that you get with the course.

You start writing a program to drill some holes.

From your training you know that there is a cycle that drills holes.

You understand how the cycle feeds the tool down to a depth and then it rapids out ready to do another.

Quick Fix G81 Video

You also know that if you keep adding more positions (X50. Y50.) it will keep drilling holes.

And… when you are sick of drilling holes there’s another G code to stops it.

What Are These G Codes?

So you just look em up on your CNC Milling G Code List.

G81 Drilling Canned Cycle
G80 Cancel Canned Cycle

Then you think “mmm I’m sure there’s one that pecks the material out and breaks it up”

“Let me see… Ah this looks like the one

G73                 Peck Drilling

CNC Milling G Code List

Type up or print this list in nice big letters and stick it to the side of your machine

Download CNC Milling G Code List PDF

CNC Milling G Code List

G00                 Move at Rapid speed
G01                 Feed in a Straight Line
G02                 Clockwise Arc
G03                 Counter Clockwise Arc

G04                 Time Dwell
G28                 Return Axis to Home

G41                 Cutter Compensation Left
G42                 Cutter Compensation Right
G40                 Cancel Cutter Compensation

G43                 Apply Tool Length Offset
G54 to G59     Work Offsets

G81                 Drilling Cycle
G73                 Peck Drilling
G83                 Deep Hole Drilling Cycle
G84                 Tapping Cycle
G80                 Cancel All Canned Cycles

G90                 Absolute Programming
G91                 Incremental Programming

Download CNC Milling G Code List PDF


CNC Programming Basics Letter O Number Zero

CNC Programming Basics Letter O Number Zero

CNC Programming Basics, in my very early days of CNC I got to do quite a lot of work for Hitachi Seiki the Japanese machine tool maker that unfortunately no longer exist.

CNC Programming Basics

Many of their machines are still around and running. I was fortunate enough to be trained by a Japanese engineer who focused on the CNC programming basics.

The control was called Seicos which I think was based on the Fanuc control which Hitachi made themselves.


Anyway they had an equivalent of the Fanuc FAPT which was an automatic programming system.

It was the dogs bollocks of the day.

CNC Programming Basics

You could do maths on the fly with this control which I recon is a great idea.

Maths On The Fly

 

 

You could input say 8/25.4 then when you pressed enter, it would calculate the answer and input it for you. Lots of software like Fusion 360 do this today.

A couple of times I read a radius from a drawing say 15 for example and I would input 30 for the diameter. Every time he would stop me and say “no no wrong” (sorry I can’t do a Japanese accent).

He would insist that I input 15 x 2 and then press enter.

I didn’t think too much about it at the time. Over the years the penny has dropped as to the significance of this lesson.

CNC Training

When I am training people now I always say that you must input exactly what you see.

Roy Walker has a Catchphrase “Say What You See”  I just love this show. I suggest you watch it now because this article gets more and more boring as it goes on.

Anyway

So if you input exactly what you see you will make less errors.

“Say What You See”

“Say What You See”

For example if I had worked it out that 15 x 2=29 or I made a typing error then I would have been in trouble.

So at what point do you decide that you will use a calculator?

What he was teaching me was, wherever possible make the machine do the work.

CNC Programming Basics


Taking this to its logical conclusion the way you programme from a drawing is really important and it is all part of CNC Programming Basics.

  • Make the datum wherever possible the same as the drawing.
  • If the drawing has several datum’s you could also have several datum’s.
  • If holes are dimensioned 15.865 apart and you have 4 holes don’t add it up programme it as incremental.
  • If you have polar programming (G16) on your machine and the drawing is dimensioned that way, with angles and rads, then use polar.
  • Here is a post on how to use G16

It’s Right there in Front of You

What this means is that when you look at the programme and you look at the drawing it is really easy to understand what you are doing. Remember what I have said in many posts before.

If you are the programmer the setter is your customer.

If you are the setter then the operator is your customer.

When someone else picks up your work they should easily be able to see what you are up to.

Unless your one of those assholes that really doesn’t want them to understand.

  • Read the drawing and you can see the same figures as the programme.
  • Check out the datum and it’s the same as the drawing.

We always emphasise this when we are training programmers.


The Point

Let me now get to the real point of this article this Japanese guy would never allow me to say G O as in letter O. He would insist on me saying G zero. If you think about the translation here, the only reason that we get the two mixed up is because they look the same. I would imagine to him it seemed totally wrong.

The thing is it is totally wrong.

CNC Programming Basics


CNC Programming Basics

If you place a letter O accidentally in your code instead of a number zero when you read it into your machine it will start a new programme as soon as it sees the letter O.

So you will end up where you and your poor machine are both very confused.

The letter O has only one use in a CNC programme it precedes the programme number to begin a programme (see below). The comments in brackets are totally ignored by the control and therefore you can put what you like while you are protected by the brackets.

By the way if you want to use foul language or childish rude comments them please make sure they are parenthesised. I often do this myself.

O0001 (G81 DEMO)
G21 G90 G40
T01 M06 (20.0 MM DIA X 90 POINT SPOT DRILL)
G90 G0 G54 X12.64 Y88.0 S2546
G43 H01 Z15.0 M8
G0 Z100.

Where Else Can you Use The Letter O?

Sorry I lied to you. There are other uses for the letter O.

I only lied to protect you as a beginner.

What are they? Let me know

Please contact me if you require:

  • CNC programming training.
  • Want to learn CNC programming.
  • Fanuc control training.
  • Yasnac programming training.
  • Any type of CNC course.
  • Fanuc training courses
  • CNC lathe training
  • CNC Vertical Machining Centre training

Services offered at CNC Training Centre

Edgecam training.

Classroom programmer training.

Onsite CNC Machine Training.

CNC and 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.

 


Programme Restart Haas

Programme Restart Haas

Best feature by far on a Haas Machine is it’s programme restart. Guess what, loads of people don’t use it. In fact they don’t even have it switched on.

Restart Haas

First thing to do is switch it on on the setting screen.

If you are used to using a Fanuc control then you probably restart on a tool-change line.

Restart Haas

So you would search for N19 and start at that line.

Haas Restart, Total Confusion

What I find confuses people when they first try this on a Haas machine is that it picks up the previous tool. This is purely because it thinks the tool change is what you want to do. So it gets ready.

 

All you need to do is start on the next line.

Yep it’s that easy.

The control sorts out everything.

Coolant
Spindle
Position
You name it

It will even feed the dog, change your underwear and load the dishwasher.

Sorry I’m joking how could it feed the dog when you don’t have one.

Press cycle start and away you go. If  your Z axis is above the part it will come down slowly just in case something is in the way.

It really is that easy.

Oh n by the way it works just as well on a Haas CNC Lathe


Careers in CNC

View all current vacancies in CNC

Click here

Call David: 07834 858 407