What's new
What's new

Milltronics SL-10 Lathe Spindle speed G Code Placement

Joined
May 9, 2017
Hey guys, I am trying to switch our lathe department over from conversational programming to posting from CAM (Esprit) and I am currently trying to get our post to output code the correct way. As the post is now, it outputs 3 separate S values for spindle speed. We have a G50 command that clamps the max spindle speed to whatever s-value. Then there is a G96 that is for constant surface speed. There is also a G97 which sounds like it changes it back to rpm? I assume that is and incorrectly placed G code? Also, further down in the sample of code, it has an S value and another one directly below it?

I am wondering what it SHOULD look like, and any insight as to why would be great.

Here is a sample of my code, please ignore all of the negative X values, we are tweaking the post to invert them:

G0 G99 M6 T0101
M8
G97 S1019 M3
(FACE)
Z0
X-2.503
G50 S1100
G96 S600
G1 X-2.303 F.01
X-1.598
G0 Z.1
(ROUGH OD)
X-2.2
G42 Z0
N5 G50 S1200
S650
G1 Z-.62
X-2.25
G0 Z0
X-2.15
G1 Z-.62
X-2.2
G0 Z0
X-2.1
G1 Z-.0125
X-2.135 Z-.03
Z-.62
X-2.15
G0 Z0
X-2.075
G1 X-2.1 Z-.0125
G40 X-2.3
G0 Z0
X-1.9236 Z.0707
G42 X-2.065 Z0
G1 X-2.125 Z-.03
Z-.62
G40 X-2.325
G0 X-2.5
G97 M9
G0 X6 Z.1
M1
 
just a thought...why even use a G50 or G96...just run RPMs....unless you need a part every 7 seconds?
 
Are you not a fan of CSS? I'd love to hear why, I haven't been around either too much yet. Mostly a mill guy.

From what I understand, it only makes good sense for the RPM to change as the diameter changes. A part this small may not have a huge advantage but setting solid machining processes will only benefit us in the future.
 
Are you not a fan of CSS? I'd love to hear why, I haven't been around either too much yet. Mostly a mill guy.

From what I understand, it only makes good sense for the RPM to change as the diameter changes. A part this small may not have a huge advantage but setting solid machining processes will only benefit us in the future.

for one it takes more code and longer lines of programing and more things to check....and if you use complicated programs...ex GO TO....the machine can wreck....and its not needed....this is not to say it cannot be done....and also in the future once perfected it can be added....but like an indy car....you don't start off on the 1st lap at WOT....go around the track a couple o times....then go for it....I do use it but very rarely....only if its like a 12 inch face of soft steel....I run it fast to achieve a nice shinny ground looking surface...only soft steel too...the harder the material being cut the better the face finish will be going slow and one speed

try this...just program in the 1200 RPMs and take out the other crap...G50 G96 G97....now run the part...and aren't you running G71/G70...if not thats ok too but try this....works great with G70/G71 but it can work with just coordinates like above....the finish pass should start at X0.0...I rapid to that...G00 X.0...then feed into Z zero...G01 Z0.0 F.005....then do the forms shape leaving 1200 RPMs....I would rewrite that program up there and it will only be a couple of lines long...then run the part at a set speed...then adjust as needed for finish....then.... adjust after all that for time....then add in that crap after some parts are ran...my 2c
 
Have you run that program? Most, if not all, lathes I've run will alarm out if the spindle is turned on before specifying the G50.

Also, I wouldn't be too quick to blame the post. Some of the code maybe, but it also looks like not being too familiar with the turning portion of your CAM.

All those RPM changes look like you're picking different elements in your geometry for different ops and forgetting to reset the parameters for the tool.
 
It assigns G97 first to get the spindle going.
It assigns G50 for Max Spindle Speed.
It assigns G96 for CSS

At N5 it reassigns G50 most likely because of something in the change of operations in the parameters in the Cam side not the post side of things, same with the S650. It is already in G96 mode so reassigning it is redundant, it just changes from 600 SFM to 650 SFM.

It is also using minus- values for the X position, as long as that is what your control wants to see it should be fine, if not you can change it in the post processor file or in the control parameters at the machine, your choice.

It's not giving a Max spindle alarm because it is first assigned G97 and will not go beyond that. It assigns G97 first because if G96 were assigned first it would be running veered slow if the tool is at home position 25 inches way from the part. I use G96 on everything that the tool changes diameter,(with the exception of single point threading)and G97 on everything where it doesn't, it isn't complicated at all.

R
 








 
Back
Top