Author Archives: David

Single Block CNC Beginners Guide

Category : Beginners

CNC beginners guide (using Single Block)

CNC beginners guide

This article CNC beginners guide, is about Single Block and how it is used.

When you write a CNC programme it will consist of blocks of programme.

What is meant by a block?

Well it’s everything until the control sees a semicolon ;

If your not sure what a semi colon is it’s when you have had an operation to remove half your large intestine.

The semicolon is called an end of block or EOB


CNC beginners guide

Try not to confuse this with a line of code.

Depending on how your screen is set out a block could be more than one line. The control reads everything until it sees the semicolon or EOB (End of block).

In most cases and on most controls it does not matter what order the code is in. The main reason to follow a set pattern for your code is to make it easy to read.

Try to always put things in the same order.

In one block of code you can have loads of stuff.

You could write:

G0 X50. Y50. S1500 M3;

But if you wanted you could put the S1500 M3 on a different line.

When doing this, think about why you might want to do it. For example you may want to get the tool ready to use before switching on the spindle or the coolant. This saves the excitement of the spindle whizzing round when proving the programme.

Oh yes and you could get fuckin soaked.

Most of this applies when you first test your programme. This is when we use single block.

The Switch

To run a programme in Single Block we have to throw a switch.

CNC beginners guide

This can be a normal Single Block switch or a button or a soft key. Read the article below to learn how to prove out your CNC programme in Single block.

 

Read this if you don’t know how to prove out a CNC programme.

Once single block is enable the machine will do exactly what it says on the tin.

It will run that block and wait for its next command like a good doggy.

The beauty of this is you only need to think about one block.

Now I don’t want to appear sexist at this point but I recon if my wife were a CNC Operator she wouldn’t need single block. Not only can she do two things at once, which I can’t, but my wife also has an uncanny knack of knowing what’s going to happen next too.

For those with no extrasensory powers just switch on the fuckin single block.

If you turn single block off the machine will still stop at the end of it’s current block and wait for another press of the CYCLE START button to carry on.

Also when you first turn single block on it will stop at the end of the block it is executing.

CNC beginners guide

Those of you who read my articles will know that I love these old Matsuura machines (they make me feel young again).

You know when you’re getting old when you keep asking complete strangers “how old do you think I am”

I did it in Barwell the other day. The woman in the Coop said “piss off you silly old bastard”

What No Telly Screen

Anyway these machines have a one line display so you have to step through to read each line. You can only see little bits of code.

I once input a whole programme into one of these controls not realising I had no end of blocks .

(From now on I ‘m not saying fuck in my articles, I will refer to it as the F word like these posh people on the telly)

On this occasion I said the F word after taking about an hour trying to realise why the programme wouldn’t work.

The whole program was in one block!!!

 

Don’t mix your G Codes

(here is a nice way to make a John Collins if your bored with this CNC Shit)

You can even make this with non alcoholic Gin. Yes it’s true (non alcoholic gin) my wife bought a bottle the other day. Now I happily went along with this scenario till I found out it was fourteen quid a fuckin bottle.

Absolutely no way, no hang over, no phone call from your mate saying you shit in his cat tray. No no none of that, honestly I give up.

Let’s continue with this CNC beginners guide to CNC programming.

In one block of CNC code you can only have G codes that belong to the same group. I’ll tell you about this in another article when I can be bothered to do it. Anyway it’s easy, they can’t argue with one another. You can’t put G1 and G0 on the same line for example because they are in the same group.

You can’t say feed and rapid in the same line. That would be stupid.

Obviously you can’t repeat things like having two speeds in the same block.

G0 S1200 X50. Y50. S2000;

I don’t think anyone who reads my articles is that stupid….. Except for that bloke in Bolton, but I think he took up plumbing in the end.

Heidenhain

If you have a Heidenhain control the single block works the same. You select Full Run or Single Block

CNC beginners guide

You don’t hear me criticise Heidenhain very often cos I love em. Brace yourselves cos I’m about to.

Those bloody icons.

They all look the same. Every time I come back to working on Heidenhain I can never remember which is which.

I sometimes suggest making little sticky labels to go underneath to identify them.

 

