What's new
What's new

G76 gang lathe threading issues

cncCrasher

Plastic
Joined
May 19, 2017
First off I have essentially zero CNC experience, I am trying to get a new machine our company bought running and no one is familiar with it's programming nor does anyone want to really try.
It is an Eguro Nuclet-10 with a fanuc 3T, probably 20 years old I really don't know.

So I downloaded a sample program for a 3T off of smartcam's site and keyed it in. It is supposed to turn down some stock leaving a bolt head, then drill it and then thread it. The sample had inputs at the threading part for 'D' and 'E', but those letters aren't even on the control. I think this control uses 'P' and 'Q' for threading so I used them and it appears to work.
My issue is I cannot figure out exactly what the numbers behind them do.
I've run that section about 100 times slightly changing the numbers and watching and recording the results and have learned a little.
It seems 'P' takes 4 digits and those digits tell the machine how far out from the root diameter to begin threading. Each digit after 'P' corresponds to the same digit after the decimal place of the root diameter, so that is working out when I leave 'Q' constant and just change 'P'.
But when I left 'p' constant and started altering 'Q' I was getting lost.
I did some research that said 'Q' tells the machine the minimum depth of cut per pass, but it didn't seem that way when I ran it over and over.
It seemed to almost do the same thing as 'P' and it varied how far out the tool went before making it's first cut. If I reduced "q" enough it would basically start so close to root it would only make one pass.
I bought a manual online and it says Nuclet-10GL and does not really explain this at all, so I think maybe it's for a slightly different machine.

Like I said, I have no experience with cnc's and I'm trying to make this my project since nobody else wants it and then I can make myself more valuable if I ever get good at it, so I apologize if some of these questions sound really basic and stupid. I just can't get anywhere doing regular internet searches.
 
Hello cncCrasher,
As you're referring to P and Q addresses and no alarm, your control is using the two Block G76 Threading Format, notwithstanding that you have made no mention of two G76 Blocks.The format that uses a D address is a Single Block format, now referred to as FS15 Format.

Although the Format that uses P and Q addresses is a two Block Format, the first Block can be omitted without the control raising an error. The reason is that the first Block sets values in parameters and are retained until changed by another execution of the parameter setting block of the two Block Format (the first Block in the two Block system).

The syntax of the two Block Format is as follows:
G76 P(n)(c)(a) Q_ R_
G76 X_ Z_ R_ P_ Q_ F_

Where in the First Block:

P address
(n) = number of finish passes
(c) = chamfer amount
(a) = included angle of thread form (threading tool angle)
Q = minimum DOC
R = Finish allowance

As stated earlier, the first G76 Block can be omitted without the control raising an alarm. If this Block is omitted, you should ensure that the parameter values previously set are compatible with the Thread being cut. It would be a safer option to include this block in your programs

Where in the Second Block:
X = Minor Diameter of Thread (Male Thread) - Major Diameter (Female Thread)
Z = Finish Z coordinate of Thread
R = Radius Value of Taper when cutting Tapered Threads. This can be omitted for Parallel Threads.
P = Height of Thread Form (radius value)
Q = DOC for first Threading Pass
F = Lead of Thread

As the Q address (First Threading Pass DOC) is used in the calculation of the DOC for subsequent Threading passes, this value should be made as large as the Threading Tool and Work-piece setup will accommodate. This fact is more important where Threads with large Thread Heights (coarse Thread Pitch) are being machined.

Regards,

Bill
 
ok, I did find some things when searching that mentioned what you said but I didn't really follow it.
The sample program I got did not use two lines for G76. It must not be correct for this unit because I found a few other odd issues too. One being that it used an R also that made the machine taper the thread, so I deleted that and it did a straight thread after.
I'm going to try adding in a line just like you said first thing Monday.
There is a line currently just before the G76 line that states root diameter and the end Z coordinate.
So I'm guessing I should leave that un touched and just add in a G76 under that right before the existing G76?

Thanks for the help, I'm sure I'll start making progress now.
 
ok, I did find some things when searching that mentioned what you said but I didn't really follow it.
The sample program I got did not use two lines for G76. It must not be correct for this unit because I found a few other odd issues too. One being that it used an R also that made the machine taper the thread, so I deleted that and it did a straight thread after.
I'm going to try adding in a line just like you said first thing Monday.
There is a line currently just before the G76 line that states root diameter and the end Z coordinate.
So I'm guessing I should leave that un touched and just add in a G76 under that right before the existing G76?

