Hello Guest it is April 20, 2024, 10:53:03 AM

Author Topic: Cutter Compensation not reading tool diameter  (Read 1757 times)

0 Members and 1 Guest are viewing this topic.

Cutter Compensation not reading tool diameter
« on: October 20, 2020, 10:17:57 AM »
I have the following G-Code that I want to run repeatedly to cut out inlay groves for wood drums.  I want to change the tool diameter with G41 & G42 to slowly widen the grove to fit the inlays.  Inlays aren't necessarily consistent in width.

The code work, except it doesn't seem to be picking up the diameter for tool 1 and 2 (D1 & D2), but it works perfectly on tool 3 (D3).

I'm not seeing anything wrong with the code and am wondering if there's a setting in Mach4 that not set right for this to work on D1 & D2.

Thank you in advance for your help.


g0 g49 g40 g17 g80 g50 g90

g04 p2.
g53 g00 z0

M03
M08


G54 x0 y0.01 a0
z1.
g01 z-.25 f10.
G42 D2
y-.016 f10.
g90
g40
a720. f2000.
g90x0y0
G41 D2
y.016 f10.
g90
g40
a0. f2000.

z1.
G54 x0 y.295 a0
z1.

g01 z-.25f10.
G41 D1

x0 y.279
g90
G40
a720. f2000.

g90x0y0.295
G42 D1

x0 y.311 f10.
g90
G40
a0. f2000.

z1.
G54 x0 y-.295 a0
z1.

g01 z-.25 f10.
G41 D3

x0 y-.311
g90
g40
a720. f2000.
g90x0y-.295
G42 D3

x0 y-.279 f10.
g90
g40
a0. f2000.

g00 z1.
g53 z0.

M09
M05

g53 x1. y-8.

m30

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Cutter Compensation not reading tool diameter
« Reply #1 on: October 20, 2020, 08:19:25 PM »
What values do you have in offset diameter 1 and 2
« Last Edit: October 20, 2020, 08:21:06 PM by Graham Waterworth »
Without engineers the world stops
Re: Cutter Compensation not reading tool diameter
« Reply #2 on: October 21, 2020, 08:18:57 AM »
I'm changing it depending on how much wider I need to go, I use the same value in all three.  I go up 0.02 inches at a time till I have it dialed in for the inlay.

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Cutter Compensation not reading tool diameter
« Reply #3 on: October 21, 2020, 01:46:41 PM »
OK, you need to make sure your lead in has enough travel to apply the offset or it will try to do it in the main move.
Without engineers the world stops
Re: Cutter Compensation not reading tool diameter
« Reply #4 on: October 21, 2020, 02:12:47 PM »
I'm embarrassed to admit that I'm not sure what you're referring to.

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Cutter Compensation not reading tool diameter
« Reply #5 on: October 21, 2020, 04:50:31 PM »
If you want to use G41/42 compensation you have to plan for it in the g-code, to use comp correctly you have to feed on to the cutter path with a line and a blending tangential arc where the total movement is greater than the amount in the tool diameter offset, you say you are adjusting the size by 0.020" and your move is only 0.016" see red highlight.  Also your code is cancelling the comp with the G40 and no lead out move so you can get gouging if the direction of travel changes.

You need to lookup how to do G41/G42 compensation, there are lots of examples on here.

G54 x0 y0.01 a0
z1.
g01 z-.25 f10.
G42 D2
y-.016 f10.
g90
g40
a720. f2000.
g90x0y0
G41 D2
y.016 f10.
g90
g40
a0. f2000.
Without engineers the world stops

Offline thosj

*
  •  532 532
    • View Profile
Re: Cutter Compensation not reading tool diameter
« Reply #6 on: October 21, 2020, 04:59:28 PM »
Oops, I see Graham posted while I typing.

I THINK what Graham is saying is you need to be far enough away from the axis that's in the move where the tool diameter is applied for it to move to the point taking into consideration half the tool diameter.

That said, what you're saying is the EXACT same code works with D3, but NOT with D2 nor D1? If that's indeed true, it almost HAS to be the diameter in the tool table. If the code is different, than all bets are off.

Is that code hand written or generated by some CAM software? Is that A axis rotary or linear? Somehow that code doesn't look right, but not knowing how your A axis works, it's pretty hard to read and tell what's happening!!

It seems the move when the G41/G42 is being applied is very small, .016/.017, at least in the first couple. That means the tool has to be pretty tiny in order to apply the tool radius in that move!!

I'm probably all wet on this because I really can't make heads or tails of your code!!

Tom
--
Tom

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Cutter Compensation not reading tool diameter
« Reply #7 on: October 21, 2020, 05:11:53 PM »
His D3 moves are greater than the tool offset so it can move.
Without engineers the world stops
Re: Cutter Compensation not reading tool diameter
« Reply #8 on: October 21, 2020, 08:43:43 PM »
I didn't write the code, the person who made the custom CNC machine did, and I have no information available of how he did it.

I'm helping the guys in the shop, I know the basics of GCode as I'm a programmer and most of it makes sense to me but there are obvious nuances that escape me since I don't actually do this sort of work.

Yes D3 works but D1 and D2 doesn't

Explanation of what this does:
I'm not sure the best way to describe this, but this is a wood musical drum shell and it turns on the A axis.  Z is moving the cutting bit forward and back.  Y is the axis across the  up and down side of the drum where as X is the horizontal and generally stays at 0.0 as that keeps it centered on the turning A axis.
In this code there are 3 groves being cut.  It cuts the center one first.  When he's hitting Y0.016 that's the center grove then it's followed by two more groves on either side of the center one.

When they're cutting the groves into the shell with this, they change the diameter of the tools in 1,2, and 3 to slowly widen the grooves until it fits the wood inlay strip they're putting in.

Thanks for your input... it's been very helpful.

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Cutter Compensation not reading tool diameter
« Reply #9 on: October 22, 2020, 05:04:46 PM »
A picture of the set up may be helpful,  its possible to do this a different way that avoids the G41/42 issues and still allows you to use tool offsets to widen the grooves.
Without engineers the world stops