Category Archives: Haas Mill

Modal and non modal G codes

On or Offsite CNC Training
Tel: David 07834 858 407

Contact CNC Training Centre

Modal and non modal G codes

Modal and non modal G codes

Let Me explain

We all know that programming can be complicated. So let me explain to you how it all works. This article explains the real meaning of Modal and non modal G codes.

Modal means that once a command is issued it stays in the control.

How Can you Actually Use This?

If you issue a G0 or G00 command the machine is in rapid and you do not need to re-state it.

Rapid means all motors are flat out, like a teenager in a Ferrari.

Every move from then on will be a rapid move unless you tell it otherwise. The G code that changes it must be in the same group. For example G0 G1 G2 and G3 are all in the same group a bit like The Beatles used to be.

The other day I was talking to  a “young person” who hadn’t even heard of the Beatles. I mean fuckin hell, am I really really old or are they doomed to be forgotten?

“Read More”

G10 Using G10 on a Fanuc Type Control

G10

I am always amazed that so many companies still don’t use G10 in their CNC programs. If you know you know.

I must admit I fuckin hate a lot of the things that young people say like “can I get a Latte”. (Get behind this fuckin counter and make it yoursef if you want to “get it”).

Anyway I kind of like “If you know you know”

No G10… Is this you?

I am sure you have your reasons which I will accept. But if your reason is that you don’t understand it then that’s just not good enough.

So you make a part, it’s all setup and you need to break it down.

If you can fix the work holding in such a way that you can reload it in exactly the same place then you need G10.

Let me explain, watch this video to see how single point location works.

G10 No need to spend loads of money.

You could just bolt a sub plate to your machine table so that vices and chucks etc can have dowels to locate them.

But the main idea is that you can relocate your work holding in exactly the same place every time.

G10
Using G10 on a Fanuc Type Control

This is your work offset page on a Fanuc control.

G10

These figures are written in by hand or by automatic setting.

If you had written this line in your program.

G90 G10 L2 P1 X-440.500 Y-265.200 Z-443.00

They would have been written in automatically when you ran the program.

So the work offset page could have any values in G54 but as soon as you run your program this G10 command will replace them with its preset values.

Make Sure Your in Absolute

Try not to forget the G90 (Absolute) because you may accidentally be in G91 (Incremental). What would then happen is it would add these numbers to what is already in the work offset. Oh dear me.

In G90 it will always replace them.

You can write to G54 G55 G56 G57 G58 or G59 just by changing the P number.

G90 G10 L2 P1 X-140.600 Y-265.923 Z-400.00 (G54)

G90 G10 L2 P2 X-125.500 Y-236.865 Z-313.865 (G55)

G90 G10 L2 P3 X-800.500 Y-563.200 Z-125.00 (G56)

G90 G10 L2 P4 X-440.500 Y-265.200 Z-169.369 (G57)

G90 G10 L2 P5 X-440.500 Y-265.200 Z-123.568 (G58)

G90 G10 L2 P6 X-410.500 Y-235.200 Z-443.00 (G59)

The code above would setup all six work offsets.

“Read More”

Canned Cycles Using G98 G99

This article is about CNC Canned Cycles Using G98 G99

Canned Cycles Using G98 G99

(G Code CNC Programming)

It’s not a competition G99 vs G98. sometimes you need G98 sometimes you need G99.

CNC Canned Cycles Using G98 G99, a canned cycle is usually one line of code for example to drill a hole. This one line of code tells the machine all it needs to know about drilling my holes.

G98 G99

  •  Depth
  •  Feedrate.
  •  Point to rapid to before drilling
  •  Point to rapid back to after drilling

Canned Cycles Using G98 G99

G Code Programming Haas Fanuc (ISO) Mazak

What happens then is each time we give the machine a new position it will drill one of these holes. Each hole will be identical unless we change one of the parameters. So if on one hole we put a different Z depth that hole and all subsequent holes will be to the new depth.

CNC Canned Cycles Using G98 G99

So all in all it’s a really easy way to drill holes. You tell it what you want and then each time you give a position you get a hole. Then when you get sick of drilling holes you type in G80.

Machine says OK he don’t want anymore holes so from now on when the machine moves to a position nothing happens.

Mitsubishi Carbide

There are loads of Canned Cycles I can’t be bothered to tell you about them all cos I’m going out tonight otherwise I would explain them. Anyway they all do different stuff like.

  • G84 Tapping
  • G73 High speed Peck Drilling
  • G83 Deep hole Drilling
  • G81 Drilling

They all work in the same way as each other but with variations.

