CNC Lathe G-code for cutting radius
Hi, guys im trying to code a 2mm radius cut into stainless steel on our Okuma LB15 CNC lathe, however, im getting the error, alarm B data word arc cal. 3
can anyone see what is wrong with the code?
G00 X300Z200
T0303M03M08M42S2005G97
G00 X20Z50
G00 Z2
G01 Z-8F0.1
G01 X28
G03 X30Z-10K-2
G01 Z-14
G00 Z100X50
G00 X300Z200
MO2
Re: CNC Lathe G-code for cutting radius
Hi Kyle,
Your G03 line looks okay, though for doing a 90° arc it would be easier to use R2.0 instead of K-2.0, not that it is wrong.
The issue is the line before "G01 X28.0" as the X works in diameter on a lathe, so to produce a 2mm radius you move 2mm in Z but 4mm in X, so you would need to start at X26.0.
Re: CNC Lathe G-code for cutting radius
1 Attachment(s)
Re: CNC Lathe G-code for cutting radius
hy kyle :) replace K-2 with L2 and it will work; check attached : there is no way to get a r2 using k-2 :)
if you wish, check also this okuma forum, it is pretty good : https://www.cnczone.com/forums/okuma/
kindly :)
ps : try this shorter version
Code:
G00 X300Z200
T0303G97S2000M03M08M42G00X20Z2F0.1G95(M63)
G01 Z-8
X28
G03 X30Z-10
G01 Z-14
X31Z-13.5
G00 X300Z200M05M09(M63)
Re: CNC Lathe G-code for cutting radius
The LB15 that i have worked on also has chamfering and corner rounding
corner rounding would be
G00 X300Z200
T0303M03M08M42S2005G97
G00 X20Z50
G00 Z2
G01 Z-8F0.1
G76G01X30L-2.
G01 Z-14
G00 Z100X50
G00 X300Z200
also there is no cutter comp set and if a 2mm radius is wanted the 2mm would have to be compensated for by the tool nose radius
1 Attachment(s)
Re: CNC Lathe G-code for cutting radius
hy rcs :) initial shape may not be suitable for g76L±2, because difference between diameters is 30-28=2, thus 1per radius, so :
... there will be a nice 'fit' for a circle with radius 2 ( >1 ); aesthetically speaking, chamfer radius should be <=1
... because the circle radius is greater then the face ( 2>1 ), then there will be the case of 'chamfering' 2 paralel lines
attached is the shape; it can be seen that using a circle with rad 2 is overshooting with 0.017 above the o30
to fix that code :
... i would recomand using r1 instead of r2
... like you said, activating comp / kindly :)
Re: CNC Lathe G-code for cutting radius
This post was started back in March 2019
the OP has probably worked it out
so kitty... stop beating a dead horse
.... there is no one at home to test your code.
Re: CNC Lathe G-code for cutting radius
Quote:
Originally Posted by
deadlykitten
hy rcs :) initial shape may not be suitable for g76L±2, because difference between diameters is 30-28=2, thus 1per radius, so :
... there will be a nice 'fit' for a circle with radius 2 ( >1 ); aesthetically speaking, chamfer radius should be <=1
... because the circle radius is greater then the face ( 2>1 ), then there will be the case of 'chamfering' 2 paralel lines
attached is the shape; it can be seen that using a circle with rad 2 is overshooting with 0.017 above the o30
to fix that code :
... i would recomand using r1 instead of r2
... like you said, activating comp / kindly :)
deadlykitten if you had looked at the post you would have found that the op program starts a x20 then goes to x28 in my version i had removed the line G1X28 so that the linear movement would be from 20mm to 30 mm with the 2mm corner radius
Re: CNC Lathe G-code for cutting radius
hi rcs :) yes, i see now, but this would deliver a different part, without the o28
well, is ok 2 show how g76 works, but like superman said, it's old stuff, and i didn't see that / kindly :)