This one will do wonders for your relationship with the guy on nights.

Before You Go A Few Question about Single Block

  1. What about a tool change?
  2. What about a canned cycle?
  3. What is the meaning of life?

Ok the last one is easy. Question 3 ….. the meaning of life is 42 

Right, Now the Difficult Ones.

Your tool change M06 is probably aliased to a macro. This means that a programme is running in the background that you can’t see. Single block may well be inhibited. This means one press of the CYCLE START button will do the tool change. Sometimes however single block works. In this case it will take loads of presses to get through the tool change. Just be patient.

This is the sort of thing that’s running in the background.

CNC beginners guide

I won’t go too much into this, after all it is a CNC beginners guide.

Canned cycles depend on parameter settings. It will normally be one press to rapid to the tool down. Then one press to drill the hole. It may or may not need another press to bring the drill out of the hole.

The exception is G84 Tapping Cycle. You definitely wouldn’t want single block to work on this. Imagine the tap gets to the bottom of the hole and sits there waiting for a push of the button.

Sometimes feedhold is inhibited too in a canned cycle.

Hope you enjoyed this CNC beginners guide

Services offered at CNC Training Centre

Edgecam 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.


 

 

 

 


G76 Threading Start Point (Where Do you Start?)

Tags :

Category : Fanuc Turn New Stuff

G76 threading start point, when you use a G76 threading cycle on a CNC Lathe the position that you start the tool at is really important.

This is the position you rapid the tool to just before you call the G76 threading cycle.

For example how does the control know if you are producing an internal thread or an external thread.

Actually I learnt this the hard way. It was on an old machine.

G76 threading start point

Maybe not that old. Anyway I couldn’t get it to perform a G76 threading cycle. It was cutting an external thread but the tool was working it’s way outwards.

What to do Next?

Everything rushed through my head, senile dementia, flashbacks from a misspent youth, did I feed the dog?

Anyway I suddenly realised I didn’t have a dog and that the start position of the tool was wrong.

G76 threading start point how was it wrong?

Well that’s how the machine knows whether you want an internal or external thread. Your start point needs to be inside or outside the thread. What a fuckin dipstick I was.

I had the tool just below the external diameter of the thread. If you do this the machine thinks the thread is internal and therefore cuts outwards.

Correct

G76 threading start point

So providing the tool is initially placed outside of the maximum diameter it will do exactly what you want.

IncorrectG76 threading start point

Put it here and you are in deep shit. The tool will work from this position backwards and you will be totally confused.

Don’t say I didn’t warn you.

Here is a example of a 20mm external thread.

G0 X21. Z3.
G97 S1200 M3

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

This thread has a core diameter of 16.96 (X16.93) the thread depth is 1.535 (P1535).

Soooo…… 16.93 + (1.535 x 2) = 20

G76 threading start point

Therefore you must first position the tool outside that 20mm diameter.

If you don’t do this then your tool will try and cut away from the 20 mm diameter.

Wrong as Below

G0 X19.95 Z3.
G76 P010060 Q20 R.02
G76 X16.93 Z-25. P1535 Q485 F2.5

So be careful because you might not notice that tiny amount.

Of course if you have a Siemens control Sinumerik 828 840D then this does not apply because you have to specify if the thread is internal or external in the cycle.

Front Clearance (G76 threading start point)

Now let’s think about how far in front of the part you need to be with the threading tool.

Maybe you never thought about it?

Well now’s the time.

Spare a thought for people like me who lie awake at night ruminating about these things. If you don’t know what ruminating means then maybe you shouldn’t be reading this article. Or maybe you just like the pictures.

This is my puppy his name is Donald he is learning to programme a G71 woofing cycle.

Lets take another look at the code.

G0 X21. Z3.
G97 S1200 M3

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

The spindle starts at 1200 rpm and the feedrate (which in the case of a thread is the pitch) is 2.5 mm per rev.

2.5 x 1200 = 3000

So the machine will be feeding at 3000 mm per minute along the thread.

So at the start of the thread you have 3 mm of clearance (Z3.)

