What's new
What's new

#### MazatrolMatrix

##### Aluminum
I asked over at the Mazak forum but I didn't get many replies so thought I'd ask here.

I programmed an arc lead in 90° into a thread milling cut, climb milling from the bottom of the hole, but the machine chooses to start 90° from the final position of the lead in arc, instead of the programmed position which is 90° from the thread diameter, but more than 90° for the lead in arc.

Example: M18x1.5 thread. Inner diam 16.5.
Starting point have clearence 0.5 from inner diameter. So (16.5/2) -0.5

Tool: 7.5 diameter mill.

Radius of m18 = X (9 for M18)
Start point Y: (16.5/2)-0.5

Then (X-R)^2 + (Y-0.5)^2 = R^2

This will then result in lead in arc R = 7.836

The offset to center of this radius from Center of thread is then X-R = 1.16.

The code:

N1 G1G90G40 Z-13.375
N2 G91G41D1 X-7.75 Y0
N3 G3 X7.75 Y-9 Z0.375 R7.836
N4 X0 Y0 Z1.5 J9 I0
N5 X7.75 Y9 R7.836 Z0.375

This results in the machine Wanting to start at the center of the lead in arc at -1.16 instead of Y0 which the program says. This causes the Z pitch movement at block N3 to be less than 0.375 since the angle would be less than 90° in relation to the thread diameter. The value would instead be around Z0.34.

It isn't a problem but I'd like to understand why.

Example:

#### GENERALDISARRAY

##### Hot Rolled
I think the problem is there in your Gangfrasm.

#### sinha

##### Titanium
If you post your drawing, with dimensions, it will be easier to analyse your program.

#### MazatrolMatrix

##### Aluminum
If you post your drawing, with dimensions, it will be easier to analyse your program.
Hello Sinha,

Here is an example.

Inner diameter 16.5.

X = 9
Y = 0.5 (16.5/2-0.5)

I program from the center of the big circle so that I can easily calculate 1.5/4 for Z lead movement, so the Arc Lead in is more than 90•, however it automatically wants to start 90 degrees from the end point anyway. It starts 0 degrees from Arc lead in center, and so 1.5/4 no longer applies and an additional calculation is needed, which isnt a problem but the question is why..

Does it make sense?

#### Attachments

• E76EE855-8B60-4ABF-BA52-82E6250E683A.jpeg
1.6 MB · Views: 6
Last edited:

#### sinha

##### Titanium
I have not fully understood it, but can you have Y movement in the G41 block, instead of X movement? (Can also be done outside the hole and then brought down)
This will not make any difference on Fanuc, but Mazak may behave slightly differently in radius compensation

#### MazatrolMatrix

##### Aluminum
I have not fully understood it, but can you have Y movement in the G41 block, instead of X movement? (Can also be done outside the hole and then brought down)
This will not make any difference on Fanuc, but Mazak may behave slightly differently in radius compensation
I’m sorry for not explaining it well, I’ll try your idea but I’ll try explaining it better.

The green circles represents thread minor and major diameter. Purple circle is the arc which is used to enter the cut. Blue line represents this circles center point. The center of this circle is offset from the center of the thread.

Position in my program is in line with thread center, which is the purple point. This point is 90 degrees from the end of the lead in arc or start position of thread, from the THREAD circles center. However from lead in arc center, this would be more than 90degrees.

The machine starts at the 90d point of the lead in arc even though that isnt the programmed point.

Since I’m thread milling, lead in should be with a movement in Z, calculated from the pitch and starting point of the lead in arc in degrees from the thread. If 90 degrees in the perspective of thread, the lead in will be pitch/4. In this case 1.5/4 = 0.375 mm in Z.
Since the actual starting point becomes less than 90 degrees from thread center, I need to calculate this angle to figure out the actual Z movement to enter the cut.

Lets say the angle becomes 86. Now the calculation would be 1.5 / (360/86) = ~ 0.35

#### Attachments

• 4A455B3D-EAE4-4CD2-A591-52BF64E1B6E1.jpeg
2.3 MB · Views: 10

