Category Archives: Haas Mill

Absolute or Incremental G91 G90

Absolute or Incremental that is the question?

Absolute or Incremental no it’s not a Shakespearean Quote from Hamlet.

Two distinct ways of programming.

Understanding Absolute and Incremental Positioning in G-Code

When diving into the world of G-code, mastering the difference between absolute and incremental positioning can be a game-changer. This knowledge not only enhances your programming skills but also provides strategic flexibility in crafting your creations. By utilising G90 (absolute) and G91 (incremental) commands, you gain control over your machine’s movements, allowing for precision and adaptability in your projects.

We all know Absolute (G90)

You are working from an absolute datum. This means that every position or movement is a measurement from the datum.

It is just like on a drawing where every measurement is from the same datum point.

Absolute or Incremental

So no matter what position you move to the movement distance is from the datum. This is called Absolute and you use G90. G90 is modal so the G code stays in until you tell the control otherwise.

Absolute or Incremental

But do you understand Incremental (G91)???

Incremental is a bit harder to get your head around.

Absolute or Incremental

So this time it’s like every position is measured from where you are. So if the movement is X10. then the machine moves 10mm from where you are in a plus direction.

Here is the same part as above but drawn in a different way.

Absolute or Incremental

So each position is measured from the last one. Well that’s how incremental positions work. You just move the incremental distance regardless of where you are.

Absolute or Incremental Why?

Come on you tell me…….

You’ll have to work it out or read right to the end of this article. Oh by the way it’s incredibly boring.

Absolute or Incremental There is More

Absolute is like saying “Go to my house”. My house is in just one place and I only have one. So that is an absolute position.

Now if you were at my house and I said “Go to my house”. Apart from thinking I am a bit daft you wouldn’t move. You’d say “David, I am already at your house, are you OK?”

Well that’s like being in G90 Absolute.

G90 G0 X50. Y50.
X50. Y50.

When the machine gets to the second line, in the above code, it wouldn’t move. It would quite happily accept this line of code. I’m sure somewhere deep in it’s CNC brain it would think you were a bit daft. But they are very polite these CNC guys.

If you were in a canned cycle it would drill another hole in the same place because that is what a canned cycle does. (They repeat each time a position is given)

Ok Now are you ready? The Incremental Bit

So if I said to you “drive 5 miles north”.

Well it rather depends on where you are. You may well arrive at my house (and I would make you a cup of tea). Now if I repeated the command “drive 5 miles north” you wouldn’t stay for another cup of tea. You have another journey to make.

Well that’s like being in G91 Incremental.

G91 G0 X50. Y50.
X50. Y50.

After the second move in the above code you would be at X100. Y100. Each axis moves another 50mm.

The Wait Is Over Read On

Absolute or Incremental, why?

First of all let’s look at the two drawings again.

Absolute or IncrementalAbsolute or Incremental

Why not just read the figures off the drawing? Dead easy. First drawing would suit absolute. Second drawing would suit incremental. Or for some parts it would be a combination of Absolute or Incremental.

If you try to add up the figures on drawing number two you will more than likely make a mistake.

Reading The Program

When you read a CNC program you want the figures you see to be the same as the drawing. That way it’s easy to check and you won’t make so many mistakes.

Don’t forget it might be years later when you next read this program.

So Absolute or Incremental? Well it rather depends.

Here is another example where incremental programming would work well.

Absolute or Incremental

The pockets are all the same so you could program one pocket incrementally. Stick it all in a sub program and then just move to an absolute position and call it out.

It would be a bit like having a robot that could dig ten inch diameter holes two foot deep. You just send it anywhere in your garden, it will dig you a hole and you can plant a tree.

I can almost hear the comments on this article. “Oh I’d just use a different datum for each pocket”.

“Incremental no way bloody dangerous”

OK smart arse.

At the CNC Training Centre we like you to learn as much as possible about CNC Programming. Understand all the G codes all the M codes every principle. You end up with a toolbox full of CNC Programming Tools.

Absolute or Incremental Which Tool?

 

Absolute-or-Incremental Let’s Talk About Safety

When you use G91 Incremental as soon as possible add a G90 to bring the machine back to G90 Absolute.

So for example if you had a sub-program you could try and remember to put G90 in your main program. That is something I would definitely forget to do.

