Category Archives: Beginners

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.

 


Setting the Workshift (Fanuc CNC Lathe)

Category : Beginners Fanuc Turn

Setting the Workshift

workshift

This article is about the Workshift on a CNC Lathe with a Fanuc control.

As a beginner one of the first things you will need to learn is how to set the workshift.

The workshift is an adjustable figure that tells the control where the work zero is.

It defines the relationship between the turret and the workpiece.

Workshift

So we have a programme for our part on a our CNC Lathe. Let’s assume this programme is perfect with no errors.

But at the moment it’s just a part floating around in space.

Workshift

You have measured the tools using cut and measure or a tool presetting arm. You also need to tell the machine the radius of the cutting tool tip and its virtual nose position.

Workshift
Tool tip radius and virtual nose

So now all the machine needs to know is where the workpiece stock is. That’s where the workshift comes in.

WorkshiftTool Presetting Arm

The setting of the workshift will vary from one machine to the next but just think about this logically.

1 You have a program.

2 Your machine knows where your tools are in the X and the Z axis.

So now your machine needs to know where the workpiece is in order to complete the jigsaw puzzle.

To do this we need to set the workshift.

With regards to the X axis this never changes because the centreline of the machine is always the same.

Just Worry About Z

Sooooo this is just about Z.

The way we do this is to effectively tell the machine where the tools are in relation to the workpiece.

First you need to call out a tool and its offset.

T0101 (Call tool one and offset one)

You could do this in MDI

Workshift
Fanuc MDI Screen calling tool one and offset one

Bring the tool to the front face of the component. If you want to machine metal from the front face then you would position the tool slightly behind the front face.

You could even start the spindle and machine the front face. That way you will know you took off the right amount of metal.

Workshift
Machine the front face when setting workshift

(You can use any tool for this provided it has been measured and you call its offset)

Cursor to the Z underneath (MEASUREMENT) on your workshift screen.

Workshift

Type in 0 then press INPUT

 

The Z SHIFT VALUE will change.

If you want to you can input zero into shift value on the left to reset it before you start.

I like to do this when I am setting the workshift because you can clearly see the new figure when it goes in.

My screenshots are from newer Fanuc controls. Even if yours is an old banger it will be much the same.

New CNC Machines

Be very careful not to set anything in the X figures because it will completely mess up your X axis position. This could leave you in deep shit.

It is always good to note the X figure even if it is set to zero.

Workshift

This X figure can be used to set the centre-line for your drills and centre cutting tools so it may not be zero.

Mine is set to X270. which is the centreline of my machine. So if I am using a drill or any tool that works on centreline then I only need put zero in the X offset.

Be careful before changing this if you have a tool measurement arm as it will alter all your X figures. You will need to re measure all of your tools.

In the table above tool 9 is a drill and because my workshift is set to the centreline (X270.) I would input zero in the X offset geometry.

Otherwise you would have a standard figure that you put into X for all your centreline tools.

On my machine it would be 270. but it usually ends up at something close like X270.106 which is hard to remember.

I often see this figure written on the side of the machine in felt tip pen for operators to remember.

If you do have a figure in the X it is really important not to change it. I would recommend using G10 in all your programmes. That way you can always be sure this figure is correct.

(G10 is a way of entering your offsets and workshift from the CNC Program)

In the program above it is the G10 P0 X270. line. The P0 tells the control to write to the workshift.

This way even if you fuck up the X position the control will just ignore you and keep writing the correct figure in at the beginning of the program.

Please note I am not putting anything in the Z for the G10 as I don’t want this updating. You can do this if you want, but you need to remember that you can now only alter the Z from the G10.

Testing The Workshift

Once your workshift is set you are ready to prove out your part.

You can test the workshift in MDI if you wish.

T0101;
G0 Z0;

Make sure to override the rapid moves (not 100%) and look at

DISTANCE TO GO

If when you run your program the front face of your part does not clean up or you feel you are taking too much off then the workshift will need to be altered.

Note

Changing the workshift moves all the tools together. I does not change the relationship between the tools.

How to Alter The Workshift

Workshift

Always use + INPUT as this will add the value to the present value.

If you use input it will replace the figure and now your in trouble.

How to Adjust workshift

Be Careful Not to Alter X

Thanks for watching and reading

If you have been affected by any of the issues in this post or need CNC Counselling then contact me.

Or call us

If you want to learn to program CNC Milling Machines

Look no further Contact CNC Training Centre

Siemens Sinumerik Training

 


Surface Finish CNC Turning

Category : Beginners

CNC Turning Surface Finish

Ever wondered what feed rate is best to give you a particular CNC Turning surface finish? Or do you just guess?

Well look no further. From now on you’ll be able to work out what feed-rate will give you the surface finish you require when CNC Turning.

Oh and there’s a formula where you can work out what surface finish you’re going to achieve without a fortune teller.

 

 

We are going to use um Ra.

The um stands for microns.

The Ra stands for roughness average.

Here is a full explanation if you really want to know. 

