Category Archives: Haas Mill

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.

Or fill out the contact form below

Haas Control Zeros Not Required

Category : Haas Mill Haas Turn

Haas ControlFor 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



“Read More”

CNC Sub Program

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


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.

G10 Using G10 on a Fanuc Type Control


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

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.

Using G10 on a Fanuc Type Control

This is your work offset page on a Fanuc control.


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.

What about the L2 you ask?

What’s that for?

L2 means you are writing to the work offsets (G54- G59)

But you can also write to the tool length offsets in which case it would be

G10 L10 P1 R200. (200 length into tool 1)

G10 L12 P1 R10.(10mm radius into tool 1)



G10 means your datum positions are saved with your CNC program.

The vice or fixture needs to be in exactly the same place when you next set it up.

You can use special single point location fixturing or just make a sub plate.

Haas G10


G0 Cancels Canned Cycles

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

Onsite Machine Training

G0 Cancels Canned Cycles

O0001(G28 Example)
G21 G90 G40


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

“Read More”

WP to LinkedIn Auto Publish Powered By :