Macro library

Русский

Threading

Macro for cutting external or internal threads. Thread entry and exit are performed at the angle of the thread profile, which means that the cycle cuts into the diametric part of the workpiece, and not from the end, which allows processing parts without a thread groove.

Supported cutting methods:

Supported thread cutting methods:


You can make it as a custom G-code on your machine, see other macros.

[!NOTE] Specify the G-coda number for the simplified form of the cycle call. For example G276.

Call Format

G65 P_ [A_] [C_] D_ F_ [H_] [I_] [J_] [K_] [M_] [S_] [U_] [V_] [W_] X_ Z_
G276 [A_] [C_] D_ F_ [H_] [I_] [J_] [K_] [M_] [S_] [U_] [V_] [W_] X_ Z_

Attributes


Description:

J – minimum number of revolutions per cut. When this parameter is specified, the thread will be cut in sections. Odd sections are processed first, then even ones. The length of the last section can be increased depending on the length of the thread.

S – type of positioning of the start and end point of the thread. This parameter should be used if there is a possibility of collision with the end surface of the part at the beginning or end of the thread.

W – roughing width. Should be used for cutting large-profile threads, as well as trapezoidal threads. This method increases the wear resistance of the tool, since both cutting edges of the plate are used. Recommended range: 0.2 – 0.8 mm.

V – finishing width. Should be used if it is necessary to clean up the crushing on the walls of the thread profile. It is advisable not to leave a diametrical allowance, or use this method. Recommended range: 0.01 – 0.05 mm.

Examples

Example 1: External metric thread M12x1.75. Parameters: Allowance for finishing passes 0.05 mm. Removal per pass 0.1 mm. Number of finishing passes – 3

%
<THREADING>
N10(THREAD M12X1.75)
G54
G99G97G80G40G18
G28U0
G28W0
T0202
M3S100
G0Z10.
G0X14. (diameter of transition between passes)
M1
M8
S700
G0Z2. (beginning of carving)
G276 D1.7 F1.75 H0.05 K3 U0.1 X9.853 Z-10. (cycle start)
G0Z10.
M9
M5
G28U0W0
G28W0
M1
M30
%



Example 2: External metric thread M12x1.75. Thread start – Z-2., end – Z10. Taper correction 0.02 mm.

G0X14.
G0Z-2.
G276 C0.02 D1.7 F1.75 H0.05 K3 U0.1 X9.853 Z-10.



Example 3: Finishing passes for external metric thread M12x1.75. Thread start – Z-2., end – Z10. Taper correction 0.02 mm.

G0X14.
G0Z-2.
G276 C0.02 D1.7 F1.75 K3 X9.853 Z-10.



Example 4: Internal metric thread M12x1.75. Thread start – Z-2., end – Z10.

G0X8.
G0Z-2.
G276 D1.7 F1.75 H0.05 K3 U0.1 X12. Z-10.



Example 5: External metric thread M12x1.75 without thread groove. We cut the thread in the direction from the spindle. The beginning of the thread is Z-15., the end is Z2.

G0X14.
G0Z-15.
G276 D1.7 F1.75 H0.05 K3 U0.1 X9.853 Z2.



Example 6: External metric thread M12x1.75 without thread groove. We cut the thread in the direction from the spindle. The beginning of the thread is Z-15., the end is Z2. The starting position corresponds to the position of the tool feed.

G0X14.
G0Z-15.
G276 D1.7 F1.75 H0.05 K3 S1 U0.1 X9.853 Z2.



Example 7: External trapezoidal thread Tr14x2. Thread start – Z-2., end – Z10.

G0X16.
G0Z2.
G276 A30. D2. F2. H0.05 K3 U0.1 X11.5 Z-10.



Example 8: External trapezoidal thread Tr14x2. With lateral two-sided cutting with a width of 0.3 mm.

G0X16.
G0Z2.
G276 A30. D2. F2. H0.05 K3 U0.1 W0.3 X11.5 Z-10.



Example 9: External trapezoidal thread Tr14x2. With lateral two-sided cutting with a width of 0.3 mm. Width of final breakdown 0.02 mm

G0X16.
G0Z2.
G276 A30. D2. F2. H0.05 K3 U0.1 V0.02 W0.3 X11.5 Z-10.



Example 10: Internal trapezoidal thread Tr14x2. With lateral two-sided cutting with a width of 0.3 mm. The width of the final breakdown is 0.02 mm.

G0X10.
G0Z2.
G276 A30. D2. F2. H0.05 K3 U0.1 V0.02 W0.3 X14.5 Z-10.



Example 11: External metric thread M12x1.75. Thread start – Z2, thread end – Z10. Radial penetration into the workpiece (indicate small rough layout width).

G0X12.5
G0Z2.
G276 D0.5 F0.5 H0.05 K3 U0.1 W0.01 X11.387 Z-10.



Example 12: External trapezoidal thread Tr42x6. Sectional cutting method. 4 turns per cut, therefore, the minimum length of one section is F*I*J = 24mm

G0X44.
G0Z2.
G276 A30. D3.5 F6. H0.05 K7 J4 U0.2 X35. Z-120.



Example 13: External trapezoidal thread Tr42x6. Sectional cutting method with lateral two-sided cutting with a width of 0.4 mm. The width of the final breakdown is 0.02 mm. 4 turns per cutting, therefore, the minimum length of one section is F _ I _ J = 24 mm

G0X44.
G0Z2.
G276 A30. D3.5 F6. H0.05 K7 J4 U0.2 V0.02 W0.4 X35. Z-120.



Example 14: External trapezoidal thread Tr42x6. Sectional cutting method. Rebound only on odd passes.

G0X44.
G0Z2.
G276 A30. D3.5 F6. H0.05 K7 J4 U0.2 X35. Z-120.



Example 15: Double-turn external trapezoidal thread Tr20x4(p2)

G0X22.
G0Z2.
G276 A30. D1.3 F2. K4 I2 U0.1 X17.5 Z-20.



Exceptions

Defined Variables

The macro uses user variables #100 - #199, dynamic parameters are passed along with attributes, and static ones are set in the program itself:

System Variables Used

[!WARNING] First, you need to check the Q attribute (the starting angle of rotation of the spindle) in the G32 cycle, namely, you need to check in what units of measurement it works. Next, in the macro, you need to adjust the static variable #129=360000(FULL TURN IN G32), which is responsible for the full revolution of the spindle. It is necessary to check each machine, since they can have different configurations. Checking procedure:

  1. Write #129=360.
  2. Cut a shallow double-start
  3. If the threads intersect, then #129=360.*10
  4. Cut a shallow double-start
  5. And so on until you get a double-start thread
  6. Or just read the documentation for your equipment

[!WARNING] Before starting the makras, do not forget to check all the system variables used; they may differ on some machines.


Source files