Hello Guest it is March 28, 2024, 02:26:58 PM

Author Topic: Cutter Compensation - Help please  (Read 10000 times)

0 Members and 1 Guest are viewing this topic.

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Cutter Compensation - Help please
« Reply #10 on: August 17, 2007, 10:58:06 AM »
 ???The trouble with relying on an interpreter to write your code for you is that when you make changes you cannot understand where it is going wrong. You should have an original drawing of the part you are trying to mill ( or turn) and you should be able to follow the route of the cut (including the offsets). Follow the route until it comes to the line it is having trouble with and try and work out why it cannot do what it says it cannot do. It may be the offset is on the right and is suddenly on the left, or the tool has moved too far to set the new offset, or something like that. It is a simple logic step that it cannot do.

Once you can see what it cannot do, you will probably be able to do what you want to by making a small alteration in the code.  8)

I try and write most of my code longhand. It doesn't take all that long, and if I use a CAD drawing, I can add the roughing stages and I get the CAD to add the positions of each change of direction. Writing the code then becomes easier. I get my CAD drawing to add an outline equal to half the tool diameter and then don't bother with offsets.
Not me driving the engine - I'm better looking.

vmax549

*
Re: Cutter Compensation - Help please
« Reply #11 on: August 17, 2007, 06:38:36 PM »
I agrre that you should know how but sometimes the easy way to Learn is to study how the cam program does it in the code.

If you step though the code you can see both the code and the line being generated as an example.

(;-) TP

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Cutter Compensation - Help please
« Reply #12 on: August 19, 2007, 01:03:06 AM »
YOUr original code had offsets applied by sheetcam, and wasn't using comp. To use comp, you'd need g-code without the comp applied. Not sure if I offset the correct amount, but try this. I added leadin and leadout moves. the D in the G41 line is the tool #. it will use the tool diameter from the tool table. I think you can also remove the D and it will use the current tools' diameter. There may be some mistakes here, but it should give you the idea of how it works.


G21
G40 G90
M3 S500
G0 Z40
G0 X-336.0719 Y233.1693 Z0.1250
G1 X-336.0719 Y233.1693 Z0.0000 F500
G41D1
G1 X-331.0243 Y228.5000 Z-15.0000 F1500
G1 X122.0970 Y228.5000 Z-15.0000
G2 X124.6969 Y227.7707 Z-15.0000 I-0.0003 J-4.9998
G1 X328.0991 Y103.9605 Z-15.0000
G2 X330.5000 Y99.6897 Z-15.0000 I-2.5993 J-4.2715
G1 X330.5000 Y-99.6900 Z-15.0000
G2 X328.0993 Y-103.9544 Z-15.0000 I-4.9980 J0.0057
G1 X124.6952 Y-227.7657 Z-15.0000
G2 X122.0951 Y-228.5000 Z-15.0000 I-2.6084 J4.2657
G1 X-325.1264 Y-228.5000 Z-15.0000
G2 X-328.5000 Y-223.5496 Z-15.0000 I1.6215 J4.7298
G1 X-328.5000 Y-216.0000 Z0.0000
G1 X-328.5000 Y-137.0000 Z0.0000
G2 X-323.5000 Y-132.0000 Z0.0000 I5.0000 J0.0000
G1 X-265.5000 Y-132.0000 Z0.0000
G3 X-265.5000 Y-122.0000 Z0.0000 I0.0000 J5.0000
G1 X-323.5000 Y-122.0000 Z0.0000
G2 X-328.5000 Y-117.0000 Z0.0000 I0.0000 J5.0000
G1 X-328.5000 Y-73.5000 Z0.0000
G2 X-323.5000 Y-68.5000 Z0.0000 I5.0000 J0.0000
G1 X-283.5000 Y-68.5000 Z0.0000
G3 X-283.5000 Y-58.5000 Z0.0000 I0.0000 J5.0000
G1 X-323.5000 Y-58.5000 Z0.0000
G2 X-328.5000 Y-53.5000 Z0.0000 I0.0000 J5.0000
G1 X-328.5000 Y53.5000 Z0.0000
G2 X-323.5000 Y58.5000 Z0.0000 I5.0000 J0.0000
G1 X-283.5000 Y58.5000 Z0.0000
G3 X-283.5000 Y68.5000 Z0.0000 I0.0000 J5.0000
G1 X-323.5000 Y68.5000 Z0.0000
G2 X-328.5000 Y73.5000 Z0.0000 I0.0000 J5.0000
G1 X-328.5000 Y117.0000 Z0.0000
G2 X-323.5000 Y122.0000 Z0.0000 I5.0000 J0.0000
G1 X-265.5000 Y122.0000 Z0.0000
G3 X-265.5000 Y132.0000 Z0.0000 I0.0000 J5.0000
G1 X-323.5000 Y132.0000 Z0.0000
G2 X-328.5000 Y137.0000 Z0.0000 I0.0000 J5.0000
G1 X-328.5000 Y216.0000 Z0.0000
G1 X-328.5000 Y223.5000 Z0.0000
G2 X-323.5000 Y228.5000 Z-15.0000 I5.0000 J0.0000
G3 X-317.5000 Y234.5000 Z-15.0000 I0.0000 J6.0000
G40
G1 X-317.5000 Y234.5000 Z-15.0000
G0 X-317.5000 Y234.5000 Z0.1250
G0 X0 Y0
M5
M30
« Last Edit: August 19, 2007, 01:05:06 AM by ger21 »
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Cutter Compensation - Help please
« Reply #13 on: August 19, 2007, 01:30:23 AM »
Thank you. I'll try it. The lead in & lead out were already there (I think). The router goes to this position & plunges before the first cut ;
N0130 X-325.5000 Y231.0000
N0150 G00 Z0.0000
N0160 Z-15.0000
lead out and lead in for the second part ;
N0530 G00 X-323.5 Y231.0 Z0.0