Therefore in that 3 mm the machine has to accelerate up to 3000 mm per minute.

If it does not accelerate quick enough you will get a pitch error, your thread will be wrong.

Strange Behaviour

Ever had a thread where you can’t get the gauge on then suddenly it goes on only to find the thread is really loose further down?

Maybe you had a pitch error.

Taking it further if I double the speed

G0 X21. Z3.
G97 S2400 M3

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

2.5 x 2400 = 6000

Now I need to feed at 6000 mm per minute so this pitch problem will be twice as bad.

Can you see where this is going?

Eat more fish.

No not really, well it is good for you but it’s not what I meant.

The faster you go and the courser your thread pitch the quicker the machine will have to feed.

If you have a coarse pitch thread in aluminium you probably will end up with a super high feed-rate your machine can’t even achieve.

This will all depend on the age of your machine but you must always make this calculation just in case you are trying to cut a thread at the speed of light.

G76 threading start point in Z Axis

This start point distance is really important because it will allow the machine to get up to speed.

I can’t give you exact figures for this, not because I can’t be arsed but because it will vary depending on your machine.

The machine will have a maximum feedrate and it will be in the manual.

You know that old book that you use to prop  the door open.

The bigger you make this Z figure the more time your machine will have to get up to speed.

So don’t forget if you are starting at Z1. then the poor old machine doesn’t have much time to get up to speed.

 

G76 threading start point

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.

Siemens 828 840 Sinumerik Training

Or call us

If you want to learn to programme CNC Milling Machines

Look no further Contact CNC Training Centre

 

 

 


Well Set Out G Code CNC (CNC Programming)

Well Set Out Code

Contact David 07834 858 407

Well Set Out CNC Code

Well Set Out CNC Code is really important. It can save lots of time spent trawling through code trying to find the section you’re looking for. Simple things like leaving gaps after the tool change line can really help.

The program runs exactly the same but……

Look at the two examples of the same program

Well Set-Out

g code cnc
Uncluttered CNC Code

Not Well Set-Out

g code cnc
Cluttered CNC Code
  • Notice where the gaps are.
  • They give clarity to what’s happening in your program.
  • Try to create your own convention and always lay your program out in the same way.
  • Notice how your eyes are drawn to the tool change lines. These are usually the first things you are looking for.

Read On

It’s like reading a book without paragraphs, and page numbers. It also makes it easy to spot mistakes with well set out CNC code.

Dog reading a book

This is my dog, his name s “Get Back Here You Bastard”

See if you can find the simple error in the well set out code and let me know what it is. That way I will know you’re concentrating.

Clue: if you are the fortunate owner of a Haas machine it will spot this for you and alarm out.

 


Meaningful Comments

Insert meaningful comments. Remember you might not see this code for two years and you won’t remember what you did or how you were thinking at the time.

When you eventually come back to this code you’ll be scratching your arse for hours trying to figure it out.

You’ll think:

“Why the fuck did I do that”

A little comment will explain everything

 

Well Set Out CNC Code
An Elephant and my wife never forget

Come on Get a Grip

Yes you will figure it out eventually but that’s the same with the human genome project.

Well Set Out CNC Code
It takes time to remember what you were doing

Why do I need Well Set Out CNC Code (Things To Do)

  1. Leave gaps at strategic points in the program.
  2. Loads and loads of comments, write them as you would say it, (don’t try to be posh).
  3. Always make the order of the code the same.
  4. Write an SOP (Standard Operating Procedure) for how you want your code laid out.
  5. Make the tool change lines stand out these are the key points.
  6. Use N numbers at strategic points so that you can easily find things.
  7. Don’t use too many N numbers or you will get confused they are like E numbers they can drive you crazy. They also take up loads of memory.
  8. The machine setter and operator are your customers and you need to make their lives as easy as possible. Give em code that’s easy to read.
  9. If your writing X50. Y50. Z50. don’t write Z50. Y50. X50. Yes it will run OK trouble is it’s bloody confusing.
  10. Someone suggested adding M01 after each tool so I’m adding this in. (Thanks Michael)

An M1 or M01 is an optional stop which means you have the choice to stop at each tool. (Very useful if you want to stop at the next tool and you can’t stand around.)

