Hello Guest it is July 18, 2019, 03:38:26 AM

Author Topic: need help with g code and cutter comp issue  (Read 4267 times)

0 Members and 1 Guest are viewing this topic.

need help with g code and cutter comp issue
« on: November 03, 2008, 01:27:00 PM »
i am trying to mill off a certain amount from the side of the part then adding a 2.5" radius arc into the side.  my x0 and y0 is set at the bottom left corner of the part and the arc center is X-2.18 Y .66, i am removing .231 materail from x prior to cutting the arc.  here is the code...

o1000
t1 m66 (1" end mill)
s600 M03
g00 g90 g55 x-2.0y-1.0
g43 h1 z3.0
g01 z0.0 f6.6
g01 x-1.0 g41 d1 f6.6
g1 x0.385 f6.6
y1.75
g00 x-3.0
y-.600
g1 x.077
y1.75
x-3.0
y-.6
x.1155
y1.75
x-3.0
y-.600
x.154
y1.75
x-3.0
y-.600
x.1925
y1.75
x-3.0
y-.600
x.231
y1.75
x-3.0
y-.600
x.231
y0.0
g03 x.231 y1.13 r2.5
g01 x-3.0 g40
g28 g91 z0 m05
g28 g91 y0 m09
m30

the arc is not cutting on the center of my part, for some reason its off on the Y.

thanks for the help
« Last Edit: November 03, 2008, 04:10:57 PM by SDConcepts »

Offline Graham Waterworth

*
  • *
  •  1,863 1,863
  • Yorkshire Dales, England
    • View Profile
Re: need help with g code and cutter comp issue
« Reply #1 on: November 03, 2008, 02:04:03 PM »
Your code is all screwed up, post a picture/drawing of what you are trying to make along with sizes and I will recode it so you can see how it should be done.

Graham
Never give up, time will pass, the cloud will clear, the sun will shine once more.
Re: need help with g code and cutter comp issue
« Reply #2 on: November 03, 2008, 02:23:51 PM »
here is a pic of what i'm trying to do. 

Offline Sage

*
  •  365 365
    • View Profile
Re: need help with g code and cutter comp issue
« Reply #3 on: November 03, 2008, 02:24:14 PM »
I'm certainly no expert on g-code but lets see if I can figure it out.

You haven't said what size cutter you're using but I suppose it makes no difference.

Using the Mach toolpath display I see the tool going across the bottom at Y = .6
and I see it going across the top at Y = 1.75

I assume you want the arc centered on that which would be:

1.75 - .6 = 1.15  divided by 2 = .575 added to the bottom measurement of .6 = 1.175

Your arc code has the Y dimension at 1.32

Is that the problem?

Sage
Re: need help with g code and cutter comp issue
« Reply #4 on: November 03, 2008, 04:11:55 PM »
your right i had the arc programmed off center.  now if anyone has any tips of making the program faster or more logical please let me know.

Offline RICH

*
  • *
  •  7,341 7,341
    • View Profile
Re: need help with g code and cutter comp issue
« Reply #5 on: November 03, 2008, 06:33:48 PM »
Something to DRY RUN or fool with. This uses a .250 dia end mill which rapids from X0 YO and cuts the unwanted material as if it was a pocket. Change z values to suit clearance and depth you want.

(Created 6:09:57 PM 11/3/2008 from sdconcepts.dxf)
(Post = ISO G-Code - Non Modal)
(Tool 5 = .25 DIA)
N0001 G90
N0003 T5 M06 S1000
N0005 G00 X1.1250 Y1.1250 Z0.1000
N0007 G00 X1.1250 Y1.1250 Z0.1000
N0009 G01 X1.1250 Y1.1250 Z-0.1000 F5.00
N0011 G01 X1.1250 Y2.0070 Z-0.1000 F10.00
N0013 G01 X1.1537 Y2.0070 Z-0.1000
N0015 G02 X1.1537 Y1.1250 I-2.3337 J-0.4410
N0017 G01 X1.1250 Y1.1250 Z-0.1000
N0019 G00 X1.1250 Y1.1250 Z0.1000
N0021 G00 X0 Y0
N0023 M05
N0025 M02

Here is another one only this time it dosn't use a g02 but rather breaks the arc up into staight
lines thus approximating  the curve.
 
(Created 6:40 PM 11/3/2008 from sdconcepts.dxf)
(Post = ISO G-Code - Non Modal)
(Tool 5 = .25 dia)
N0001 G90
N0003 T5 M06 S1000
N0007 G00 X1.1250 Y1.1250 Z 0.1
N0009 G01 X1.1250 Y1.1250 Z-0.1000 F5.00
N0011 G01 X1.1250 Y2.0070 Z-0.1000 F10.00
N0013 G01 X1.1537 Y2.0070 Z-0.1000
N0015 G01 X1.1562 Y1.9934 Z-0.1000
N0017 G01 X1.1587 Y1.9799 Z-0.1000
N0019 G01 X1.1610 Y1.9663 Z-0.1000
N0021 G01 X1.1633 Y1.9527 Z-0.1000
N0023 G01 X1.1655 Y1.9391 Z-0.1000
N0025 G01 X1.1676 Y1.9255 Z-0.1000
N0027 G01 X1.1697 Y1.9119 Z-0.1000
N0029 G01 X1.1717 Y1.8982 Z-0.1000
N0031 G01 X1.1735 Y1.8846 Z-0.1000
N0033 G01 X1.1753 Y1.8709 Z-0.1000
N0035 G01 X1.1771 Y1.8572 Z-0.1000
N0037 G01 X1.1787 Y1.8435 Z-0.1000
N0039 G01 X1.1803 Y1.8298 Z-0.1000
N0041 G01 X1.1818 Y1.8161 Z-0.1000
N0043 G01 X1.1832 Y1.8024 Z-0.1000
N0045 G01 X1.1845 Y1.7887 Z-0.1000
N0047 G01 X1.1858 Y1.7750 Z-0.1000
N0049 G01 X1.1870 Y1.7612 Z-0.1000
N0051 G01 X1.1881 Y1.7475 Z-0.1000
N0053 G01 X1.1891 Y1.7338 Z-0.1000
N0055 G01 X1.1900 Y1.7200 Z-0.1000
N0057 G01 X1.1909 Y1.7062 Z-0.1000
N0059 G01 X1.1916 Y1.6925 Z-0.1000
N0061 G01 X1.1923 Y1.6787 Z-0.1000
N0063 G01 X1.1929 Y1.6649 Z-0.1000
N0065 G01 X1.1935 Y1.6512 Z-0.1000
N0067 G01 X1.1939 Y1.6374 Z-0.1000
N0069 G01 X1.1943 Y1.6236 Z-0.1000
N0071 G01 X1.1946 Y1.6098 Z-0.1000
N0073 G01 X1.1948 Y1.5961 Z-0.1000
N0075 G01 X1.1949 Y1.5823 Z-0.1000
N0077 G01 X1.1950 Y1.5685 Z-0.1000
N0079 G01 X1.1950 Y1.5547 Z-0.1000
N0081 G01 X1.1949 Y1.5409 Z-0.1000
N0083 G01 X1.1947 Y1.5271 Z-0.1000
N0085 G01 X1.1944 Y1.5134 Z-0.1000
N0087 G01 X1.1941 Y1.4996 Z-0.1000
N0089 G01 X1.1936 Y1.4858 Z-0.1000
N0091 G01 X1.1931 Y1.4720 Z-0.1000
N0093 G01 X1.1926 Y1.4582 Z-0.1000
N0095 G01 X1.1919 Y1.4445 Z-0.1000
N0097 G01 X1.1911 Y1.4307 Z-0.1000
N0099 G01 X1.1903 Y1.4170 Z-0.1000
N0101 G01 X1.1894 Y1.4032 Z-0.1000
N0103 G01 X1.1884 Y1.3895 Z-0.1000
N0105 G01 X1.1874 Y1.3757 Z-0.1000
N0107 G01 X1.1862 Y1.3620 Z-0.1000
N0109 G01 X1.1850 Y1.3482 Z-0.1000
N0111 G01 X1.1837 Y1.3345 Z-0.1000
N0113 G01 X1.1823 Y1.3208 Z-0.1000
N0115 G01 X1.1808 Y1.3071 Z-0.1000
N0117 G01 X1.1793 Y1.2934 Z-0.1000
N0119 G01 X1.1777 Y1.2797 Z-0.1000
N0121 G01 X1.1760 Y1.2660 Z-0.1000
N0123 G01 X1.1742 Y1.2524 Z-0.1000
N0125 G01 X1.1723 Y1.2387 Z-0.1000
N0127 G01 X1.1704 Y1.2251 Z-0.1000
N0129 G01 X1.1684 Y1.2114 Z-0.1000
N0131 G01 X1.1663 Y1.1978 Z-0.1000
N0133 G01 X1.1641 Y1.1842 Z-0.1000
N0135 G01 X1.1619 Y1.1706 Z-0.1000
N0137 G01 X1.1595 Y1.1570 Z-0.1000
N0139 G01 X1.1571 Y1.1434 Z-0.1000
N0141 G01 X1.1546 Y1.1299 Z-0.1000
N0143 G01 X1.1537 Y1.1250 Z-0.1000
N0145 G01 X1.1250 Y1.1250 Z-0.1000
N0147 G00 X1.1250 Y1.1250 Z 0.1
N0149 G00 X0 Y0
N0151 M05
N0153 M02

RICH ( Don't include my name in the code as it dosen't comand a movement) :)
« Last Edit: November 03, 2008, 06:45:51 PM by RICH »

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: need help with g code and cutter comp issue
« Reply #6 on: November 03, 2008, 07:58:33 PM »
How about this?