#### angelw

##### Diamond
I’m sorry for not explaining it well, I’ll try your idea but I’ll try explaining it better.

The green circles represents thread minor and major diameter. Purple circle is the arc which is used to enter the cut. Blue line represents this circles center point. The center of this circle is offset from the center of the thread.

Position in my program is in line with thread center, which is the purple point. This point is 90 degrees from the end of the lead in arc or start position of thread, from the THREAD circles center. However from lead in arc center, this would be more than 90degrees.

The machine starts at the 90d point of the lead in arc even though that isnt the programmed point.

Since I’m thread milling, lead in should be with a movement in Z, calculated from the pitch and starting point of the lead in arc in degrees from the thread. If 90 degrees in the perspective of thread, the lead in will be pitch/4. In this case 1.5/4 = 0.375 mm in Z.
Since the actual starting point becomes less than 90 degrees from thread center, I need to calculate this angle to figure out the actual Z movement to enter the cut.

Lets say the angle becomes 86. Now the calculation would be 1.5 / (360/86) = ~ 0.35
The following picture is the tool path that is actually being described by the code listed in your first Post, which is quite different to what you seem to want to achieve according to the picture in your last Post; the centre of the Lead In, Lead Out is not where you have drawn it.

The Lead In and Lead Out are actually through a 98.543deg Arc. If you want to Lead In and Out through 90deg, either make a small Increment of 1.164 to the actual centre of the Lead In Arc before applying the Cutter Radius Comp or apply the Cutter Radius Comp in an X/Y move to the start of the Lead In Quadrant.

This results in the machine Wanting to start at the center of the lead in arc at -1.16 instead of Y0 which the program says. This causes the Z pitch movement at block N3 to be less than 0.375 since the angle would be less than 90° in relation to the thread diameter. The value would instead be around Z0.34

Starting from Y-1.16 (or more precisely Y-1.164) will actually result in a 90deg arc, not less. Using "R" Format allows the Control to calculate the Arc Centre.

Regards,

Bill

#### MazatrolMatrix

##### Aluminum
The following picture is the tool path that is actually being described by the code listed in your first Post, which is quite different to what you seem to want to achieve according to the picture in your last Post; the centre of the Lead In, Lead Out is not where you have drawn it.

View attachment 394161

The Lead In and Lead Out are actually through a 98.543deg Arc. If you want to Lead In and Out through 90deg, either make a small Increment of 1.164 to the actual centre of the Lead In Arc before applying the Cutter Radius Comp or apply the Cutter Radius Comp in an X/Y move to the start of the Lead In Quadrant.

Starting from Y-1.16 (or more precisely Y-1.164) will actually result in a 90deg arc, not less. Using "R" Format allows the Control to calculate the Arc Centre.

Regards,

Bill
Hello Bill,

We misunderstand each other. Your drawing is actually what I wanted to represent in my sketch. The blue line represent the centre of the lead in arc.

Anyway, yes, the issue is that I know I'm programming a 98.5° arc, so my code is as intended. But the machine ignores that and automatically wants to start at the quadrant start, or 90°. Almost likes it can't start in the middle of a quadrant? So the machine actually does the Shift to Y-1.16 by itself. And I don't understand why.

Is it because G41 demands a move in Y and X so X7.75 Y0 isn't allowed or what is the issue here..

And since it starts at the start of a quadrant in the lead in arc, and not between them as I want (which would be at the start of quadrant according to thread center, or 90°) the result is that Z shift of the lead in arc is not 1.5/4 or 0.375.

Last edited:

#### angelw

##### Diamond
As a test, try the following:

G90 G00 X0.000 Y0.000
G01 Z-13.375 F_ _
G91 G01 X0.000 Y-1.164 F_ _
G41 G01 X-7.749 Y1.164 D01
G03 X7.749 Y-9.000 Z0.375 I7.749 J-1.164 F_ _
G03 X0.000 Y0.000 Z1.500 I0.000 J9.000
G03 X7.749 Y9.000 Z0.375 I0.000 J7.836
G40 G01 X-7.749 Y-1.164
G01 X0.000 Y1.164 F_ _

