Contents - Index - Previous - Next


G78 Threading Cycle

EXTERNAL THREADING

                    

The picture shows a part with a thread.

This cycle is used when NC code is created manually.

Preparation: turn the part to the crest diameter of the thread. Plan the threaded length so that the threading tool does not hit any shoulder to the left of the threaded length. Ideally, at the end of the threaded length, cut a groove of a diameter slightly smaller than the thread root. The groove should be of sufficient width that the threading tool can stop in the middle of it without hitting any shoulder at the left of the groove. In this case, the Z length entered in the G78 command is the length of the thread plus half the width of the groove.

A G0 command brings the tip of the tool to starting position P0. This position must be slightly back from the part so that rapid returns of the tool do not score its surface. The G78 command will make the tool move in a series of rectangular paths cutting material axially until the tool tip reaches target point P1 where the cycle ends.

The X co-ordinate of P1 is the diameter of the root of the thread. So, for example, the depth of an M10 coarse thread is 0.9202mm. Therefore the diameter of the root of the thread is 10
- (0.9202 x 2) = 8.1596mm. This information is available in the Zeus Data Chart and other engineering publications (but see Screw Cutting).

Given the pitch of the thread, for example, 1.5mm for an M10 coarse thread, and by measuring the rotational speed of the lathe spindle, WELturn calculates the cutting feed rate. All other movements are at rapid traverse rate.

