What's new
What's new

Help with G-CODE for cast iron parts on Haas SL 30 lathe please

FleetFarmer

Plastic
Joined
Apr 8, 2021
Hey guys...

I work in a job shop that normally programs using Mastercam, so when we had to help out our sister production shop run a bunch cast iron parts I just used the GCODE program that they used, but the program they gave me was way too slow for me so I changed a couple of the feeds and speeds to decrease the part time. Bear in mind I know very little about GCODE, but I know enough to change basics like tool number, speeds and feeds.

The part is a 5 pound weight that gets used in exercise machines. I bored soft jaws so that I clamp on an ID flange so the face of the part is facing the chuck. I only turn the OD and the ID. I use a MSDNN 16-4D Neutral tool for the OD with an SNMG120408-RK MC5015 insert. I use the neutral tool because the tool has to turn the OD then create a radius on both sides of the part. I use a 1.5 boring bar with a CNMG 432 insert for the ID. I run a Haas SL 30 Lathe.

images 5lb weight.jpg

When I try to increase the SFM( to what I think it should be), then the machine gives me a "tool overload alarm" always on the 1st pass. I assume if I wanted to decrease the part time that I should be running this at a much higher SFM. So would it make sense to add another roughing pass on the OD to decrease the depth of cut and then run at a higher SFM? Or would that actually take longer? The ID portion of the program is fine and I don't think I need to alter that at all.

The part starts at about 8.3"(OD) and 1.7"(ID). It needs to finish at 8" OD and 1.9" ID. Could you guys help me add another roughing pass for the OD? Or would that take longer than what I am running now...

Here is the program.

%
O0505
G98 G18
G20
G50 S2000
M31
G53 G0 X0.

(Profile1)
T1212
G99
M22
G97 S425 M3
G54
M8
G0 X9.1 Z0.2594
G0 Z0.2625
X8.14
G1 Z0.0625 F0.014
Z-0.705
X8.3
X8.46
G0 Z0.2625
X8.0167
G1 Z0.0625 F0.014
Z-0.705
X8.14
X8.2531 Z-0.6484
G0 Z0.2625
X7.8934
G1 Z0.0625 F0.01
Z0.0442
X7.9634 Z0.0092
G18 G3 X8. Z-0.035 I-0.0442 K-0.0442
G1 Z-0.61
G3 X7.9634 Z-0.6542 I-0.0625 K0.
G1 X7.8618 Z-0.705
X8.0167
X8.1298 Z-0.6484
X8.1494
G0 X9.1
Z0.2594

M9
G53 X0. Z-15.0

(ID ruff)
M1
T202
G99
M22
G97 S425 M3
G54
M8
G0 X1.57 Z0.1969
G50 S400
G96 S250 M3
G0 Z0.1685
X1.72
G1 Z-0.0315 F0.017
Z-0.7
X1.7059 Z-0.69
G0 Z0.1685
X1.85
G1 Z-0.0315 F0.013
Z-0.7
X1.8359 Z-0.69
G0 Z0.1685
X1.98
G1 Z-0.0315 F0.013
Z-0.7
X1.9659 Z-0.69
X1.92
G0 X1.7
Z0.1969
G97 S400 M3

(ID fin)
G99
M22
G97 S500 M3
G0 X1.85 Z0.1969
G50 S500
G96 S300 M3
G0 Z0.1685
X1.99
G1 Z-0.0315 F0.01
Z-0.7
X1.9617 Z-0.69
X1.93
G0 X1.85
Z0.1969
G97 S150 M3

M9
G53 X0. Z0.0
M30
%

But please I would love to hear what you guys think, I have almost 1500 of these to do and would love to save as much time as possible.
 
First thing i would change is your G97 TO G96, with G97 your staying with the same rpm. G96 keeps a constant surface speed, or it changes rpm as diameters change.
Yes, Hass SL is a wimpy machine, if its giving you an overload you will have to run two passes. We had that problem often on ours.
 