Regards,
Bill

Last edited:

#### MazatrolMatrix

##### Aluminum
As a test, try the following:

G90 G00 X0.000 Y0.000
G01 Z-13.375 F_ _
G91 G01 X0.000 Y-1.164 F_ _
G41 G01 X-7.749 Y1.164 D01
G03 X7.749 Y-9.000 Z0.375 I7.749 J-1.164 F_ _
G03 X0.000 Y0.000 Z1.500 I0.000 J9.000
G03 X7.749 Y9.000 Z0.375 I0.000 J7.836
G40 G01 X-7.749 Y-1.164
G01 X0.000 Y1.164 F_ _

Regards,
Bill
I haven't tried this out yet, but it turns out there were nothing wrong. The machine showed the coordinates for the cutters center, and in order for the cutter to place itself tangent to the radius 8.5° from centerline, it had to move away from X0. And so this point of tangency while at 98.5 for the lead in arc, is 90° in relation to the thread so Z0.375 is correct..

Thanks for the help.

#### sinha

##### Titanium
can you have Y movement in the G41 block, instead of X movement?
Does this make any difference?

#### MazatrolMatrix

##### Aluminum
Have another question related to this. It seems to be suggested that when using multi teeth thread mills in particular, you should take the thread pitch in consideration during the lead out/in arcs. That makes sense of course, otherwise we would get a small area where the threads are grooves instead.

However it is suggested that this is with respect to the lead in arc and not the thread major diameter. For example milling a pitch of 4mm. If you move out 45° degrees from Center, and then make a lead in arc with 90° movement, it is suggested that you program pitch/4 for the lead in movement because 360/90. But this 90° arc is not a 90° movement with respect to the major diameter, so the helix angle of the lead in would be steeper than the helix angle of the thread, and would result in a small form error of the thread(?). The bigger the lead in arc, the smaller the error.

Peter Smid's book also suggests this approach.

So for the correct movement of Z axis in lead in/out, shouldn't this be calculated with respect to the helix angle of the thread, rather than amount of degrees traveled in arc lead in/out?

#### sinha

##### Titanium
I believe, some form error is always there in thread milling, because the cutting is not parallel to the helix.

#### guythatbrews

##### Stainless
Regarding the Z motion during lead-in/out, the helix angle of the cutter is never the same as the thread helix angle. But cutter and thread  lead are the same.

For lead-in/out cutter axial movement I use the lead X (portion of full turn during lead in/out).

#### MazatrolMatrix

##### Aluminum
I believe, some form error is always there in thread milling, because the cutting is not parallel to the helix.
Yes, I just think that programming the lead per portion of a full turn for the lead in/out should introduce more error than instead trying to alter it to produce the same helix angle.
If you use a small arc lead in for a big thread, the helix would be a lot different and you'd be better of altering it to how far along the arc of the major diameter you are traveling instead, and calculating the amount of axial movement based on that instead.

Maybe I'm wrong. I suppose I am since everyone recommends differently, but I can't really grasp it.

#### Attachments

• IMG_20230901_144426282.jpg
1.9 MB · Views: 0
Last edited:

#### guythatbrews

##### Stainless
Think of it this way. Keeping the lead constant, a smaller PD has a larger helix angle, larger PD has a smaller helix angle. Taking that to the extremes, a PD of 0 has an infinite HA, an infinite PD has a zero helix angle. Now realize the lead is the same for all these scenarios.

For a lead in/out of angle A degrees, use an axial move of A(lead)/360.

#### MazatrolMatrix

##### Aluminum
I hear you. The lead is the same for all threads. But when the lead in arc starts cutting at the minor thread diameter, perhaps at this moment there is 1mm axial movement left for that arc, but /10 of that with respect to the major diameter.

And so when the mill has taken one full revolution, the overlap there are the end of the movement where the lead in intersected, there could potentially be a form error due to the different angles. A minute one perhaps.