Continuity

When you arrange the program in the same way every time it will be easy to spot mistakes. If you always put your spindle start and speed at the end of the first position line like this.

G90 G0 G54 X50. Y50. S1500 M03

Were you to miss out the speed you would have a very good chance of noticing it because the line will look wrong.

G90 G0 G54 X50. Y50. M03

Tidy neat code is the same as a neat tidy workshop. It’s much easier to find things.

Thanks for reading my post.

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.

Siemens Sinumerik Training

Classroom programmer training.

Onsite CNC Machine Training.

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.


Rads and Chamfers Fanuc Parameters 8134 3453

Category : Fanuc Parameters

Messing With Parameters Can Be Fatal!!!!!

To change parameters you need to go to the setting screen in MDI. Now put a 1 in the parameter write box.

Rads and Chamfers Fanuc Parameters. Today we are going to change the parameters that make ,R and ,C work this means you can program point to point and just stuff in some rads and chamfers as an afterthought.

Here’s an article on it if you want to use it

Fanuc have two ways of putting on chamfers and rads and that’s where the confusion lies.

Just do as you’re told (oh and read this article)

So in Parameter 3453 you can set bit #0 (CRD) to a 1 this allows what Fanuc call “Direct Drawing Inputs” to work.

Rads and Chamfers Fanuc Parameters

Also in Parameter 8134 set bit #2 (CCR) to a o

Rads and Chamfers Fanuc Parameters

Now don’t let the description put you off this turns on the crappy one that uses R and R- and K and K-. This only works on 90 degree corners and unless you won Mastermind I wouldn’t even try to understand how it works.

 

Trust me it’s shit

Anyway Rads and Chamfers Fanuc Parameters 8134 3453 all sorted!

Isn’t it just great to sort out those annoying problems?

If you want to learn about rads and chamfers on a Sinumeric Siemens 840D read this

Other Parameters Of Interest

3203 Clear MDI Screen

3202 Unlock Program 9000 to 9999 and 8000 to 8999 to Edit

3401 Calculator Type Decimal Point or Integer

6005 Allows the Use of Local Subroutines (Newer Control)

6050-6059  Allows you to Call a 9000 series Program with a G Code

6080-6089 Allows you to Call a 9000 series Program with An M Code

That’s it away you go.

Oh just one other thing before you go off and cripple your machine forever.

Do yourself a favour take a picture of the screen before you change a parameter.

If you aint got a camera then you must have a piece of paper.

Even better back everything up.

Thanks

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


G01 G00 Basic CNC Programming ( G01 not GO1 )

G01 not GO1 Back to Basic CNC Programming

The letter O is only used for a programme number and a GOTO statement on a Fanuc Control. It’s important not to get it mixed up with the number Zero. So we should really say G zero one ( G01 not GO1 ).

So remember it’s G01 not GO1 (Zero not letter O)

G01 not GO1

A good solution is to miss it out where possible G1 not G01 etc.

This is part of a series of articles designed to cover basic CNC Programming.

When I first learned to programme, before the First World War, I still remember how daunting the thick yellow Fanuc Manuals were. The Japanese were learning to speak English and we were learning to speak G Code.

Fanuc Manuals

Fanuc manuals are just like the yellow pages. A note here for you young people who might not know what yellow pages are (no it’s not like someone pissed on the photocopier)

Long before Google we had these thick yellow books and we used them to find stuff like if your mam needed to get the outside toilet unblocked or something.

None of this stuff was in the Fanuc manuals but you could easily get them mixed up cos they looked very similar.

I can honestly say when I was learning Basic CNC Programming I read the old 6M Fanuc manual from cover to cover. The Macro bit was just like another planet to me. Some things I had to read over and over again to understand.

Some of it was so badly written you kind of had to guess what they meant.

In the Beginning

Every now and then I used to go right back to the beginning and read the basic stuff again. Believe me, every time I would find something I didn’t know, mind you I didn’t know much then anyway.

Try it later and if it doesn’t work I’ll give you your money back.

Okay enough of this bullshit and verbage let’s talk about G codes.

