Using G10 On A Fanuc CNC Lathe

Using G10 On A Fanuc CNC Lathe

Tags :

Category : Fanuc Turn Haas Turn

This article is about using G10 on a CNC Lathe to set the work shift or work zero offset as it is known on a Haas control.

If you have ever used Mazak machines you will know that when you call a program the work offset is kept with it.

Obvious really……

I mean if you were teaching your dog or your cat to program a CNC Lathe and you told him that he had to reset the workshift every time he called a new program what would he say.

I mean nothing really but he’d probably give you a strange look.

But you can do it on a Fanuc control or on a Haas control.

You just put this………………….

G10 P0 X0 Z-98.1

Using G10

So you would put that at the head of your program and it would change the work shift screen as above.

Advantages

No need to set workshift everytime.

Automatically sets X figures so there’s no chance you could alter it by accident.

 

Well there is a slight catch.

It’s obvious really but from now on you can only change the workshift from the program.

If you altered it on the workshift screen it would just change back when you run the program.

Now I know your not stupid enough to do that but I bet the bloke on nights is.

The Big One

When you restart a program you must remember to read this line.

Imagine if you tried to re-run the threading tool after altering the G10 you would just jump to that tool and run it. (Your new offset wouldn’t work)

Therefore you must remember to make the control read it in before running any tools.

Now the clever bastards will have a solution to this.

(This songs hilarious by the way)

What you could do is use a subprogram, if you had one for tool change position you could dump the G10 there.

That way each tool would read it.

Oh yea and it’s probably a bit more tricky to alter as you can’t use input plusUsing G10

So you have to revert to mental arithmetic.

Ok So Why Do I Need All This Crap

Do you use the same chuck day in day out?

Do you keep the jaws for each job?

Well if the answer to these questions is yes, your workshift value is the same every time you set up this part.

Do you really want to reinvent the wheel?

 

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.

Or call us

If you want to learn to program CNC Milling Machines

Look no further Contact CNC Training Centre

 


G74 Drilling Cycle With G96

Tags :

Category : Fanuc Turn Mazak Turn

G74 Drilling Cycle With G96

G74 Drilling Cycle with G96.

On a CNC lathe G96 is used for most machining. It was amazing in the old days when we suddenly discovered G96.

Because you are using a constant surface speed the metal cutting is consistent so you get a great finish.

The Black Art Of CNC Programming

CNC Programming was a bit of a black art back in the old days and generally speaking we used G96 for everything except for screw cutting and drilling holes on centreline (G74 Drilling Cycle).

When CNC Programming a drilled hole you would always use G97, (this means the speed is in RPM).

If you were to program for example G96 S50 M3 and then rapid to X0 and Z3. ready to drill a hole the machine would just go to its maximum RPM. This would be the speed you set in your G50. (The G code used to restrict the speed.)

Oh by the way that 50 meters per minute is for a B & Q drill.

Don’t get me wrong I love B & Q products but HSS drills are not for grown up engineers they are great for metal work classes at school and making a coffee table for the misses but it’s time to join the big boys and spend some money.

I Digress

Anyway the machine would calculate the speed at its current diameter. So at zero the spindle would always be flat out.

So you could say G96 is pretty useless for a drill.

But you would be wrong!!!!!!

Take a look at this bit of code.

G74 Drilling Cycle

The idea is to send the machine to the drill diameter. Because the machine is in G96 it calculates the correct speed. When you then issue G97 it fixes the speed. Now when you move to X0 it has the correct speed.

Let The Machine Do What It’s Good At

Mmmmmmm… So all you need to do is send the drill to its diameter and the machine does the arithmetic.

Let the machine do what it’s good at and you do what you’re good at.

What are you good at by the way?

Threading is the same if you were machining an M20 thread at 100m/min calculate the surface speed.

(This is the quickest way I have seen)

20/314.2 =.06365

100/.06365 = 1571 RPM

You could do the same thing let the machine do it’s shit.

Rapid to the diameter of the thread then program G96

G0 X20. Z5.;
G96 S100 M3 (Start Spindle at 100 metres per min);
;
G97 (This will swap to RPM and clamp the speed at the correct RPM);
X21.;
;
G76 P010060 Q20 R.02;
G76 X16.93 Z-25. P1534 Q485 F2.5;
;

ETC

So with this bit of code you can get the machine to calculate your speed.

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.

Or call us

If you want to learn to program CNC Milling Machines

Look no further Contact CNC Training Centre

 

 


G84 Rigid Tapping Program Example

G84 Rigid Tapping Program Example

G84 is a tapping canned cycle.

G84 taps holes.

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.

G84 Rigid Tapping Program Example

G84 Rigid Tapping Program Example

Here is the CNC code

G84 Rigid Tapping Program Example

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

G84 Rigid Tapping Program Example

The G95 selects feed per revolution which means we only need to program the tap pitch for the feed-rate.

See full rigid tap G84 Rigid Tapping Program Example

The M29 engages the rigid tapping mode and the S800 is the speed. (It does not start the spindle)

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

