You need to have a lead in move, which is incredibly complicated to explain. Sometimes you need two. The lead in can be an arc or straight line. I recently read something on the Mach2 group about the lead in move being on the same line as G41/G42. But, I don't think it always has to be. Here code for a 2" circle (hole) using a 1/4" bit, with an arc for the lead in move. This displays correctly in Mach2's toolpath display, so I think it works. The center is at 0,0.
G0 Z0.1250
G0 X-0.1250 Y0.7500 Z0.1250
G42P0.125 (turn on offset right- P = tool radius)
G2 X0.0000 Y1.0000 Z0.0000 I0.1250 J0.0000 F20 (lead in move)
G2 X0.0000 Y1.0000 Z-0.1250 I0.0000 J-1.0000
G2 X0.0000 Y1.0000 Z-0.1250 I0.0000 J-1.0000
G0 X0.0000 Y1.0000 Z0.1250
G40 (turn off comp)
Instead of using P for the tool radius, you can also use D for the tool # in the tool table. G41D1 = Use Tool #1.
You should play around with some simple stuff until you get the hang of it. Here is code for a 2" square with a 1/4" bit.
G0 Z0.1250
G0 X4.0000 Y3.0000 Z0.1250
G1 X4.0000 Y3.0000 Z-0.1250 F10
G42P0.125 (turn on offset right- P = tool radius)
G1 X3.2500 Y3.0000 Z-0.1250 F20 (lead in move)
G1 X1.0000 Y3.0000 Z-0.1250
G1 X1.0000 Y1.0000 Z-0.1250
G1 X3.0000 Y1.0000 Z-0.1250
G1 X3.0000 Y3.1105 Z-0.1250 (I like to always start and end a little bit outside my part)
G40 (turn off comp)
Since I don't have my router finished, I haven't tested this. But I have done simulated runs in Mach2 which looked correct. I generated the code using my AutoCAD G-code macro.
Hope this helps.


LinkBack URL
About LinkBacks