Thanks for the help, I'm sure I'll start making progress now.

Hello cncCrasher,
You need to post a copy of your code here for the Forum members to see to be better able to advise you. State the specifications of the Thread you're cutting and a correct example can be supplied for you to follow.

Regards,

Bill
 
Ok, so here is what I put in for the threading section.

N110 X0.89 Z0.05 M08;
N111 G76 P040029 Q06;
N115 G76 X0.6920 Z-1.0 P0137 Q0020 F0.1;

I'm trying to get the minimum depth of cut to be 6 thousanths just to verify the command, but it takes 2 every pass.
Going for a 3/4 bolt thread. I know my feedrate is most likely wrong I'm just not at that point yet

Edit: scratch the 2 thousanths a pass part. I realized the two lines were contradicting themselves so it was using the 2 from the second Q
 
Bill will be back for a much better explanation but until then a short answer is change both Q's to Q0060 and see if it does what you want?

Brent
 
here is something I wrote up for the other guys here at work It should pertain to your situation

OD Thread canned cycle
N1110(THD TOOL)
G0T1010
G97S300M3
G54X.8Z.1
M8
G76P020060Q0R0.
G76X.674Z-.62P380Q90F.0625
G0Z.1G80M9
X12.Z8.
M1

G76P020060Q0R0.
First two digits in P value is the amount of finish passes preformed at final diameter. Next two digits is the champher amount. Next two digits is the angle of the tool nose. Leave Q and R at zero.

G76X.674Z-.62P380Q90F.0625
P value is depth of thread per side. Q value is depth of first cut. Both values cannot have a decimal point. P=.038 and Q=.009 in this example.


you do not need to have 4 digits in the p and q parts. imagine it is reading it from the tenths on the the right and go out. such as "P10" is .0010 thousands. and "P100" is .0100 thousands.
 
Edit: scratch the 2 thousanths a pass part. I realized the two lines were contradicting themselves so it was using the 2 from the second Q

Hello cncCrasher,
That is not how it works.

First up, the default parameter setting for the Least Programmable Increment for Imperial Mode (G20) is 0.0001". Accordingly, the Q address value specified in the First Block of your example code will be 0.0006" and the Q address value specified in the Second Block will be 0.002".

The programmer instructs the control as to the size of the Thread's Major Diameter (Male Thread) by the Minor Diameter specified by X and the Thread Height argument specified by the P address in the Second G76 Block. In the following example of a 3/4 UNC (10TPI) Class 3A Male Thread, the following apply:

Major Diameter = 0.7500
Minor Diameter = 0.6309
Therefore:
Thread Height = 0.05955 (0.0596)

In theory, the Threading Tool can start at any diameter larger than the Major Diameter (Male Thread) and the control will always apply the correct First Pass DOC; even if the tool is started many inches away in X. The control does this by using the following algorithm

TPD = X + 2P - 2Q

Where:
TPD = Threading Pass Diameter
X = Minor Diameter
P = Thread Height
Q = DOC First Threading Pass

The DOC of each Threading Pass is influenced by the First Threading Pass DOC because the Q value of the second G76 Block is used in the calculation for each Threading Pass. The algorithm used for Cutting Amount Constant is:

DOC = Q x SQR(n)
Where:
Q = First Threading Pass value
n = Number of Threading Pass (1,2,3,etc)

The DOC is a value calculated to be applied from the Major Diameter (Male Thread). Accordingly, the previous algorithm, TPD = X + 2P - 2Q, can be expanded to:

TPD = X + 2P - 2 x (Q x SQR(n)

In addition to the above calculation for each successive DOC, the control compares the difference between the previous Threading Pass Diameter to that calculated for the next Threading Pass Diameter. If this difference divided by 2 is less than the minimum DOC specified by the Q address in the First G76 Block, then the new calculated Threading Pass Diameter is discarded and the Minimum DOC value is used to calculate the next Threading Pass Diameter.

In your example code, you specified a Minimum DOC of 0.0006 and a First Threading Pass of 0.002. Therefore, the first DOC would be:

DOC = Q x SQR(n)
DOC = 0.002 x SQR(1)
DOC = 0.002 (applied from the Major Diameter)

The Second Threading Pass DOC would be:
DOC = 0.002 x SQR(2)
DOC = 0.0028((applied from the Major Diameter)

As the difference between DOC of the current Threading Pass and that of the previous is 0.0008, still greater that the Minimum DOC set by the Q address of the First G76 Block, this calculated Threading Pass Diameter will be used.

The following example code is somewhere near where I would start.

N110 X0.900 Z0.25 M08
N111 G76 P010030 Q0020 R0
N115 G76 X0.6309 Z-1.0 P0596 Q0200 F0.1

In all of the P and Q addresses in the code above, the leading Zeros can be omitted without changing the value. The Trailing Zeros are significant and can't be omitted.

Assuming that Z0.0 is the start Z coordinate of your Thread, starting at Z0.05 is likely to result is slight Lead error at the start of the Thread. This is due to the Z axis having to accelerate from Zero to whatever the Slide Velocity may be, calculated by:

SV = RPM x F
Where:
RPM = Spindle Revs
F = Feed Rate

As the Slide Velocity increases so does the distance required for the Z axis to accelerate to the Slide Velocity correct for the Thread Lead being cut.


Regards,

Bill
 
Last edited:
Ok, I'm going to print this and read it by the machine.

One other question on G71 stock removal that I was just trying. I got it working pretty nice but some things seem odd.
So after homing the x and z I jogged it over and touched off an insert on the face and side of a piece of 1" aluminum. I entered those values in the tool one offset line. I then had tool 0101 go to x0 and z0 before starting the stock removal. So it rapids at the speed of light right smack up against the piece. It didn't crash but it makes me nervous as hell seeing it rocket right up that close before starting to make passes. Is that the way it should be programmed or am I doing something wrong letting it rapid up so close?
I'll copy my program, I had to shut down the machine just now though to do some other things so I might be off it till tomorrow.
 
Ok, I'm going to print this and read it by the machine.

One other question on G71 stock removal that I was just trying. I got it working pretty nice but some things seem odd.
So after homing the x and z I jogged it over and touched off an insert on the face and side of a piece of 1" aluminum. I entered those values in the tool one offset line. I then had tool 0101 go to x0 and z0 before starting the stock removal. So it rapids at the speed of light right smack up against the piece. It didn't crash but it makes me nervous as hell seeing it rocket right up that close before starting to make passes. Is that the way it should be programmed or am I doing something wrong letting it rapid up so close?
I'll copy my program, I had to shut down the machine just now though to do some other things so I might be off it till tomorrow.

Hello cncCrasher,
If you're saying that you move the tool to X0 Z0 as the start position before executing the G71 cycle, that would be wrong. Even if the G71 cycle were to be used for roughing an internal profile, it would be extremely unlikely that you would start the roughing cycle from X0.0.

Lets say that the work-piece diameter before machining was 1.0" and the G71 cycle was being used to rough an external profile, the X start position would be slightly larger than 1.0", say X1.040. You should also start the tool slightly clear of the work-piece in Z. Its common for there to be a machining allowance on the end of the work-piece to accommodate machining the face, but even if the end of the work-piece was Z0.0 with no machining allowance, it would still be poor form to locate the tool at Z Zero before executing the G71 roughing cycle.


Regards,

Bill
 
It would be helpful if you read the manual or some book once.
Some theoretical background followed by experimentation is a good and faster learning method.
 
It would be helpful if you read the manual or some book once.
Some theoretical background followed by experimentation is a good and faster learning method.


Im kinda curious if he has programmed a lathe before. This whole thread is stuff most kids learn in votech. Im starting to see why your screen name is CNC crasher.
 
The following example code is somewhere near where I would start.

N110 X0.900 Z0.25 M08
N111 G76 P010030 Q0020 R0
N115 G76 X0.6309 Z-1.0 P0596 Q0200 F0.1



Bill

Bill,
thanks for the help so far.
So I just tried the program as you wrote it and I deleted everything else I had in there but two lines above, which is where i think my problem is.
I put in:
N100 G00 T0101
N105 G97 S300 M04
(Then your three lines)

I used my tool one with the offsets entered as they were when I touched off at the edges of the piece. I'm sure this is where I'm screwing up but I don't know what I'm doing wrong so I'll just describe it.
When I hit start the tool went right smack to that exact edge of the piece from HOME and the display zeroed itself right then. Then the X moved out to 0.9 towards me standing there, basically moving away from the part, and the Z moved to the right away from the part also. Then when it started threading it did the motions correctly but never actually got to the part. Basically at the end it was still at +0.63 away in the x direction. The z was fine, it was passing over the part properly just not touching it.
I guess this is my issue now because I'm just not getting how to properly tell the machine where the part is. Kind of the same thing that was happening when I was trying stock removal. I used that same tool (I know it's not the correct tool I just wanted to see if it worked) and it just flew right up to the part and then re-zeroed and then my coordinates went from there. So in order to take material away I used X-0.25 and it started making passes and creeping in on the x-axis each time until it hit -0.25

Am I misunderstanding how the offsets should be entered?
 
Im kinda curious if he has programmed a lathe before. This whole thread is stuff most kids learn in votech. Im starting to see why your screen name is CNC crasher.

The answer to that would be no, never. I've never programmed anything before actually. Two weeks ago is the first time I've even seen Gcode. I've only worked in a machine shop for 2 years and never ran any machine at all prior to that. I've since used manual machines and I can do decent work on a manual lathe, including threading. I know what I want this machine to do I just don't know how to tell it to do it.
The manual I have is super unclear and I don't have anyone here to teach me, plus I think the manual is wrong because it explains a format with letters that aren't even on the control.
 
crasher...i'll bite.....heres an example and you can modify it to your numbers or just get a piece of aluminum and try it and then you'll be one more step ahead...this was a program for 304 SS 4.156 - 8 threads


some key facts....the P number....set 55 as the last 2 numbers...because that emulates the compound move at 27.5 which manually you want it at 29.5 but a lathe in the book states that if you go over or under that number thread damage COULD occur...not always though....and I have used all numbers and they work...but 55 is the mathematical number that the manus use as a standard....and just use my 150 RPMs even in the aluminum...it will produce sweet threads with no burrs....the approach has to be enough for the math and control to sync so always have it a Z.5 or more...never under...you can but damage may occur again...that 29 makes it move for an acme thread...14.5 degrees...if you need to know what each thing means let me know and i'll set ya up..what size are the threads and i'll show ya a basic program for it...then ya just plug and play diameters and whatnot...hope this helps


custom 4.156 - 8 threads
G04 T101
S150 M13
G00 X4.25 Z.5
G76 P010055 Q00050 R.0005
G76 X4.0 Z-.75 P07667 Q00300 F.125
G00 Z2.0
M30

1/4 -18 external pipe threads
S200 M13
G00 X.7 Z.5
G76 P010055 Q00150 R.0005
G76 X.46697 Z-.495 P03407 Q00200 R-.02474 F.05555
G00 Z2.0 M30
 
The answer to that would be no, never. I've never programmed anything before actually. Two weeks ago is the first time I've even seen Gcode. I've only worked in a machine shop for 2 years and never ran any machine at all prior to that. I've since used manual machines and I can do decent work on a manual lathe, including threading. I know what I want this machine to do I just don't know how to tell it to do it.
The manual I have is super unclear and I don't have anyone here to teach me, plus I think the manual is wrong because it explains a format with letters that aren't even on the control.

what does the format in book state....example

G76 P6 Q5 R.05
G76 X(U) +/-2.5 Z(W)+/-2.5 R+/-1.5 P5 Q5 F1.6
 
COORDINATE-GEOMETRY14.jpg


This is the layout of the coordinate system for your lathe, specifically "front lathe" for tools that are in front of you, and "back lathe" for tools behind the part, you need to understand it.

fanuc-isleme-merk-web31.jpg


These are the different NC functions that are available for your safety, you need to understand them.

Sounds like you really need to know the difference between G01 and G00, one is a rapid command and one is a feed command.

Who in hell lets a guy who never done this before go tot own on a machine? Isn't there anyone there to answer questions?

R
 
When I hit start the tool went right smack to that exact edge of the piece from HOME and the display zeroed itself right then. Then the X moved out to 0.9 towards me standing there, basically moving away from the part, and the Z moved to the right away from the part also. Then when it started threading it did the motions correctly but never actually got to the part. Basically at the end it was still at +0.63 away in the x direction. The z was fine, it was passing over the part properly just not touching it.

Hello cncCrasher,
What exactly do you mean by the above? If the diameter of the work-piece is 1.0", did the tool move to that diameter and to Z Zero (Z Start End of Work-Piece) and then Incrementally X+0.9? What actual diameter was the tool at after it executed the X+0.9 move?

Your description of events sound somewhat like the control is working in Incremental Mode. Generally, with a lathe control, Absolute/Incremental moves are accomplished using X/U and Z/W respectively. However, there are three G Code Systems that the Fanuc control can be set to; System A,B and C. Circa your machine A and B were available and both used G76 as the G Code for the Multiple threading cycle (System C used G78). System A uses X/U and Z/W to specify an Absolute/Incremental move respectively, whilst G90/G91 is used to set Absolute/Incremental Mode respectively using System B.

As a test, either via MDI Mode, or in a one Block memory program (which ever you know how to achieve) execute the following G codes and observe if a ps010 alarm is raised:
G90
G91

If no alarm is raised, its likely that your control is set to G Code System B. If an alarm, press Reset and with the cutting tool in a safe position (nowhere near the Work-piece, or anything else it may interfere with) execute the following"

G00 W-1.0

When executing this command set the Rapid Override switch to a low setting, or have Dry Run switch set to On. If W specifies an Incremental Move in Z for your machine, the tool should move no more than 1.0" in the Z minus direction. If the tool appears to be moving more than Z-1.0, press Reset to abort the move.

The fact that your control has not raised an alarm using the two Block Format, its unlikely that the G76 X__Z__I__K__D__F__E__A__ Block format will work. However, to make sure, execute the following in a test program to determine what system your control uses.

N10 X0.900 Z0.25 M08
N12 G76 X0.6309 Z-1.0 K0596 D0200 A60 F0.1

However, as your control has not raised an alarm with the Two Block Format thus far, I would be surprised if it uses the One Block Format.

When I posted the example code earlier, I incorrectly used 30° as the tool tip angle in the P address of the First G76 Block, this should have been 60°. My description in Post#2 is correct in that:

(a) = included angle of thread form (threading tool angle)

With the Two Block Format only the following angles are available:
80°, 60°, 55°, 30°, 29°, and 0°. With the Single Block Format, angles in the range of 0° to 120°, in 1° increments can be programmed.

Johnny Larue said:
and just use my 150 RPMs even in the aluminum...it will produce sweet threads with no burrs....

Indicated by his many examples in this Forum, Johnny knows Jack Shite about cutting data. According, to avoid confusion and bad habits, disregard most of what he has to say.

Regards,

Bill
 
Last edited:
Bill,
thanks for the help so far.
So I just tried the program as you wrote it and I deleted everything else I had in there but two lines above, which is where i think my problem is.
I put in:
N100 G00 T0101
N105 G97 S300 M04
(Then your three lines)

When I hit start the tool went right smack to that exact edge of the piece from HOME and the display zeroed itself right then. Then the X moved out to 0.9 towards me standing there, basically moving away from the part, and the Z moved to the right away from the part also. Then when it started threading it did the motions correctly but never actually got to the part. Basically at the end it was still at +0.63 away in the x direction. The z was fine, it was passing over the part properly just not touching it.

So what did you do differently when using the code you posted in your Post#5 and the code I posted; both listed following?

N110 X0.89 Z0.05 M08;
N111 G76 P040029 Q06;
N115 G76 X0.6920 Z-1.0 P0137 Q0020 F0.1;

N110 X0.900 Z0.25 M08
N111 G76 P010060 Q0020 R0
N115 G76 X0.6309 Z-1.0 P0596 Q0200 F0.1

Effectively they are the same in terms of the start position of the tool before the Threading Cycle and the diameter of the final Threading Pass of the tool.

Surely the following Blocks

N110 X0.89 Z0.05 M08
and
N110 X0.900 Z0.25 M08

would execute quite similarly, yet you make no mention of an unusual tool movement in your Post#5.

As litlerob1 infers, you really need to learn the operations of the machine and have a basic knowledge of the G codes. If you're not already doing so, execute your test programs making use of the Single Block, the Rapid Override and the Dry Run switches of the control so that you have better control of the tool movements. If you're unfamiliar with these control switches, make sure you know their function before proceeding further. Also, at your stage, air cutting with the work-piece removed would be good practice when running your test programs.

Depending on parameter setting, Dry Run mode will also affect the Feed Rate in the Threading Cycle. Accordingly, use this switch with care when the Work-piece is in position.

Regards,

Bill
 








 
Back
Top