The best way to appreciate the cycle is to get WELturn to simulate the G78 illustration below. Copy everything between the % symbols, including the % symbols, into UNCONVERTED WINHELP MACRO:!EP(`C:\\windows\\notepad.exe',0)Notepad. Save the file in C:\WELturn\Turndata with the extension .cnc

Go into WELturn and run the file in simulation mode only: do not try to machine anything. Observe the path of the tool as it executes the cycle.

G78 illustration (metric)
%
* Billet Diameter 10
N10 T1
N20 G0 X12 Z5
N30 T4
N40 S200
N50 G78 X8.1596 Z-20 F1.5 H0.2
%

Line N20 gives point P0, the start of the threading cycle.

In line N50, X8.1596 Z-20 give point P1. The threading cycle ends when the tool reaches P1. The tool returns to P0 and stops.

The full format of the G78 command is:

N(line number) G78 X(co-ord of P1) Z (co-ord of P1) F(pitch of thread) H(depth of cut)


For example:
N200 G78 X8.1596 Z-20 F1.5 H0.05


Note: the Z co-ordinate of P1 is the distance of Z left (notice the minus sign) from the centre of the end of the billet, not the finished part. The centre of the end of the billet is the location of the origin, X = 0, Z = 0. All co-ordinates are absolute values measured from this point.

From the depth of cut, WELturn calculates the number of cutting passes required. If necessary, it adjusts the depth of the final cut so that the dimensions of the thread are correct.

Because the width of the cut increases the deeper the thread is cut, it is advisable to keep the depth of cut quite small to avoid spindle drive belt slippage and to minimise the amount by which the work springs away from the tool.

Ideally, a G78 cycle should be followed by a series of passes of the tool using the G33 command. These passes are called
"spring cuts" because the only material cut is what would have been removed in the G78 cycle had the work not sprung away very slightly from the tool. In G33, the X and Z co-ordinates for each pass of the tool will be the same as in the G78 cycle.

The full format of the G33 command is:

N(line number) G X(co-ord of P1) Z (co-ord of P1) F(pitch of thread)


For example, and matching G78 above:

N200 G33 X8.1596 Z-20 F1.5


G33 only controls a pass of the tool along the thread. It will be preceded a radial G0 move from P0 to the thread root diameter. It will need to be followed by a radial G0 move away from the work. There will then be an axial G0 move back to P0. You will need to write code for these three G0 moves.

Several spring passes will be required.

INTERNAL THREADING

Preparation:
drill/bore a hole equal to the crest diameter of the thread. Ensure that the hole is longer than the thread length so that the threading tool cannot run into the end of the hole. Ideally, the end of the hole should be bored to a diameter slightly greater than the thread root diameter so that, at the end of a threading cut, the tool stops in a clear area. This larger diameter should be of sufficient length that the threading tool can stop in the middle of it without hitting the end of the hole. In this case, the Z length entered in the G78 command is the length of the thread plus half the length of the larger diameter at the end of the hole.

Ensure that the tool change position is far enough from the right hand end of the billet to permit safe changing of tools, especially on a 5CNC lathe with an auto-change turret.

Example thread dimensions:
Crest diameter 18mm
Root diameter (X) 20.2mm
Length of thread (Z) 15mm
Pitch of thread (F) 1.5mm
Depth of each cut (H) 0.05mm

                    
From these dimensions, the target point, P1, for the end of the thread is at X=20.2, Z=-15 The starting point, P0, for threading passes is placed at X=18, Z=1 (ie at the crest diameter and 1mm to the right of the billet).

Note: at the end of the G78 internal threading cycle, the tool is left at P0, the position from which the cycle began.

The best way to appreciate the cycle is to get WELturn to simulate the G78 illustration below. Copy everything between the % symbols, including the % symbols, into UNCONVERTED WINHELP MACRO:!EP(`C:\\windows\\notepad.exe',0)Notepad
. Save the file in C:\WELturn\Turndata with the extension .cnc

Go into WELturn and run the file in simulation mode only: do not try to machine anything. Observe the path of the tool as it executes the cycle.

%
*G78 internal threading cycle example showing where the cycle ends
*Billet Diameter 30
*diameter of pre-drilled hole 18
*depth of pre-drilled hole 20
N10 T1 'select RH tool
N20 S950
N30 G0 X30 Z60 'go to tool change position
N40 T7 'select internal threading tool
N50 S330
N60 G0 X18 Z1 'position tool at starting point P0
N70 G78 X20.2 Z-15 F1.5 H0.05 'internal threading cycle: cycle ends with tool at P0
%

When internal threading
"for real", a number of "spring passes" should be made, all at the root diameter of the thread, to clean the thread. Use the G33 command.

Below is sample NC code for G78 internal threading with two G33 spring passes. All the spring passes end at X=20.2, Z=-15. In practice, rather more spring cuts are necessary.

The best way to appreciate the cycle is to get WELturn to simulate the G78 illustration below. Copy everything between the % symbols, including the % symbols, into UNCONVERTED WINHELP MACRO:!EP(`C:\\windows\\notepad.exe',0)Notepad
. Save the file in C:\WELturn\Turndata.with the extension .cnc

Go into WELturn and run the file in simulation mode only: do not try to machine anything. Observe the path of the tool as it executes the cycle.

%
*G78 internal threading cycle example
*Billet Diameter 30
*diameter of pre-drilled hole 18
*depth of pre-drilled hole 20
N10 T1 'select RH tool
N20 S950
N30 G0 X30 Z60
N40 G0 X29.5 Z1
N50 G1 X29.5 Z-10 F0.08 'skim outside of billet
N60 G0 X30 Z-10
N70 G0 X30 Z60 'go to tool change position
N80 T7 'select internal threading tool
N90 S330
N100 G0 X18 Z1 'position tool at starting point P0
N110 G78 X20.2 Z-15 F1.5 H0.05 'threading cycle
N120 G0 X20.2 Z1 'position tool ready for first spring pass
N130 G33 X20.2 Z-15 F1.5 'first spring pass
N140 G0 X17 Z-15 'move tool tip clear of thread crest
N150 G0 X17 Z1 'move clear of the billet
N160 G0 X20.2 Z1 'position tool ready for second spring pass
N170 G33 X20.2 Z-15 F1.5
N180 G0 X17 Z-15
N190 G0 X17 Z1
N200 G0 X30 Z60 'go to tool change position
N210 T1 'select RH tool
%

Canned Cycles
Screw Cutting