![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General CAM Discussion Discuss CAD/CAM software and Design software methods here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
Does anyone know the syntax for using G41/G42. I have some simple gcode that I'm running under Mach2, but I cant figure out how to use the G41/42 commands. Any help is appreciated. Regards Terry..... |
|
#2
| ||||
| ||||
| 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.
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#3
| ||||
| ||||
| Many many thanks for that, ger21. Much appreciated. I was trying to enter a diameter after the G41/42 I didn't realise you needed a P. That sounds odd. I don't mean you need the toilet. A reference text file would be handy for Gcode syntax's. Mach2 has a list of supported G/M codes, but no info on syntax, unless I missed something. Thanks again. Regards Terry..... |
|
#4
| ||||
| ||||
| The docs are kinda vague and imo quite confusing in regards to G41/G42. When using the P with G41/G42, you need to enter the RADIUS, not diameter. Also, if you look carefully at the arc lead-in move, you'll see that it can't be drawn in a CAD program, because the start and end are different distances from the center of the arc. Even more confusing, eh? Lets see if I can explain it. I'll use metric, maybe that will make it a little clearer.We'll do a clockwise leadin move, starting at 9:00. We'll use a 6mm tool, starting at 0,0. Move 1/2 the diameter to the left and position the tool. G0 x-3 y0 The center is 0,0. Next line is your tool offset. G42P3 Offset to the right 3mm radius tool. Now the tricky part. The next line has to finish at the offset position. G2 X0 Y6 I3 J0 The arc starts with a 3mm radius, but ends with a 6mm radius. Make sense? The arc lead in move needs to be tangent to the next move, or you'll get gouging. The next move can either be G1 X5(or whatever) Y6, Or a G2 to wherever you want. Imo, you should only use arc leadin moves for the inside of cutouts, as it's far to complicated to hand code all the time. Be aware that when doing cutouts, all inside corners need to have a radius at least as big as the tool radius, preferably a little bigger, or the tool will gouge the corner. Mach2 doesn't look ahead to see where it needs to go, so each line or arc needs to be tangent to the previous one or the tool will gouge the work. I'd draw some pictures, but I really don't have time right now. Hope this is helpful for you.
__________________ Gerry Mach3 2010 Screenset http://home.comcast.net/~cncwoodworker/2010.html (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Macro/Parametric Programming | screensnot | Fadal | 4 | 03-28-2005 08:45 PM |
| Cutter compensation woes!! | RBCMan | G-Code Programing | 7 | 02-16-2005 09:43 AM |
| Radius between tangents? | smythe | Rhino 3D | 6 | 10-29-2004 03:14 PM |
| Windows XP or Windows 2000 better with Mach2 | Beezer | Mach Software (ArtSoft software) | 2 | 10-18-2004 10:08 AM |
| G Code and Mach2 | InventIt | DIY-CNC Router Table Machines | 8 | 03-13-2004 01:46 PM |