So put it at the end of your sub program. That way every time you come out of your sub program you are back in G90 Absolute.

O500(Drilling Sub-Program)
G91(Incremental)
X50.
X60.
X80.
X10.
X5.
X5.
G90(Absolute)
M99

It’s all about tidying up.

If you leave things lying around anything can happen.

You definitely can have a collision using G91 (Incremental) if you are not careful.

Don’t Be Put Off There’s More

Incremental has some brilliant uses. When drilling holes the same distance apart it can save you a lot of programming time. Oh and it really simplifies things.

When using a canned cycle like G81 you can make repeat moves.

G81 G98 Z-5. R1. F100.
X52.554 L20
G80

This will drill 20 holes 52.554mm apart. Think about adding all these figures up, very prone to mistakes.

But do be careful, if you get a figure wrong you can get a cumulative error. “Cumulative error” Sorry I promised not to fuckin swear.

Come on you G91 deniers it does exist and it can work.

Advantages

  1. You can program exactly what is on the drawing.
  2. No need to add up figures.
  3. Repeat holes are dead easy.
  4. Features that repeat can be placed in a sub program and used at any absolute position.
  5. Less errors because you don’t need to add up the figures.
  6. When you later read your program the figures look like the ones on the drawing.
  7. Great for using sub-programs.
  8. It can help you lose weight as part of a calorie controlled diet.

Understanding these concepts is like adding a powerful weapon to your G-code arsenal, enhancing both precision and efficiency.

Whether you’re executing complex designs or simply looking to streamline your process, this foundational knowledge ensures your commands translate perfectly from paper to product.

Disadvantages

  1. If you make a mistake then the errors will add up.
  2. Can cause collisions if used incorrectly.
  3. People don’t like it and are frightened of it.

How does understanding absolute and incremental positioning affect flexibility in G-code programming?

By mastering the use of G90 and G91 commands, you gain the ability to switch between absolute and incremental positioning, thereby increasing your programming flexibility.

2. Why is understanding the difference between absolute and incremental positioning important?

Grasping these concepts is crucial because it equips you with a significant advantage in G-code programming, enhancing your ability to execute precise and efficient commands.

Absolute-or-Incremental Remember This

  • Change back to Absolute G90 straight after use.
  • Make sure the figures you input are accurate.
  • Standardise your code (Read This).
  • After each tool change make sure you have a G90.
  • When you are proving out look at position display to check how figures add up.

Thanks For Reading

Don’t forget there’s loads more folks.

And a YouTube channel

Learn CNC Programming

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.


 

 

 


Repeat Canned Cycle Using L and K

Category : Fanuc Mill Haas Mill

CNC Training Centre 29 Five Star Reviews and Still Counting

Please read all the reviews of CNC Training Centre

The Ones We Don’t Put on The Website

  • Such infantile humour you’ll never get the time back wasted in reading this utter shite.
  • The author is a prick.
  • This guy knows nothing about CNC Machining
  • Never been so insulted!
  • Written like a High School Student who just learnt to swear
  • If I wanted to laugh at 60’s sexual innuendo I’d watch a “Carry On Film”
  • Don’t read this garbage
  • My steak was over-cooked and the chips were cold
  • Crashed my machine six times as a result of reading this shit, I need to stop
  • He told me to tell the boss (“go shove your job up your arse”) I am now unemployed, so far had no compensation from CNC Training Centre (They don’t answer my calls)
  • In one article he states “Tell the boss, that’s the one with the Porsche 911, fat arse and little cock” my boss does not have a Porsche
  • Use “G Code Tutor” I know most of the articles are incorrect but at least he never swears

Please note, these reviews were all fake so we took them down

Repeat Canned Cycle

Repeat Canned Cycle, here is a simple G81 canned cycle.

O001 (Drilling Programme)

