What's new
What's new

G76 multi-start threading error

ChrisE

Plastic
Joined
Oct 10, 2020
Location
Mukilteo, WA
I recently started working on a new part that requires a double-helix oil groove on the inside, oriented 180* from each other, aligned with other features on the part, and intersecting with other grooves along the same length. The G76 code I found online in another forum and cross-checked with my programming manual seems like it should work, but every time it goes to start the threading cycle, it alarms out with "P32 Illegal Address". I went into the settings and changed the tape mode to F15 to run the necessary single-line G76 code.

The machine is a Mori Seiki NLX2500MC, M730BM NC controller

Code:

G97 S400
G00 X1.8
Z-1.5503
G76 X1.9458 Z-2.7882 K.038 D.01 F1.4815 A0 P1 Q0
G00 X1.8
G76 X1.9458 Z-2.7882 K.038 D.01 F1.4815 A0 P1 Q18000
G00 X1.8


I've tried messing with the D, A, and Q codes, tried adjusting the spindle speed, combed through my programming and operator's manuals, and I can't find anything
 
Last edited:
My 15T manual does not show Q as an allowed address in G76. What control is behind the Mori M730BM overlay?
honestly, I have no idea and my programming/operation manuals don't seem to have any info beyond "Applicable NC unit: M730BM" on the front cover
 
A bit of googling makes me think it is Mitsubishi based. Drop the Q and see if it runs. If so, then maybe Mitsubishi uses an alternative address to make a shift in the start position.
 
I recently started working on a new part that requires a double-helix oil groove on the inside, oriented 180* from each other, aligned with other features on the part, and intersecting with other grooves along the same length. The G76 code I found online in another forum and cross-checked with my programming manual seems like it should work, but every time it goes to start the threading cycle, it alarms out with "P32 Illegal Address". I went into the settings and changed the tape mode to F15 to run the necessary single-line G76 code.

The machine is a Mori Seiki NLX2500MC, M730BM NC controller

Code:

G97 S400
G00 X1.8
Z-1.5503
G76 X1.9458 Z-2.7882 K.038 D.01 F1.4815 A0 P1 Q0
G00 X1.8
G76 X1.9458 Z-2.7882 K.038 D.01 F1.4815 A0 P1 Q18000
G00 X1.8


I've tried messing with the D, A, and Q codes, tried adjusting the spindle speed, combed through my programming and operator's manuals, and I can't find anything
With the constraints you've got, you'd be much better off doing that with the C axis as opposed to a threading cycle.
 
not sure if this is applicable but some machines don’t machine multi start. I stand to be corrected but if the spindle has a single pulse per revolution encoder you need to adjust your thread start point to get multi start.
 
not sure if this is applicable but some machines don’t machine multi start. I stand to be corrected but if the spindle has a single pulse per revolution encoder you need to adjust your thread start point to get multi start.
The pulse is single only. It is also called 1-turn pulse. Q decides the delay in starting the feed motion.
Yes, adjusting the start Z is another way for cutting multi-start threads. This method has to be used with 2-block G76 on Fanuc.
 
With the constraints you've got, you'd be much better off doing that with the C axis as opposed to a threading cycle.
That's my backup plan if I cant get this to work, but I really want to figure out how to make this code work. I have another work order to keep me busy in the meantime 🤷‍♂️
 
not sure if this is applicable but some machines don’t machine multi start. I stand to be corrected but if the spindle has a single pulse per revolution encoder you need to adjust your thread start point to get multi start.
That's just it, I cant change the start point since the spiral starts and ends inside the part, hence the F15 code
 
A bit of googling makes me think it is Mitsubishi based. Drop the Q and see if it runs. If so, then maybe Mitsubishi uses an alternative address to make a shift in the start position.
The start position cant be changed due to the spiral starting and ending within a specific span of the part, so the Q is absolutely vital here
 
I recently started working on a new part that requires a double-helix oil groove on the inside, oriented 180* from each other, aligned with other features on the part, and intersecting with other grooves along the same length. The G76 code I found online in another forum and cross-checked with my programming manual seems like it should work, but every time it goes to start the threading cycle, it alarms out with "P32 Illegal Address". I went into the settings and changed the tape mode to F15 to run the necessary single-line G76 code.

The machine is a Mori Seiki NLX2500MC, M730BM NC controller

Code:

G97 S400
G00 X1.8
Z-1.5503
G76 X1.9458 Z-2.7882 K.038 D.01 F1.4815 A0 P1 Q0
G00 X1.8
G76 X1.9458 Z-2.7882 K.038 D.01 F1.4815 A0 P1 Q18000
G00 X1.8


I've tried messing with the D, A, and Q codes, tried adjusting the spindle speed, combed through my programming and operator's manuals, and I can't find anything
I think you have to use q in the first line of a two line format is it is mit control.
 
Problem solved! Turns out that the F15 format doesn't like decimals in its K & D functions.

This is the code I got to work:

G97 S400
G00 X1.8
Z-1.5503
G76 X1.9458 Z-2.7882 K0380 D0100 F1.4815 A0 P1 Q0
G00 X1.8
G76 X1.9458 Z-2.7882 K0380 D0100 F1.4815 A0 P1 Q18000
G00 X1.8
 