N0540 G52 X-683 Y0.00 (Set Temp Offset)

N0000 (Filename: ~$Fig12LHmod008.tap)
N0010 (Post processor: Mach2.post)
N0020 (Date: 19/04/2007)
N0030 G21 (Units: Metric)
N0040 G40 G90
N0050 F1
N0070 (Process: Outside offset 0, Mill/Router, 5 mm diameter, 5 mm Deep)
N0090 M06 T1  (Mill/Router, 5 mm diameter)
N0130 X333.0000 Y223.5000
N0150 G01 Z-10.00 F1500
N0160 Z-15.0000
Final lead out ;
N0520 G01 Y225.5000 Z-15
N0530 G00 Z25.0000
N0540 M05

G52 X0 Y0 Z0 (Cancel Offset Shift)
N0580 Y460
N0590 X390

Are you saying that if I got Sheetcam to write the g-code without entering a tool diameter and then used D1 or D2 (or T1 or T2 - whatever) to set the tool offset for a perticular tool I could then write "G41 D1" (or "G41 T1") or "G41 T2"  for whichever tool diameter I then used ?

The reason I wanted to use tool offset in Mach3 is because I had made manual g-code changes to the code written by Sheetcam (for a 5mm dia tool) to perfect the programme. I've since discovered that a 3mm cutter is better and I had this crazy idea that I could tell Mach3 that I'm using a 3mm tool (using tool offset) and it would just make the code changes for me. The lead in & out were already written.

There are 2 parts to be cut in the programme (mirror image) - thus the temp offset - and they both have outside & inside cuts. Will the inside cuts be smaller with "G41 D1" set ?
thanks - Andy.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Cutter Compensation - Help please
« Reply #14 on: August 19, 2007, 09:19:02 AM »
Thank you. I'll try it. The lead in & lead out were already there (I think). The router goes to this position & plunges before the first cut ;
N0130 X-325.5000 Y231.0000
N0150 G00 Z0.0000
N0160 Z-15.0000

No, that's not a lead in move. See the attached pic for the lead-in and lead out move I added. Comp can not be added correctly (if at all, not sure) during a plunge move. Comp is applied from the point before the G41 (Tool center is at that location) to the position after the G41.

You can't use G41 T1, it must be G41 D1 for tool #1. You can also use G41 Px.xx, where x.xx is the tool radius. Or you can just use G41 and Mach will use the current tool.

Here's a sample with an inside cut and an outside cut which will hopefully clear things up for you.

One last thing. You technically don't need a lead out move, but I like to use it. If you don't, the tool will "jump" when comp is turned off. The lead out move gets the center of the tool back to the commanded position during the move, not abrubtly if you just turn off comp without it.

And yes, Id program sheetcam without the offsets, and manually add the leadin and leadout myself, as well as the G41. Unless sheetcam can do it. I don't use it, so I don't know.
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Cutter Compensation - Help please
« Reply #15 on: August 19, 2007, 09:53:18 PM »
Thank you. I can't see the inside cut. Do I have to enter a G42 prior to my inside (slot) cut ?Since this is a router why can't the compensation just come in before the plunge & compensation off after the tool raises ? The tool isn't cutting prior to plunging. The cut is fine like this with the 5mm cutter.
I dont' think I'm understanding the function of lead-in in my process.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Cutter Compensation - Help please
« Reply #16 on: August 20, 2007, 09:27:02 PM »
Did you download the g-code file I posted? That has the inside cut. You can apply the comp before the plunge, but you still need a lead in move. You can turn it off after you lift the tool, though.

When you're not using comp, the g-code specifies the position of the center of the tool. The lead in move lets the tool move from the center to the offset position. It can't be during a plunge, because mach wouldn't know which way to offset if your moving straight down.
Gerry

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

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