Heidenhain Sections, I don’t get to work on Heidenhain controls anywhere near as much as I would like to.
A recent training program we undertook with a packaging company meant I got loads of time to have fun with this control whilst working with some fantastic people oh, and I got paid too.
Ever since I first worked on Heidenhain controls in the early 80s I have found them very intuitive. As with all the CNC controls (and I am gonna have a moan) they tend to get over complicated.
Basic Turning, in the early days of CNC Turning G96 was one of the things that really made a massive difference.
It meant that instead of having to turn a part at a fixed speed and feed, the part could be programmed in G96 which was a constant surface speed.
Where diameters changed, particularly when facing, it made a massive improvement to tool life and surface finish as well as speeding up the whole process.
G97 Speed In RPM
In Basic Turning when you program G97 your machine will start the chuck up at a speed in RPM. So if you program. G97 S1500 M3
Your chuck will start revolving clockwise at 1500 rpm.
G97 for Drilling Tapping and Screwcutting
When drilling a hole you are on the centreline of the machine so you just want plain old simple RPM.
G96 however means meters per minute. This is a surface speed. G96 S200 M3
Your machine would start up at a surface speed of 200 meters a minute. Now your RPM would depend on where on the diameter the tool was positioned.
If the tool was positioned at a 100mm diameter it would be as if the tool were able to run around this diameter at a speed 200 meters a minute.
It’s a bit like being on a running machine if you ran at 200 meters a minute and placed various diameters under your feet the large ones would turn at slow rpm and the small ones would turn at high rpm. (Just like the hamsters above)
That’s why on a manual lathe it is hard to face a large diameter without changing speed half way.
Neeeeeoooooooowwww
You know when you face a part on a CNC Lathe and you hear that change in pitch? It’s the spindle increasing in RPM as it gets closer to the center of the part.
Well I bought my hamster loads of different wheels to play on just like the one above.
My hamster suffered with depression on account of being stuck in a cage all day and not having a girlfriend oh and he had a lot of credit card debts too.
These wheels varied in diameter from about 6 inches to a massive 2 foot one. They kept him happy all night. He was so tired he slept all day.
Harold could only run so fast but I noticed when he was on the small 6 inch wheel it absolutely whizzed around. Now on the big two foot diameter one it took him ages just to get it to spin around once.
G96 G97 all about hamsters
Harold Had G96
A CNC machine in G96 will give a lovely finish because the surface speed always remains the same.
So even though Harold ran at 200 metres a minute (this is fuckin lightening speed for a hamster)
The wheels ran at different RPM depending on what diameter they were.
Harold Was a Clever Bastard
Oh by the way Harold had a tail (unlike other hamsters) and a maths qualification.
He knew that if he multiplied the diameter of the wheel by .00312 it would give him the circumference of whatever wheel he was running on in meters.
200 mm wheel (.00312 x 200 = .6864)
All he now needed to do was divide this answer into the speed he was running at and he would know how many RPM his wheel was revolving at.
If he was running at 200 meters a minute not only would he be fuckin knackered but the wheel would be running at 291 rpm
200 / .6864 = 291
Basic Turning Manual Machining
Using a manual machine you have to compromise. At the outside your speed is too fast and when you get to the centre you are too slow.
Manual Lathe
On a CNC lathe we would normally program in mm per revolution as well because the speed is changing all the time so we need our feed to be locked into the speed.
With a machining centre our cutter is always revolving at the same speed so the feed can be constant in mm per minute.
Someone out there will be thinking “what happens in G96 when you get to the centre of the part”. Well the spindle will be flat out!
See how surface speeds are translated to speeds in RPM. There are many converters online that you can use for this and I do recommend their use. It will also mean you don’t have to watch my tedious video.
When I train people at the CNC Training Centre my emphasis is on understanding not memorising. I usually start by saying “please don’t remember all the things I am telling you”.
In the early days training students in Basic Turning I remember them saying to me the next day that they had G codes floating around in their head from the lessons the day before.
G96 and G97
What I really mean is that the most important thing is to understand what the machine can do and the concepts of programming and Basic Turning.
You could say “I know there is a G code that makes the machine run in RPM” so all you need is a list of G codes.
If you can be bothered to work through the simple maths above. It will help you to fully understand how G96 is works.
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?
This is a video explaining cutter compensation in CNC programming.
You will come across various terms to describe this such as:
Tool cutter comp.
CNC cutter comp.
G41 G42 cutter compensation.
Cutter diameter compensation.
Cutter radius compensation.
Heidenhain RL RR.
Cutter compensation is referred to as cutter diameter compensation and cutter radius compensation
Haas cutter compensation, Fanuc cutter compensation and Mazak cutter compensation all work in the same way.
Although Heidenhain cutter compensation or Heidenhain cutter comp looks different. In the programme it functions in exactly the same way.
In the parameters or settings of your control you can set up your system to use the radius or the diameter of your cutting tool.
This means that when you input the data for your cutting tool in your offset table you can use the diameter or the radius of the tool. This depends on your settings.
When people talk about cutter compensation G code they may say “cutter comp G code” it’s often shortened.
(Cutter compensation G code)
The G codes used in this video are:
G41 cutter compensation left
G42 cutter compensation right
G40 G code to cancel cutter compensation
This Video shows you :
How to program G41.
How to program G42.
CNC cutter compensation examples.
Cutter compensation Heidenhain style.
Heidenhain RL RR.
We always recommend that you climb mill so you will be using G41 most of the time.
Milling the outside of a square using G41.
Milling the inside of a square using G41.
Milling the inside of a square using G42 (should you want to conventional mill).
Milling the outside of a square using G42 (should you want to conventional mill)
The rules when using compensation on a CNC Milling machine.
This is simple on a square sided figure or a simple radius. Anything more complex and it’s a nightmare.
I just heard some smart arse say “Ah well my CAD system takes care of that”.
So it should my friend but, and there is a but:
What will you do when your cutter wears?
What if you want to use a different size cutter?
The cutter may not run true.
What if the cutter is not exactly size?
In the old days of paper tape and Corned Beef we as programmers would write several programmes.
This was so that we could re-grind the milling cutters in fixed increments. A different programme could be used each time the tool was changed.
Sorry I can’t talk about this much longer as I still have the nightmares (mainly about corned beef sandwiches).
Anyway enough of that. So when we machine our first profile we can add some on to the tool radius in the offset file. When we check the part we can adjust the offset and re-cut the profile to achieve an accurate result.
The Rules:
Shape must be continuous and consistent.
You can’t cut along a line and then go back along it.
It’s important to allow more than the tool radius when entering tool compensation. The same applies when you come out of tool compensation.
Internal corner radii and steps must be greater than the tool radius.
Always allow more than the radius because when you adjust it it may be larger than the actual tool you are using.
Don’t ask
For example if you have a 12mm endmill but you have .2mm in the wear compensation. The machine thinks that the tool is 12.4mm in diameter.
You can’t do this in cutter comp:
You would have to apply one cut in G41 and cancel with G40 then do another cut in G42 and cancel with G40:
I recently got to train someone on one of these, a Webster & Bennett with Fanuc 10t Control.
It’s what I crudely call a big bastard. But bastard it is not, it can definitely machine some big shit
Like this monster.
Don’t ask me what it is or I would have to kill you. Joking aside I think it’s a water valve. Beware these jacuzzis use a lot of water,
The machine is a Webster & Bennett vertical borer and I think the Fanuc 10t control was possibly a retro fit.
When these start whizzing around even a few RPM it can scare the living shit out of even the most seasoned engineer. And me, well I,m more seasoned than a piece of Nando’s chicken.
G50 on a Webster & Bennett Your Best Friend
Anyway joking aside your best buddy now is definitely G50 get this wrong and it’s fuckin world war three.
Imagine the scenario, you program G96 S180 M3. Spin at 180m/min. Not too fast but…. what if the tool is sat in the middle of the part.
Machine says “come on lads happy days foot to the floor flat out joy riding” and it fucks off like two teenage boys in a stolen Lamborghini.
So without aG50, or the wrong speed, this beast will accelerate to it’s maximum rpm.
Oh and did I Mention it’s harder to stop than a P & O Criuise Ship with 4000 obese pensioners on board?