T1 M6 ((10mm Drill)

G90 G0 G54 X50. Y50. S1500 M3
G43 Z3. H1 M8

G81 G98 Z-15. R1. F200.
X60.
X70.
X80.
X90.
X100.
G80

G0 G53 Z0
G53 Y0
M30

Repeat Canned Cycle

Now here is the same programme in incremental.

O001 (Drilling Programme)

T1 M6 ((10mm Drill)

G90 G0 G54 X50. Y50. S1500 M3
G43 Z3. H1 M8

G81 G98 Z-15. R1. F200.
G91 X10.
X10.
X10.
X10.
X10.
G80 G90

G0 G53 Z0
G53 Y0
M30

Both programs do the same thing now lets shorten the last one.

Repeat Canned Cycle L5 or K5

O001 (Drilling Programme Repeat Canned Cycle)

T1 M6 ((10mm Drill)

G90 G0 G54 X50. Y50. S1500 M3
G43 Z3. H1 M8

G81 G98 Z-15. R1. F200.
G91 X10. L5
G80 G90

G0 G53 Z0
G53 Y0
M30

(This would be K5 on a Fanuc control)

Now you have to admit that’s easy.

For all you “incremental deniers” come on now, this saves a lot of code.

And……

if the distance between the holes was 10.236 imagine having to add them all up.  Lets face it you couldn’t even work out the total cost of six tins of beans at 86p a tin.

Everything is so fuckin expensive these days. Have you noticed the price of vintage champagne?

Anyway that’s another argument for another time.

Repeat with No Repeat !!!

This article is about iteration. Which is just bullshit for “how many time you do it”.

No I don’t mean how many time you do “it”, grow up.

Authors Note to Himself

Must ditch some of these readers, so childish and read sexual innuendo into everything I write.

Continue if You are 18 or Over

In other word the L5 or K5 means do it 5 times.

You can also use L0 or K0 which means do it zero times (don’t do it).

” Come on Dave don’t be a twat, why tell the machine not to do something”

Right, first of all don’t call me Dave I fuckin hate it, my names David. So shut up and carry on reading.

Reasons to Not Do Something

  • You broke the tap in a hole and you want to skip it.
  • You just want the machine to remember the canned cycle but you don’t want to do the cycle yet.
  • Getting round corners without collision. Read this.
  • You can’t be arsed to get off the chair to pick up the TV remote (when your lazy boyfriend put it on the floor)
  • You want to use a sub programme

See Below

O001 (Drilling Programme)

T1 M6 ((Spot Drill)

G90 G0 G54 X50. Y50. S1500 M3
G43 Z3. H1 M8

G81 G98 Z-5. R1. F200. L0 (Remember Cycle But Don’t Drill Yet)
M97 P500 (Go to drilling sub programme)
G80
G0 G53 Z0

T2 M6 ((10mm Drill)

G90 G0 G54 X50. Y50. S1500 M3
G43 Z3. H2 M8

G81 G98 Z-15. R1. F200. L0
M97 P500 (Go to drilling sub programme)
G80
G0 G53 Z0
G53 Y0
M30

N500 (Drilling Sub Programme)
X50. Y50.
X60.
X70.
X80.
X90.
X100.
M99

What this means is you set the canned cycle up so the control will know what you want to do. Because of the the L0 or K0 it does not actually drill a hole.

When it goes into the sub programme it’s business as usual and it drills all your holes.

All your positions are self contained in the sub programme.

Now it’s time for one of my famous, very boring stories.

Repeat Canned Cycle

Go here, this guys videos are way more interesting than this shit.

The Boring Story

Years ago when I worked at SP Engineering in Barwell. We used to make parts for knitting machines.

We made this part which was a massive plate covered in all different sized holes. Drilled tapped bored you name it. It was like that cheese that has all the holes in it. Well, not really but I paid for this picture and I want to use it.

We used to get a spot drill and just dotted the plate all over. We then put the part into inspection where they used a CMM (coordinate measuring machine) to measure all the positions of the dots.

 

 

The probe just drops neatly into the spot drilling dots.

Repeat Canned Cycle

Also because each set of holes was in a sub programme they could be reused once the positions were OK.

Oh and by the way contact CNC Training Centre for training on your CMM with PCDMIS

 

It is a useful method because once the sub programme is used you know all the positions are correct for any subsequent tools. It makes prove out much easier.

Putting any positions in the main programme would ruin the plot because you would have to check the first hole position for every tool.

Using L0 or K0 to Get Round Corners

This is a novel way to use L0 to get round the corner of a part. Not my idea I nicked it off the genius guys at Haas tip of the day.

My advise is don’t read this shit. Go to Haas Tip of the Day it’s way better. The guys are so polite and never swear.

Here Is a Nice Video In Case You Can’t Read

L0 for a Haas control K0 for a Fanuc control Repeat Canned Cycle.

Repeat Canned Cycle

 

 


CNC Sub Program

On or Offsite CNC Training
Tel: David 07834 858 407

CNC Sub Program, all CNC machines will have some form of sub programs.

 This article deals with G code (ISO) type programming but most of the features talked about will be available in some form on any CNC control. 

A CNC sub program is a branch from your main program into another program.

After completing this, your control will return to the main program and continue where it left off.

It’s like the branches of a tree.

Sub Program 

Probably the most common use of a CNC Sub Program would be for a tool change position. You could have a sub program which took the machine to a position for tool change. Your machine probably does this anyway but it’s hidden.

The advantage of this is that you could use it for any program and you don’t have to keep writing it. It is going to be very reliable because you know you never touched it. (Honest governor). 

You could use a sub-program for a set of hole positions, call it out once to spot drill and again to drill and again to tap. Just use it as many times as you want.Got to be good for the environment too.

CNC Sub Programme

 

Some controls have internal sub programs Haas and Yasnac as well as Heidenhain and Siemens have this facility.

You can do it on a certain Fanuc controls but it is an option.

It means you can stuff these at the end of your program and jump into them the same way as you would an external one. 

CNC Sub ProgrammeCNC Sub ProgrammeCNC Sub Programme

Why would I want to do that you say?

Easier to manage is the quick answer.

You know when you save your main program there are no pesky sub programs lurking that you forgot to save. They are all built into your main program.

Normally you would call your sub-program once only and you don’t need to tell it “oh I want this once” it says “come on mate I know that I’m not stupid.

But you can call it several times and if you get into incremental programming, and I hope you do, you will definitely find a need for this.

Sometimes with sub-programs it’s what you don’t put in that matters. What I mean is if your milling and you put the feed in the sub-program you are stuck with it. If it’s not there then you can state the feed externally and use a different one every time.

On Machines Like The BMC 800 from Toshiba

Tosnuc 888

This machine has the Tosnuc 888 control.

It uses G72 followed by the dollar sign, oh and for the repeat command it uses L but don’t forget the comma.

G72 $MYPROGRAM , L2

Yes Tosnuc uses anything for a program name up to eight characters. So that it doesn’t get confused by the L you have to put in a comma.

Tosnuc 888

By the way on this control (Tosnuc 888) you don’t use M99 at the end of your sub program you just use M30 and it works correctly.

Don’t try this on your Fanuc or Haas control as M30 means stop and rewind and that’s what it will do. Then it will just sit laughing at you.

Ok now you can watch the video.

CNC Milling sub programming examples.

 

If you liked this video, please don’t forget to subscribe to my YouTube channel by going to: CNC Training Centre

Please contact me if you require:

  • Fanuc training.
  • CNC programming training.
  • Want to learn CNC programming.
  • Fanuc programming training.
  • Yasnac programming training.
  • Any type of CNC course.

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.


Haas Control Zeros Not Required

Category : Haas Mill Haas Turn

Haas Control

On or Offsite CNC Training
Tel: David 07834 858 407

For Example In MDI on a Haas Control

When you type code into your Haas control there is no need to input the zeros. This applies in programme edit and in MDI.

For example in MDI

Try typing in: G90 G X Y Z
Then press ENTER
You will get: G90 G00 X0 Y0 Z0

 HOW EASY IS THAT!

Mmm…….

“Read More”

G0 Cancels Canned Cycles

G0 Cancels Canned Cycles, this is not a news flash it’s always been the case.

G0 Cancels Canned Cycles

O0001(G28 Example)
(PROGRAMMED BY ANDY MURRAY)
G21 G90 G40

T01 M06(20MM ENDMILL)

G90 G0 G54 X200. Y0 S1500 M3
G43 Z3. H1 M8
G81 G98 Z-5. R1. F100.
X100.
X50.
G0 X25. (No hole drilled here cycle would be cancelled)
G80 (This also cancels the cycle)

“Read More”

Careers in CNC

View all current vacancies in CNC

Click here

Call David: 07834 858 407