800 SFM on cast iron?:eek:

You probably don't have enough torque. Does it have a low gear?
If you speed it up are you going to save enough time to offset the extra inserts you wear out by running too fast?
 
(Profile1)
T1212
G99
M22
G97 S425 M3
G54
M8
G0 X9.1 Z0.2594
G0 Z0.2625
X8.2
G1 Z0.0625 F0.014
Z-0.705
X8.3
X8.46
G0 Z0.2625
X8.1
G1 Z-.705
X8.3
G0 Z.2625
X8.0167


In red...
 
Booze Daily, is that all I need to add to the GCODE to add another pass to the OD?

More importantly, am I totally wrong in assuming that adding another pass to the OD would allow me to increase the SFM enough to save time? The machine only gets "tool overload" when I try to increase the speed from what it is now. And my machine always runs in Low Gear, the guy before me said "never use high gear". Maybe because we really only run parts that are 12-18" in diameter, we do run smaller parts but not as often.

Thank you

I am in my second year on the CNC lathe, self taught only using Mastercam so there is much I still need to learn...you guys are a life saver
 
Just be sure to track insert wear and how well the part is held in the chuck. You do not want this puppy coming loose at high RPM due to jaw damage or extra thrust load due to insert wear.
 
Very good point, made worse by the fact that I have to turn down my clamping pressure because the flange that I clamp on will crack if my pressure is too high.

Maybe I am trying to hard to save a few seconds on each part...the program takes around 2 min 18 seconds as it stands right now...
 
That looks like a code spit out by Fusion 360, not Mastercam. The G18 in the G3 line and where the M1 is gave it away.

If stock OD is 8.3" than the depth of cut of the first pass is only .08". That's not a heavy depth of cut. Your problem is your spindle speed of 425RPM at 8" diameter. That is too high. At that diameter normally it would be about half that.
Change the G97 S425 on the OD rough operation to G96 S400. That should make a difference in my opinion.

And if you insist on adding an extra roughing pass, here you go

(Profile1)
T1212
G99
M22
G97 S425 M3
G54
M8
G0 X9.1 Z0.2594
G0 Z0.2625

X8.22
G1 Z-0.705 F0.014
X8.3
G0 Z0.2594


X8.14
G1 Z0.0625 F0.014
Z-0.705
X8.3
X8.46
G0 Z0.2625
X8.0167
G1 Z0.0625 F0.014
Z-0.705
X8.14
X8.2531 Z-0.6484
G0 Z0.2625
X7.8934
G1 Z0.0625 F0.01
Z0.0442
X7.9634 Z0.0092
G18 G3 X8. Z-0.035 I-0.0442 K-0.0442
G1 Z-0.61
G3 X7.9634 Z-0.6542 I-0.0625 K0.
G1 X7.8618 Z-0.705
X8.0167
X8.1298 Z-0.6484
X8.1494
G0 X9.1
Z0.2594

M9
G53 X0. Z-15.0


The text in red is the added pass.
 
Thank you so much!

The program wasn't made by mastercam, I think that an employee at our sister shop just wrote it up himself very quickly.

And because I don't normally run production(and I kind of hate it) I try to speed up the program when I probably shouldn't...

If I wanted to learn how to write/interpret GCODE for the lathe, do you guys know the best way for me to learn? I've looked at a few websites but all of the info is scattered and only teaches parts...

Is there a good book or cheap online program that you guys would recomend?

Again, you guys make this job much easier. Especially for someone who is self taught and the only one in the shop that runs the lathe.
 
The Haas manual itself is pretty informative. Also your local HFO should offer a two day training class directed toward G code programming. This is why I always preach learning both. CAM is great until you don't have it.
 
You should be able to figure out plain 2 axis lathe work in Mastercam pretty quick. Basically select your tool, the cycle (OD, ID, face, etc) and set the parameters. If you need help you can click the ? in the lower right corner and it gives you pretty good info about what each parameter does.
 








 
Back
Top