CNC Turning

 

You can buy a flat block like the one above which you can use as a comparison to see what surface finish you’re getting.

The section above is for CNC Turning surface finishes.

So you can already see that 12.5 is like a plowed field and .4 is like a babies arse (as my father used to say) .

So if you’re fixing a fence post then 12.5 might be OK.

Surface Finish The Dreaded Formula

surface finish

First of all what feed rate would you need to obtain a certain CNC Turning surface finish.

CNC Turning

Now what if you’re already machining the part. That means you know the feed rate. What surface finish will you get?

CNC Turning

So………….

Our tip radius is .8mm

CNC Turning

We want to achieve a 3.2 um Ra  CNC Turning surface finish

CNC Turning

So here’s the formula.

CNC Turning

Let’s do this bit first.

https://www.youtube.com/watch?v=vWQgBtlUUMM&ab_channel=MotoMadness

8 x .8 x 3.2 = 20.48

Now let’s divide it by 1000

https://www.youtube.com/watch?v=vWQgBtlUUMM&ab_channel=MotoMadness

20.48 / 1000 = .02048

Now lets square root the answer.

https://www.youtube.com/watch?v=vWQgBtlUUMM&ab_channel=MotoMadness

Square root of .02048 = .143

So the feed-rate you need is F.143

CNC Turning

OK… You Came Back. You Ready to Carry On?

Anyway let’s see how you do it backwards.

surface finish

So imagine you had been turning these imaginary bits with a .8mm radius insert at a feed-rate of .143 (F.143)

First of all square the feed rate .143 x .143 = .020449

CNC Turning

Now do the bottom bit 8 x .8 = 6.4

surface finish

Now divide the top by the bottom.

surface finish

.020449 / 6.4 = 0.00319515625

Then simply multiply this by 1000

0.00319515625 x 1000 =3.19515625 (3.2)

That’s 3.2 to you

surface finish
A surface finish comparator

It worked backwards!!! Phew what a relief.

Surface Finish, Now Let’s Think About This

So to get a 3.2 finish with a .8 tip radius you would need a feed rate of .14

Now let’s do the same calculation with a .4 radius tip.

surface finish
Calculate surface finish

So did you work it out?

Here’s one I prepared earlier.

The answer is .101

And if you can be bothered to work it out with a 1.2 radius tip.

The answer is .175

.4    =  .101
.8    =  .143
1.2  =  .175

Interesting

So as the tip radius gets bigger you get to increase the feed rate!

Thanks for watching and reading

If you have been affected by any of the issues in this post or need CNC Counselling then contact me.

Oh yea we do CNC Training too not to mention Classroom Training.

Or call us

If you want to learn to program CNC Milling Machines

Look no further Contact CNC Training Centre

 


G83 Peck Drilling Program

Category : Beginners Fanuc

G83 Peck Drilling Program Example

G83 Peck Drilling Program, G83 is a deep hole peck drilling canned cycle.

Cycle G83 drills holes breaks up the chips as it goes. It fully retracts from the hole after each peck.

This simple part has four M12 holes drilled countersunk and tapped. The datum is the centre of the part so the holes positions are.

X55. Y55.
X-55. Y55.
X-55. Y-55.
X55. Y-55.

G83 Peck Drilling Program

G83 Peck Drilling Program

Here is the CNC code

G83 Peck Drilling Program

The machine first moves to X-55. Y-55. and rapids the Z axis to 3mm above the part.

G83 Peck Drilling Program

It then rapids the Z axis down to 1mm above the part R1.

The G83 Cycle instructs it to drill a hole 17.5mm deep (Z-17.5) at a feed of 200mm per minute (F200.) 

The Q2. tells the machine to drill the hole in 2mm steps. After each step it retracts to the surface of the part.

This allows all the chips or powder to come out of the hole after each cut. It also allows the drill to cool.

As it drills the depth increases by 2mm each time.

When the hole is done it rapids back to the initial point (Z3.) This was in the line

G83 Peck Drilling Program

This is because of the G98.

If it were G99 it would return to 1mm above the job (R1.)

See explanation of G98 and G99

Once the cycle is active each time it sees a position it repeats the drilling process.

When the G80 is programmed it no longer drills holes.

Now watch the video to see it all in action.

G83 Drilling Program Example

More G83 stuff from Haas

Thanks

If you have been affected by any of the issues in this post or need CNC Counselling then contact me.

If you want to learn to program CNC Milling Machines

Look no further Contact CNC Training Centre

 

 

 


Letter O Head of Programme

Letter O Head of Programme

There is a quick way of doing most things on computers and CNC Machines

It’s just being bothered to first find out what they are but most importantly force yourself to keep using them until it becomes habit.

To get to the head of your Fanuc Programme type in letter O and press your upper cursor.

Letter O Head of Programme

It beats the shit out of pressing reset which can stop everything if you press it by accident.

Classroom Training

Mazak Training


Careers in CNC

View all current vacancies in CNC

Click here

Call David: 07834 858 407