What's new
What's new

G-code speeds and feeds

Rich L

Hot Rolled
Joined
Sep 24, 2006
Location
Colorado
I have a few boring newbie questions about the use of G96, 97, 98, 99 coupled with the S and F address for specifying speed and feed especially in light of G96. You folks, I'm sure, know all this by heart but I'm not there yet so I thank you in advance for any insight or advice. My questions are pertinent to a gang-tool lathe with Fanuc 0i-Mate TB controls, 2004 vintage.

If I specify G98 in a block, does that set the meaning of the F-address number to be interpreted as per minute feed rate in subsequent blocks except for overrides in canned cycles such as G71, etc. that have a F-address of their own?

Same question for G99 with respect the per rev feed. ?

If I write G96 G99 S400 M03 (for example), does that put me in CSS mode (it should according to my books) at 400 ft/min and any subsequent block with an F-addess will be interpreted as feed per rev (per G99)?

Same question for G96 G98 S400 M03 with respect to feed per minute. ?

G97 G99 S2000 - means plain old spindle RPM at 2000 with F-addresses interpreted as feed per rev?

G97 G98 S2000 - means plain old spindle RPM at 2000 with F-addresses interpreted as feed per minute?

For CSS mode initiated at the start of a program, is it a reasonable practice to clamp the spindle speed (G50) so that some residual X-address value won't start the spindle up at some ridiculous speed? In other words, for example:

G50 S3000;
G96 S400 M03; etc

I hope these are yes or no questions and if some are "nope" then I'd sure like to be enlightened and sorry if I asked the same questions twice. Please set me straight!

Thanks folks!

Cheers,
Rich
 
I use G96 and G97 every day,G96 I use in turning/boring,G97 I use for threading and drilling.

The Feed rate is based of of the RPM so CSS doesn't matter,it is going to feed at .xxx" a minute no matter what RPM.

As a rule of thumb in turning I ALWAYS set G00 at 10.'' or better in X and Z for safe tool clearance when turret rotates (in my haas SL30) when using G96 plus I set G50 at the max RPM I wanna use unless I have large production run then I will adjust tool changes as close to part as I can to knock of as much time as I can.So in G96 with my tool always at a bigger diameter than the part I wanna turn there is no worry about rapping up to many RPMs,if it's a big rough casting that can't stand a high RPM that could sling it out of chuck I will clamp RPM at a best guess safe RPM for it,then once I have turned it and have it some what in balance I will put in code G50 xxxx at max RPM that insert will handle for given diamteter in the program block.

When using G97 for drilling for exp. I program it something like this...
Oxxxx
(DRILL XXXX)
G54
G50 S1000
G97 S200 M03 T0505
G00 X.000 Z1.000
Z.030 M08
S700
G83 Z-1.375 Q.06 R.03 F.008
S200
G00 Z 1.
X12. Z 10.
M30
 
IronReb,

Thanks for the advice on the speed clamping but your program peck cycle begs one of the original questions I asked. Your G83 line has a feed specified as .008 which "clearly" is a feed per rev which means that your program presumes G99 is operative. Am I right? Is G99 a default unless G98 is used or do you always use G99 and it remains in control memory?

Cheers,
Rich
 
IronReb made a good post, but he may have missed that you have a Fanuc, not a Haas like him. I would NEVER assume that codes on one control will work the same as a different brand, even if they are quite close.


If I specify G98 in a block, does that set the meaning of the F-address number to be interpreted as per minute feed rate in subsequent blocks except for overrides in canned cycles such as G71, etc. that have a F-address of their own?
G98 is modal, so it will stay in effect until G99 is specified. G99 is the same way. Look at the G-code list in your Fanuc operator manual. You'll see a "group" number associated with each code. G98 and G99 belong to the same group, so one of them is always in effect, and will stay that way until another code from the same group becomes effective.

Same question for G99 with respect the per rev feed. ?
As above.

If I write G96 G99 S400 M03 (for example), does that put me in CSS mode (it should according to my books) at 400 ft/min and any subsequent block with an F-addess will be interpreted as feed per rev (per G99)?
Yes.

Same question for G96 G98 S400 M03 with respect to feed per minute. ?
Yes, same thing.

G97 G99 S2000 - means plain old spindle RPM at 2000 with F-addresses interpreted as feed per rev?
Yes.

G97 G98 S2000 - means plain old spindle RPM at 2000 with F-addresses interpreted as feed per minute?
Yep, I think you have it figured out.

For CSS mode initiated at the start of a program, is it a reasonable practice to clamp the spindle speed (G50) so that some residual X-address value won't start the spindle up at some ridiculous speed? In other words, for example:

G50 S3000;
G96 S400 M03; etc
Not only reasonable, you should absolutely do that. Do NOT allow the machine to go into CSS without having set a max RPM, as it can go to top speed. Very important to understand is that G50 S___ sets max RPM in CSS, but has no effect in G97 straight RPM.

When you have a program with G97 and G96 mixed in, there is a technique that is easier on your machine, as well as the electrical bill.

At the end of a tool, as the turret is going back to some tool-change location, set the G97 speed of the next tool when it is in position to start its cutting. Let's say that Tool 1 faces and turns, Tool 2 drills, and Tool 3 parts-off. (I won't put all the codes in these lines.)

N10 G50 S2000
N11 G00 G96 S625 T1 M3
N12 X____ Z____ (approach part)
machining...
N18 G0 G97 S450 X____ Z____
N19 M1

N20 G00 G97 S450 T2 M3
N21 X___ Z____
drilling...
N23 G0 X____ Z____ S764
N24 M1

N30 G50 S800
N31 G00 G97 S764 T3 M3
N32 X2. Z-1.
N33 G01 G96 X.030 S400 F.004


OK, look at N18. Note that the RPM is set in preparation for the next tool. Because T2 will be G97, then the end of T1 sets the same G97 speed.

In the case of T2 to T3, we'll go from G97 to G96 on T3. First, figure the RPM for T3 when the tool finishes its approach to the part, and is ready to start cutting (N32). T3 will cut at 400 SFM, so at the approach point of X2., the RPM would be 764. So, as the drill goes back to a tool-change location in N23, set the straight RPM that will match. When the parting tool actually starts its cut (N33), it kicks into G96. There is no RPM change, because the RPM has already been set for that diameter and surface speed.

By doing it like this, the spindle makes fewer RPM changes, which stresses the spindle drive and motor less, and uses less power. This is a great technique for avoiding lots of up and down speed changes.
 
Metaltech,

Super! Thanks for the detailed post and the time it took to put all that together. I'll have to study your tool change and RPM advice a bit more.

Cheers,
Rich
 
Is G99 a default unless G98 is used or do you always use G99 and it remains in control memory?

Some of the groups of modal G-codes have a parameter that will select which code in the group is default, meaning, that is the one in effect when the control is powered on. If you power on your machine, go to the screen where it shows all the G-codes in effect (likely called the "Current" page) and see whether G99 or G98 is effective. It will probably be G99, and if so, you would never have to state G99 in a program unless you also used G98 in that same program. If you have a program that uses both, you should have the code called out at the beginning of each tool, to be certain the proper feed is in effect. This is in case you interrupt the program, then restart in the middle or at the top, you don't want to chance the wrong code being operational. Assumptions aren't good in CNC programming.
 








 
Back
Top