Threading is a process of cutting a helical groove on a cylindrical or conical workpiece, such as a bolt, a pipe, or a spindle. Threading can be done on a lathe machine using a single-point cutting tool, which is shaped like the desired thread profile. Threading can also be done on a milling machine, a tapping machine, or a thread-cutting die.
One of the most common methods of threading on a lathe is using the G32 code, which is a canned cycle for single-point threading. A canned cycle is a predefined sequence of machine movements that can be executed with a single command, saving time and reducing programming errors.
Usage Format
The general format of the G32 code is:
G32 X.. Z.. F.. R..
where:
X
is the final diameter of the threadZ
is the final position along the Z-axisF
is the feed rate, which is equal to the pitch of the threadR
is the retract amount, which is the distance that the tool moves away from the workpiece after each pass
The G32 code must be preceded by a G92 code, which sets the thread start position and the depth of cut. The G92 code has the following format:
G92 X.. Z.. D..
where:
X
is the start diameter of the threadZ
is the start position along the Z-axisD
is the depth of cut, which is half of the thread height
The G32 code must be followed by a G00 code, which moves the tool to a safe position after the threading is completed.
Explanation
The G32 code works by moving the tool along a helical path, which is determined by the X, Z, and F values. The tool cuts the thread in multiple passes, starting from the outer diameter and gradually moving towards the core diameter. The depth of cut for each pass is controlled by the D value, which is set by the G92 code. The tool retracts by the R value after each pass, to avoid rubbing against the workpiece and damaging the thread. The tool repeats this cycle until the final diameter and position are reached.
The G32 code can be used for both internal and external threading, as well as for different thread profiles, such as metric, unified, acme, or trapezoidal. The thread profile is determined by the shape of the cutting tool, which must match the desired thread form. The thread pitch, which is the distance between two adjacent thread crests, is determined by the F value, which must be equal to the feed rate.
The G32 code can also be used for taper threading, which is threading on a conical workpiece. To do this, the X and Z values must be changed accordingly, to reflect the taper angle and the length of the thread. The F value must remain constant, as the pitch of the thread does not change.
Example
Here is an example of a G32 code for cutting a metric external thread on a cylindrical workpiece. The thread specifications are:
- Diameter: 20 mm
- Length: 40 mm
- Pitch: 1.5 mm
- Depth of cut: 0.75 mm
- Retract amount: 0.2 mm
The G32 code for this thread is:
G92 X20 Z0 D0.75 ; set thread start position and depth of cut
G32 X10 Z-40 F1.5 R0.2 ; cut thread with pitch 1.5 mm and retract 0.2 mm
G00 X30 Z10 ; move tool to safe position
The text diagram for this thread is:
|<---- 20 mm ---->|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
V V
Z0 Z-40
The helical path of the tool is shown by the dashed line:
|<---- 20 mm ---->|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | /
| | /
| | /
| |/
V V
Z0 Z-40
The final thread profile is shown by the solid line:
|<---- 20 mm ---->|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | /\
| | / \
| |/ \
| |\ /
| | \ /
| | \/
| |
V V
Z0 Z-40