newbie tool diamter compensation problem

More
22 Jun 2014 06:35 #48173 by spskeyes
Hi All,

I am new to cnc and trying to engrave a square (0.5 in. x 0.5 in. outside edge) into aluminum with a sherline 3-axis cnc mill using tool diamteter compensation. The program is below, created with the help of inkscape. It works perfectly, the square is exactly the size i want, except that the last cut line overshoots on the Y axis by about 1/2 the tool diameter. Can anyone see what I have done wrong?

Thanks!

%
(Header)
(Generated by gcodetools from Inkscape.)
(Using default header. To add your own header create file "header" in the output dir.)
M3
(Header end.)
G21 (All units in mm)

(Start cutting path id: rect3473)
(Change tool to Default tool)

G00 Z5.000000
G42 D1
G00 X0.074466 Y12.625551 (comp intro line)

G01 Z-0.125000 F100.0(Penetrate)
G01 X12.625534 Y12.625551 Z-0.125000 F400.000000
G01 X12.625534 Y0.074480 Z-0.125000
G01 X0.074466 Y0.074480 Z-0.125000 (this line overshoots position reached at comp intro line by about 1/2 tool diameter)
G00 Z5.000000

(End cutting path id: rect3473)


(Footer)
M5
G00 X0.0000 Y0.0000
M2
(Using default footer. To add your own footer create file "footer" in the output dir.)
(end)
%

Please Log in or Create an account to join the conversation.

More
22 Jun 2014 21:19 #48181 by ArcEye
Hi

This would be a very good project to learn coding by hand, CAD/CAM seems overkill.

I am not sure exactly what dimensions you started with, it looks as though you are using cutter comp and adjusting the coordinates.

If you write a simple program to cut a 12.5mm square like so
G40 G90
G54
G21 G17
G8

S600 M3

G00 Z5.000000
G42 D1
G00 X0 Y12.5

G01 Z-0.125000 F100
G01 X12.5 Y12.5 F400
G01 X12.5 Y0 
G01 X0 Y0
G01 X0 Y12.5 
G00 Z5

G40

M5
G00 X0 Y0
M2

Because you have told the interpreter that the cutter diameter is 1mm and you want to stay to the right side of the line (G42 D1)
all you need to do is program the finished size you actually want, in this case 12.5 mm

The plot from the cut below shows that it takes a course 0.5mm inside the line all the way around




regards
Attachments:

Please Log in or Create an account to join the conversation.

More
22 Jun 2014 23:59 - 23 Jun 2014 00:43 #48182 by spskeyes
Thanks for the reply. The example code you supplied does the same overshoot on the same cut. It seems like something is wrong with my configuration external to the program.
The tool is 0.0mm length and 3.175mm diameter. I think G42 D1 specifies the first tool in my tool list (which is what I want), not a tool with diameter 1mm.

I have been able to get the cut I want by turning off tool compensation and turning it back on right before the cut that always overshoots. The resulting code looks like this:
G40 G90
G54
G21 G17
G8

S600 M3

G00 Z5.000000
G42 D1
G00 X0 Y12.5

G01 Z-0.125000 F100
G01 X12.5 Y12.5 F400
G01 X12.5 Y0 
G01 X0 Y0
G40 (added this)
G42 D1 (added this)
G01 X0 Y12.5 
G00 Z5

G40

M5
G00 X0 Y0
M2

This should no be needed. Any idea what the problem might be?
Last edit: 23 Jun 2014 00:43 by spskeyes. Reason: More information

Please Log in or Create an account to join the conversation.

More
23 Jun 2014 03:53 #48186 by ArcEye

I think G42 D1 specifies the first tool in my tool list (which is what I want), not a tool with diameter 1mm.


Well unfortunately you are wrong, D stands for diameter
www.linuxcnc.org/docs/html/gcode/gcode.html#sec:G41_1-G42_1

I am rather unsure as to why the first 3 sides would not have overcut.

The other alternative is to program 12.5mm minus cutter radius, with no cutter comp, does this overcut?
If so there may be something more fundamentally wrong

regards

Please Log in or Create an account to join the conversation.

More
23 Jun 2014 06:14 #48189 by spskeyes
No, I am not wrong. In my context D stands for tool number:
www.linuxcnc.org/docs/html/gcode/gcode.html#sec:G41-G42

There is no overcut when I don't use cutter comp.

Thanks

Please Log in or Create an account to join the conversation.

More
23 Jun 2014 13:28 #48194 by ArcEye
Apologies, think I had word blindness.
I was looking at 42 D1 and seeing 42.1 D1, even in my prog :blush:

Please Log in or Create an account to join the conversation.

More
23 Jun 2014 15:08 #48195 by Rick G
As ArcEye showed it is a good idea to start the program with a preamble that puts the machine in a know state...
G40 G90
G54
G21 G17
G8

What position is the machine in when you start the program?

perhaps try changing this...

%
(Header)
(Generated by gcodetools from Inkscape.)
(Using default header. To add your own header create file "header" in the output dir.)
M3
(Header end.)
G21 (All units in mm)

(Start cutting path id: rect3473)
(Change tool to Default tool)

G00 Z5.000000
G42 D1
G00 X0.074466 Y12.625551 (comp intro line)

....rest of program

To

%
(Header)
(Generated by gcodetools from Inkscape.)
(Using default header. To add your own header create file "header" in the output dir.)
M3
(Header end.)
G21 (All units in mm)

(Start cutting path id: rect3473)
(Change tool to Default tool)

G00 Z5.000000
G42 D1

G00 X-2 Y10

G00 X0.074466 Y12.625551 (comp intro line)

...rest of program

Are you using backlash compensation?

Rick G

Please Log in or Create an account to join the conversation.

More
23 Jun 2014 22:37 #48203 by spskeyes
Thanks Rick G I had tried adding in another move like that already but it didn't help. I start the program with the machine in the home (0,0,0) position.

The overshoot always happens on the last cut / edge of the square. However, if I continue on to re-trace half of the fist cut (first edge of the square) then the machine won't overshoot because it follows a previous cut

G01 X0.074466 Y0.074480 Z-0.125000 (this line overshoots position unless I add the next line)
G01 X12.625534 Y6 Z-0.125000 (Y6 is about half the line already cut on the first pass)

I found an example of cutting out the inside profile of a square with tool comp and they seem to arc in and out of the cut. I'm not sure why this is needed but I guess its what i have to do. See Figure 5 here:
linuxcnc.org/docs/html/gcode/tool_compensation.html#_examples

Please Log in or Create an account to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum