Рет қаралды 1,294
IN VIDEO M24X3 AND M20X1.5 AND AT THE END SIMULATION.
OPTITHREAD, WAVE THREAD
EXAMPLE FOR M24X3
MACRO
N2
G54
G0T1212
G97S500M3
G0X52.Z2.Y0
#101=24.(DIAMETER OF THREAD)
#102=3.(FEED)
#103=0.35(DEEP OF CUT IN DIAMETER)
#104=50.(END OF THREAD IN Z AXIS IF THE THREAD IS VERY LONG, MACRO WILL MAKE IT 2% LONGER, FOR EXAMPLE IF YOU PUT 350MM IT WILL FINISH 356MM )
#105=3.(AMOUNT OF FINISH PASSES)
#106=20.5(DEEP OF CUT)
#107=TAN[30](METRIC TAN30, INCH TAN 27.5)
#108=[#101-#103]
#109=#101+#102*2(SAFE HIGH)
#110=[#104/[#102*5]]
#111=FUP[#110](FUP ROUND THE RESULT UP FOR EXAMPLE IF RESULT IS 8.2 IT WILL ROUND IT TO 9)
#112=#107*[[#109-#108]/2]
#113=4.(BEGGINING IN Z AXIS)
#114=#102
#120=0
#130=0
#140=0
#150=1
G0X#109Z#113F#102
N1
G32W-[#102*3-#112*2]F#102
G32X#108W-#112
G32W-#102*2
G32X#109W-#112
#120=#120+1
IF[#111LE#120]GOTO5
GOTO1
N5
G0X#109Z[#113+#114*2]
#130=0
N20
G32W-[#102*3-#112*2]
G32X#108W-#112
G32W-#102*2
G32X#109W-#112
#130=#130+1
IF[#111LE#130]GOTO60
GOTO20
N60
G0X#109Z[#113+#114*3]
#140=0
N21
G32W-[#102*3-#112*2]
G32X#108W-#112
G32W-#102*2
G32X#109W-#112
#140=#140+1
IF[#111LE#140]GOTO61
GOTO21
N61
#150=#150+1
G0X#109Z#113F#102
#100=0
#110=0
#120=0
#108=[#108-#103]
#109=[#109-#103]
#152=#101-#106
#162=#152/#103
#172=FIX[#162]
G0X#109Z#113F#102
IF[#172LE#150]GOTO70
GOTO1
N70
G0X100.Z50.
M01
(FINISH PASSES)
#155=0
#173=#172*#103
#180=#152-#173
G99G18M46
G54
G0T1212
G97S500M3
G0X52.Z2.
G0X#109Z[#113+#114*3]
G32W-[#102*3-#112*2]F#102
G32X#108W-#112
G32W-[#111*5*#102]
G32X#109W-#112
#108=[#108-#103]
#109=[#109-#180]
N30
G0X#109Z[#113+#114*3]
G32W-[#102*3-#112*2]
G32X#106W-#112
G32W-[#111*5*#102]
G32X#109W-#112
#155=#155+1
IF[#155EQ#105]GOTO80
GOTO30
N80
G0X100.Z100.
G0G28V0
M30
%