Products Catalogue Home     |     About Us    |     Retrofit     |     Download     |     News     |     Tech Support     |     Contact Us     |     
ppr fittings-NF-4011-Newsun Industry Co., Ltd
Home > Tech Support >

Macro Application of Trapezoidal Thread

Macro Application of Trapezoidal Thread
I edited it with my own ideas. If there are any disadvantages, please point out to the God.
 
 
Let me talk about layered cutting today.
First introduce the G65 non-modal macro program call (take Farak as an example)
Format: G65 P (subroutine name) L (number of calls, 1~9999 times, omitting the default is 1 time) (assignment of independent variables)
 
For example: G65 P0049 A30.0 B5.0;
Subroutine: G0 X#2;
 
G1 Z-#1;
M99;
A30.0 is to assign value to #1, which means #1=30. Examples will be given below.
The following is the comparison table of the independent variable designation Ⅰ, the Ⅱ will not be sent;
 
Here is an example of Tr40x7;
O0001; (main program)
T0101;
M3 S300;
G0 X45 Z10; (positioning
G65 P0002 A40.0 B7.0 C-100 I1.8 J1.6; call O0002 program once and assign #1 to 40.0, #2 to 7.0, #3 to -100.0 #4 to 1.8, # in the subprogram 5 assigned 1.6)
G0 X200 Z300; retreat
M30;
 
O0002; (Subroutine
#6=0.25; (tooth gap is 0.25
IF [#2GE6]THEN#6=0.5; (When the thread is greater than or equal to 6, the tooth tip clearance is 0.5
IF [#2GE14] AND [#2LE44]THEN#6=1; (When the pitch is greater than or equal to 14 and less than or equal to 44, the tooth gap is 1
#7=0.5*#2+#6; (unilateral tooth height
#8=#1-2*#7; (small diameter value
#9=0.336*#2-0.536*#6; (groove bottom width, 2*TAN[15]=0.536
N1 #10=#7*TAN[15]-0.03; (Z value at the right end of each layer, leave a margin of 0.03mm
#11=-#10-#9+0.06; (the end point Z value at the left end of each layer should be reduced by one knife width
#12=#10-#4; (Actual Z value of tool
N2 G0 X[#1+5] Z[#12+10]; (Position to the starting point of the thread
G92 X[#8+#7*2] Z#3 F#2; (G92 is enough here
IF [#12EQ#11]GOTO3; (If Z reaches the size of the left end of each layer, jump to N3
#12=#12-#5; (Z value after the tool enters the Z direction each time
IF[#12GE#11]GOTO1; (If each layer does not reach the end size, return to N1 to continue processing
#12=#11; (Set the Z value to the Z value at the end of each layer
GOTO2; (Jump to N2 to process the last knife of each layer
N3 #7=#7-0.1; (X feed per layer, radius value
IF[#7GE0]GOTO1; (If you don’t reach the bottom of the tooth, return to N1 to continue processing
#7=0; (The last assignment is to modify both sides
G0 Z[#10-#4+10.03];
G92 X#8 Z#3 F#2;
G0 Z[#11+9.97];
G92 X#8 Z#3 F#2;
G0 X100;
M99;
 
This subroutine parameterizes all data. In the future, just call this subroutine with G65 to assign the thread size.

—[Close]— —[ Back]— —[ Print]—