Geometric Code, that’s what the G stands for.

Useless information but anyway, now I’ve said it. Don’t tell your mates down the pub because you will probably bore them shitless.

I often begin my training courses by saying “you only need to know four G codes to programme a CNC, it really is that easy”

G0 G1 G2 G3

(Please smart arses don’t contact me.)

What that means is that you can get round any shape with straight lines G1 and circles G2 and G3. Oh and you need to quickly get to the part so use G0 rapid.

Yes and another note. You don’t need leading zeros.

G00 can be G0 (Never GO as in letter O)
G01 can be G1 (Never GO1 as in letter O)
G02 can be G2 (Never GO1 as in Letter O)
G03 can be G3 (Never GO1 as in letter O)

Read this if you want to know more.

Lets Get On with It

G00 or G0 commands a rapid move. That means the axis will be flat out. Maximum foot to the floor, shit off a stick as we say in the Midlands.

A common mistake with rapid moves is to assume that the axis will all move in a straight line like a bullet from a gun.

Not true. Because each axis is flat out one axis may arrive before the other. The rapid on your X axis could be slower than your Z. Anyway you get what I mean.

Why do I need to know this?

Easy because if something is in the way then you might hit it. That is if you assume the movement is a straight line.

Now lets see.

Move down in Z

G0 Z5.

G01 not GO1

Then a nice straight line G0 X130. Z-30.

G01 not GO1

But meanwhile in the real world

G01 not GO1

It’s obvious really.

Just think for a moment:

If both X and Z rapid motors ran at the same speed. Then each axis will move the same amount until one reaches its destination.

Looks like this.

G01 not GO1

Z has 30mm to move in total so they will both move 30mm. This will make a 45 degree line.

Ah but X is not finished yet. X will carry on and finish its move in a straight line.

G01 not GO1

If something is in the path of your rapid move you may need to programme your axis separately to be sure not to hit anything.

G00 X130. Z-30.

Could be:

G00 X130. ;
Z-30.;

G01 not GO1

Please don’t repeat the G00 (you know it will piss me off).

Now G01 ( G01 not GO1  )

G01 is a linear feed. It means feed in a straight line. Just like stretching a piece of string between two points. It can be just one axis or two simultaneous axis. You can even programme X Y and Z all in one line of code.

So this is what really separates a CNC from a manual machine. Remember how hard it was to machine an angle on a manual milling machine? Or a taper on a lathe.

You do?

Well on a CNC Machine we just programme the end point. It will then machine a straight line from it’s current position to the programmed point

If your machine was at X50. Y0 and you programmed a line

G01 X55. Y-200. ;

You would get an angle.

Ok what’s wrong in this picture?

Just to see if you are not a robot?

Yes congratulations but what is wrong with the line.

G01 X55. Y-200. ;

The Feed-rate

Yes with G01 you need a feed-rate. Don’t repeat the feed-rate, you only need another feed-rate when you want to change it.

G01 X55. Y-200. F100. ;

Don’t forget you can programme X Y and Z together and it will still be a straight line just like you tied a piece of string between the start and end point.

F100. means feed at 100mm per minute.

CNC Turning

On a manual lathe you would have to set up a compound slide to just machine an angle.

Basic CNC Programming

Mmm very skillful and I’m sure it’s loads of fun.

On a CNC Lathe this is just one line of code and some Basic CNC Programming!!

What About 3 Axis Rapid?

Yes you can programme 3 axis together in rapid move. It’s definitely the quickest way to get to the part.

G0 X50. Y20. Z3.

I would definitely advise using it but, and there always is one, just be real careful nothing is in the way. Don’t blame me I’ll just say I never  met you.

Oh just one more thing as Columbo would say.

You could use a very high feed instead of a rapid move. That way you really would guarantee a straight line. I’ve never done this but it just came to me in a flash.

So there you have it G0 is rapid ( never GO letter O).

G1 is linear feed, remember G01 not GO1 (Not letter O)

Thank you for reading my article ( Basic CNC Programming G01 not GO1 )

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

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


 

 

 


WP to LinkedIn Auto Publish Powered By : XYZScripts.com