I see different approaches for this everywhere, for this example (and others like it) they have choosen to make the lead in arc A(lead)/360 with respect to pitch diameter centerline, instead of the lead in arc. So it has an axial movement of 0.375 instead of 0.75 for the 90° lead in.

#### Attachments

• Screenshot_20230901-211207.png
555.4 KB · Views: 0

#### guythatbrews

##### Stainless
I hear you. The lead is the same for all threads. But when the lead in arc starts cutting at the minor thread diameter, perhaps at this moment there is 1mm axial movement left for that arc, but /10 of that with respect to the major diameter.

And so when the mill has taken one full revolution, the overlap there are the end of the movement where the lead in intersected, there could potentially be a form error due to the different angles. A minute one perhaps.

I see different approaches for this everywhere, for this example (and others like it) they have choosen to make the lead in arc A(lead)/360 with respect to pitch diameter centerline, instead of the lead in arc. So it has an axial movement of 0.375 instead of 0.75 for the 90° lead in.
In the example you provided, it's a 45* lead in, 45* lead out, not 90*, so .375 makes perfect sense.

To think about it another way, envision a thread with pitch diameter PD and lead L. Imagine the thread mill following the thread. Now imagine a thread of the same PD -.001" and the same L. The helix angle has changed but the threadmill will track the smaller thread without touching the bigger thread. Keep making the PD smaller with the same L and it's easy to see the threadmill will track without touching the first thread, even though each successively smaller PD has a higher helix angle. You can see that this constant lack of interference is independent of the angular position of the cutter.

Now threadmill a part with lead L and straight in radial feed along the x axis to finished size at the start. Make the starting depth 1". Now drop the threadmill in on the center of the hole to the same 1" deep. Start spiraling out an arbitrary amount each rev while moving the same lead L each rev. You have to start the spiral at the x axis. It's a bit easier to envision if you start spiraling at x0.1. Eventually the threadmill will enter into the thread perfectly centered between both flanks. This spiral motion is analgous to an tangential lead in or out, no matter how many degrees it encompasses.

#### MazatrolMatrix

##### Aluminum
In the example you provided, it's a 45* lead in, 45* lead out, not 90*, so .375 makes perfect sense.

To think about it another way, envision a thread with pitch diameter PD and lead L. Imagine the thread mill following the thread. Now imagine a thread of the same PD -.001" and the same L. The helix angle has changed but the threadmill will track the smaller thread without touching the bigger thread. Keep making the PD smaller with the same L and it's easy to see the threadmill will track without touching the first thread, even though each successively smaller PD has a higher helix angle. You can see that this constant lack of interference is independent of the angular position of the cutter.

Now threadmill a part with lead L and straight in radial feed along the x axis to finished size at the start. Make the starting depth 1". Now drop the threadmill in on the center of the hole to the same 1" deep. Start spiraling out an arbitrary amount each rev while moving the same lead L each rev. You have to start the spiral at the x axis. It's a bit easier to envision if you start spiraling at x0.1. Eventually the threadmill will enter into the thread perfectly centered between both flanks. This spiral motion is analgous to an tangential lead in or out, no matter how many degrees it encompasses.

First, I agree with it being 45° and that 0.375 makes perfect sense. However with respect to the lead in arc center, the tool travels 90°(?) And thus some sources say it should then be programmed wih lead/degrees traveled for the lead in arc, which makes no sense at all to me. Peter smids book says that's correct, as one example. I'll post a picture of it.

I don't have the capacity to visualize your first scenario in my mind and would need a animation for it. But I follow along the other one fine I think.

#### Attachments

1.3 MB · Views: 0

#### guythatbrews

##### Stainless
Pretty, pretty, pretty sure the last reference is incorrect. And you are correct also about the lead in angle of 90* from the arc center. I'm glad this makes no sense to you because it doesn't make sense. The lead-in z motion must be calculated from the thread center, not the lead-in arc center.

Replies
3
Views
423
Replies
14
Views
964
Replies
5
Views
256
Replies
18
Views
1K
Replies
41
Views
2K