Now the video at the bottom of the page is about CNC Canned Cycles Using G98 G99 and that’s in all the drilling and tapping type cycles.

Ok what does it do? You may well ask, G99 vs G98

I know for a fact that some of you, and I won’t mention names, put this on the line with the canned cycle but you ain’t got a clue what it does. Maybe you don’t even put it in. Maybe you don’t care.
Anyway it’s simple.

  1. You rapid to an initial point
  2. You rapid down close to the hole (this is the R point)
  3. You feed down to depth (Z Depth)
  4. Then you rapid out to either the initial point (1) or the R point (2)

Canned Cycles Using G98 G99

Now if you program G99 it returns to the R point .
If you program G98 it returns to the initial point (that means the first one)

Ok why on earth would I want that?

Well……. if you made the first point say 50mm above the job (About 2 inches) and the rapid point was 1mm above the job (.040”).
You could drill all your holes in G99 and the drill would each time return to 1mm (.040″) above the part. You get to a clamp and you put G98 and it jumps to 50mm (2”) above the part and misses the clamp. Change back to G99 and it stays down returning to 1mm (0.040) above the part.

Get it? So you eliminate wasted moves. Good init.

Canned Cycles Using G98 G99

CNC Canned Cycles Using G98 G99

Take a look at the CNC Training Courses on offer at the CNC Training Centre

Oh and here is my video it explains how to use G98 and G99 to jump over clamps on a fixture.

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

Please don’t let on if you don’t like it as I am easily offended.

If you want to learn to program CNC Machines

If you want to learn to program CNC Milling Machines

If you want to learn to program CNC Lathes

Look no further Contact 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.

Don’t forget to watch my Tutorial Videos

We offer training on all types of CNC Machines and controls check em out.

co*****@cn***************.com

Or fill out the contact form below


CNC Programming Running Order

CNC Programming Running Order (CNC Basics)

CNC Programming Running Order

CNC Programming Running Order, the order of your CNC code within one block does not matter (see below)

Or does it?

O0001(G81 DEMO)
G21 G90 G40
(G90 G40 G21) Works the same
T01 M06 (20.0 MM DIA X 90 POINT SPOT DRILL)
(M06 T01) Works the same
G90 G0 G54 X12.64 Y88.0 S2546 M3
(S2546 M3 G90 G0 G54 X12.64 Y88.0) Works the same

However it is best to keep the order the same. Create your own convention and stick to it.

G90 G0 G54 X12.64 Y88.0 S2546 M3


So if you always put the speed and M3 (spindle start clockwise) at the end of the first position line try to always stick to that.

It Could Save You

If one day you miss out the speed for example. You will look at the code and it will look strange. You will immediately realise what is wrong.

It’s like the time my cooker got pinched, I looked in the kitchen and their was an old pince of cheese and a dirty floor where it used to be. Whilst I was thinking of a recipe to use the old cheese in I thought “something is wrong”.

Anyway

You will get used to the order of your programs and they will be easier to read, so the CNC Programming Running Order is important.

This helps not only you but your customer, the machine operator or setter.

CNC Programming Running Order

Imagine you have not seen this program for a while. How long will it take you to realise how it works and what it does?

When you look at any code that I write, in any of my articles, I always use extra end of blocks to space out the code.

Compare CNC Programming Running Order to paragraphs in a book, that is how we visually can jump around the pages.

If for example you were looking at an old program,  you would quickly be able to scan the program and see what’s going on.

So although the order does not matter to the machine it matters to you, try to make your programs consistent and to a regular pattern.

Anyone using your programs, including you, will find them easy to read and to fault find.

Summary

  •  Try to keep XYZ in that order to save confusion.
  •  Make your first three or four lines of each tool always follow the same pattern.
  •  Turn on the coolant in the same place (if it’s not there you will notice).
  •  Start the spindle in the same place and the same when you switch them off.
  • Produce an SOP (Standard Operating Procedure) documenting program layout.
  • Bunch code together in meaningful blocks.

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.

Siemens Sinumerik 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.


G81 Drilling Example (Canned Cycle)

G81 Drilling Example

The G81 is the most commonly used canned cycle it simply drills a hole and retracts.

All other canned cycles are similar to this but with a few extra bells and whistles.

G81 Drilling Example 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.

G81 Drilling Example

G81 Drilling Program Example

Here is the CNC code

G81 Program Example

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

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

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

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

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 (G81 Drilling Example)

Haas G81

See full explanation

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

 

 

 


Careers in CNC

View all current vacancies in CNC

Click here

Call David: 07834 858 407