The G84 Cycle instructs it to tap a hole 17.mm deep (Z-17.) at a feed of 1.75mm per revolution (F1.75) 

So it feeds at 1.75mm per revolution with the spindle turning clockwise to depth.

At the bottom of the hole it reverses the spindle and feeds back to the initial point.

This initial point was in the line.

G84 Rigid Tapping Program Example

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 tapping process.

When the G80 is programmed it no longer taps holes.

Single block and feedhold do not work in a tapping cycle.

Why? You ask.

IT BUSTS THE TAP

Now watch the video to see it all in action (not breaking the tap).

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

 

 

 


G94 Facing Example (Sample Program)

G94 Facing Example

G94 Facing Program Example

G94 Facing Example

:Blank Size: 65mm Diameter 85mm Long

:Final Size: 65mm Diameter 82mm Long

This program will rapid to X66. Z3. it will then machine the face down to Z0 in three cuts. The first G94 line tells it to face past centreline to X-1.6 at a feed-rate of F.2 The Z axis moves to Z2.

Cuts
1: Z2.
2: Z1.
3: Z0

The cycle stays in the control until cancelled by a G0 rapid command.

So it remembers exactly what you told it, a bit like my wife, she keeps reminding me of the time I got so hammered I pissed in her wardrobe (some of the shoes still smell to this day).

The G0 G28 U0 W0 will move the turret back to machine reference point.

The G0 will cancel the G94 Facing cycle.

G94 Facing Example Is It Any Good?

Well personally I think it is.

Now I’ll tell you why. You could say it’s really easy to write the program to face a part.

G0 X50. Z0
G1 X-1.6 F.2
G0 X50. Z2.

So that’s easy to do but….

Some one wrote a comment on one of my posts the other day and he started it by saying “back in the real world”.

Can’t lie and say it didn’t piss me off but being the mature well balanced man that I am I ignored it.

Now my inner nasty, immature, unbalanced me said “look mate I was in the real world when you were still shitting yellow”. Obviously I didn’t post it and if your reading this now thinking it’s you, well it isn’t.

Anyway as to the G94 Facing Example

In the “real world” you get to the end of the batch of parts and find that one of them is way too long and you need to face a shit load off the front.

Now had you used the cycle as below and got into the habit of always using it.

G0 X50. Z3.
G94 X-1.6 Z0 F.2
G0 G28 U0 W0

The alteration would be really easy.

G0 X50. Z12. (Imagine You Have An Extra 12mm On the Face)
G94 X-1.6 Z10.5 F.2
Z9.
Z7.5
Z6.
Z4.5
Z3.
Z1.5
Z0
G0 G28 U0 W0

Rapid Move Cancels G94

Note don’t forget you must have the G0 rapid move at the end to cancel the G94.

(Just like G0 cancels a canned cycle in milling)

Don’t be tempted to put G0 in the moves as the control will just wiz around in Z and sit there laughing at you.

G0 X50. Z12. (This is what not to do)
G94 X-1.6 F.2
G0 Z10.5 (NO NO NO NO NO NO)
Z9.
Z7.5
Z6.
Z4.5
Z3.
Z1.5
Z0
G0 G28 U0 W0

See full explanation

Using G94 on a Haas Lathe

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


How G28 Works. Why two pushes of CYCLE START?

How G28 Works

Every wondered why G28 takes two presses of the CYCLE START Button when you are in single block.

How G28 Works

Be amazed you are about to find out.

One of my pet hates, and at my age you have thousands, is when people say

“Oh I don’t know we’ve always done it”

I just think, well you are stood at this machine for eight hours a day why not find out what’s going on.

How G28 Works

How G28 Works

G28 tells the machine to return to its home position. This is usually a convenient point for a tool change.

The command on a machining centre looks a bit strange.

G28 G91 X0 Y0 Z0

Why G91?

Well G28 means return to your home position via an intermediate point.

So if you programmed G28 X0 Y0 Z0 then your machine would rapid down to the workpiece (probably crash) and then go to it’s home position.

What G28 G91 X0 Y0 Z0 tells the machine is this……

  • The reference point is incrementally zero from where you are.
  • So the machine does not move.
  • Then it goes to it’s home position.
  • Hence the two presses of cycle start.

On a CNC Lathe we use U and W for incremental. Read this post if you don’t know.

So if you programmed G28 U0 W0 your X and Z axis would return to their home position. This being because the reference point is incremental.

If you programmed G28 X0 Z0 you would probably get a collision like below.

Well at least it went home.

First move is to X0 Z0 which is the front of the part. (This is your reference point.)

The machine would then move back to zero return.

G28 is fine on a CNC Lathe but on a CNC Machining Centre you must remember to change back to G90 (Absolute).

My preference is to use G53 to get back to your home position.

Read this article if you never heard of G53.

Please note some older machines don’t have G53. Oh and it is classed as an option!

If you are affected by any of the issues raised in this post or need CNC Training then contact us.

Contact CNC Training Centre

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

 

 

 

 


WP to LinkedIn Auto Publish Powered By : XYZScripts.com