That's my backup plan if I cant get this to work, but I really want to figure out how to make this code work. I have another work order to keep me busy in the meantime 🤷‍♂️
Good that you got it to work, but if you still want to keep plan b up your sleeve, here's a simple macro I wrote for this purpose and used quite frequently. It's for Fanuc of course, so I'm not sure how easy it is to make it work on your control. Before calling the macro you must have the c axis engaged and homed out etc. and the tool in position to take the first pass. There is no X lead-in as this was used to start and stop in an ID groove (or go all the way through the part), you'd need to add that yourself if required.

O2000(HELICAL BROACHING)

(X FINAL DIAMETER)
(Z Z END POINT)
(H INCREMENTAL ROTARY DISTANCE)
(F LINEAR FEED RATE)
(Q DEPTH OF CUT)
(D SPRING PASSES)

#550=#5001(INITIAL X)
#551=#5002(INITIAL Z)
#552=#5005(INITIAL C)
#553=#550

WHILE[#553LT#24]DO1
G01Z#26H#11F#9
G00X[#550-[#18*2]]
Z#551C#552
#553=[#553+[#17*2]]
IF[#553GT#24]THEN#553=#24
X#553
END1

#554=-1
WHILE[#554LT#7]DO1
G01Z#26H#11F#9
G00X[#550-[#18*2]]
Z#551C#552
X#553
#554=#554+1
END1
M99
%
 
Good that you got it to work, but if you still want to keep plan b up your sleeve, here's a simple macro I wrote for this purpose and used quite frequently. It's for Fanuc of course, so I'm not sure how easy it is to make it work on your control. Before calling the macro you must have the c axis engaged and homed out etc. and the tool in position to take the first pass. There is no X lead-in as this was used to start and stop in an ID groove (or go all the way through the part), you'd need to add that yourself if required.

O2000(HELICAL BROACHING)

(X FINAL DIAMETER)
(Z Z END POINT)
(H INCREMENTAL ROTARY DISTANCE)
(F LINEAR FEED RATE)
(Q DEPTH OF CUT)
(D SPRING PASSES)

#550=#5001(INITIAL X)
#551=#5002(INITIAL Z)
#552=#5005(INITIAL C)
#553=#550

WHILE[#553LT#24]DO1
G01Z#26H#11F#9
G00X[#550-[#18*2]]
Z#551C#552
#553=[#553+[#17*2]]
IF[#553GT#24]THEN#553=#24
X#553
END1

#554=-1
WHILE[#554LT#7]DO1
G01Z#26H#11F#9
G00X[#550-[#18*2]]
Z#551C#552
X#553
#554=#554+1
END1
M99
%
Got a question for you about your local variable assignment on this one. Do you have some of your local variables set to standards? By that i mean I notice you call #24, #17 and #18 but there is not a variable defining expression for them in this macro that I see or a place to pass an argument. So I was guessing looking at this that you already have those set before you run the macro?
 
Got a question for you about your local variable assignment on this one. Do you have some of your local variables set to standards? By that i mean I notice you call #24, #17 and #18 but there is not a variable defining expression for them in this macro that I see or a place to pass an argument. So I was guessing looking at this that you already have those set before you run the macro?

Those are macro call argument variables, eg. when you call the macro with G65 or assign it to custom G code.

This site has a handy reference for fanuc macro b variables:


 
In the shown argument assignment 2, the prefix 1, 2, 3 etc are actually not written.
The first occurrence of I/J/K from left is interpreted as I1/J1/K1.
The second occurrence of I/J/K is interpreted as I2/J2/K2.
and so on.
1707400111709.png
Moreover, these are considered as sets of IJK.
For example, I J I J K is interpreted as I1 J1 I2 J2 K2 (it is K2, not K1)
Also, relative positions of IJK in a set are not interchangeable.
For example, I K J is interpreted as I1 K1 J2 (it is J2, belonging to the next set)
 
Last edited:
Those are macro call argument variables, eg. when you call the macro with G65 or assign it to custom G code.

This site has a handy reference for fanuc macro b variables:


Think that is what got me confused. I am used to seeing those called with a g65 and the way you used it in the "WHILE[#553LT#24]DO1" . had me wondering if there was a different application on Fanuc than on Haas. Not going to bs you i'm still a little confused but have a bit better understanding now.
 
Think that is what got me confused. I am used to seeing those called with a g65 and the way you used it in the "WHILE[#553LT#24]DO1" . had me wondering if there was a different application on Fanuc than on Haas. Not going to bs you i'm still a little confused but have a bit better understanding now.

That's what the comments at the start are - the macro call arguments.

i.e.

O2000(HELICAL BROACHING)

(X FINAL DIAMETER)
(Z Z END POINT)
(H INCREMENTAL ROTARY DISTANCE)
(F LINEAR FEED RATE)
(Q DEPTH OF CUT)
(D SPRING PASSES)

means you call it with:

G65 P2000 Xx Zx Hx Fx Qx Dx

and #24 is X
 
That's what the comments at the start are - the macro call arguments.

i.e.

O2000(HELICAL BROACHING)

(X FINAL DIAMETER)
(Z Z END POINT)
(H INCREMENTAL ROTARY DISTANCE)
(F LINEAR FEED RATE)
(Q DEPTH OF CUT)
(D SPRING PASSES)

means you call it with:

G65 P2000 Xx Zx Hx Fx Qx Dx

and #24 is X
Ah shit. For some reason I was thinking of this as a stand alone program not as a sub called with a G65. Derp on me the M99 is a dead give away.
 








 
Back
Top