G40
G20
M3
G0 Z0.1250
G0 X-1.0000 Y-0.6000 Z0.1250
G1 X-1.0000 Y-0.6000 Z-0.1000 F6.6
G41D1
G1 X0.0385 Y-0.6000 Z-0.1000 F6.6
G1 X0.0385 Y1.7500 Z-0.1000
G1 X-1.0000 Y1.7500 Z-0.1000
G1 X-1.0000 Y-0.6000 Z-0.1000
G1 X0.0770 Y-0.6000 Z-0.1000
G1 X0.0770 Y1.7500 Z-0.1000
G1 X-1.0000 Y1.7500 Z-0.1000
G1 X-1.0000 Y-0.6000 Z-0.1000
G1 X0.1155 Y-0.6000 Z-0.1000
G1 X0.1155 Y1.7500 Z-0.1000
G1 X-1.0000 Y1.7500 Z-0.1000
G1 X-1.0000 Y-0.6000 Z-0.1000
G1 X0.1540 Y-0.6000 Z-0.1000
G1 X0.1540 Y1.7500 Z-0.1000
G1 X-1.0000 Y1.7500 Z-0.1000
G1 X-1.0000 Y-0.6000 Z-0.1000
G1 X0.1925 Y-0.6000 Z-0.1000
G1 X0.1925 Y1.7500 Z-0.1000
G1 X-1.0000 Y1.7500 Z-0.1000
G1 X-1.0000 Y-0.6000 Z-0.1000
G1 X0.2310 Y-0.6000 Z-0.1000
G1 X0.2310 Y1.7500 Z-0.1000
G40
G1 X-1.0000 Y1.7500 Z-0.1000
G0 X-1.0000 Y1.7500 Z0.1250
G0 X-1.0000 Y-0.6000 Z0.1250
G1 X-1.0000 Y-0.6000 Z-0.1000 F6.6
G41P0.25
G1 X0.0314 Y-0.6000 Z-0.1000 F6.6
G3 X0.0219 Y1.7500 Z-0.1000 I-2.2114 J1.1660
G40
G1 X-1.0000 Y1.7500 Z-0.1000
G0 X-1.0000 Y1.7500 Z0.1250
M5
M30
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline RICH

*
  • *
  •  7,341 7,341
    • View Profile
Re: need help with g code and cutter comp issue
« Reply #7 on: November 04, 2008, 06:41:44 AM »
Gerry,
Shows that there are a lot of diifferent ways to machine a part and generate the Gcode.
All depends on how your going to set it up. Not sure you ran the code, looks like the corner is being cut off.
But it's early in the morning. ;)
RICH

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: need help with g code and cutter comp issue
« Reply #8 on: November 04, 2008, 06:48:40 AM »
I coded to the same position as the OP. I believe the area you circled is below the actual part. The bottom of the part should be at the top of your red circle.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html