Первое фото- схема, второе- содержимое программы и подпрограмма.
Задав нужные параметры можно нарезать червяка без КАМ системы.
АПД:
код для копирования:
.....
(REZ CHERVYAKA)
T0101
M13P1S1000
G0G99X12.Z10.Y-1.8M8
G65P3000A10.48B3.534C3.534D11.48E15.K1F3.534Q1.5H0.04T1V10.W0Z10.
(A-VNUTR.DIAMETR)
(Q-SHIRINA_REG.KROMKI)
(B-dlina_zahoda)
(C-dlina_vihoda)
(D-narugniy_diametr)
(E-dlina_rezbi)
(K-KOL.ZAHODOV)
(F-Shag mm/ob)
(H-rez_za_prohod)
(T-kol-vo_sdviov_po_z)
(V-ugol_zahoda_grad)
(W-dlina_sdviga_po_z)
(Z-nachalo_rezbi)
.....
%
O3000(PODPROGRAMMA VINT)
G99
IF[#9LE0]GOTO70
IF[#11GTABS[#7]]GOTO80
IF[#20LT0]GOTO90
IF[[#22LT0]OR[#22GE90]]GOTO100
IF[#1EQ7]GOTO110
IF[#8EQ0]GOTO120
IF[#6LE0]GOTO130
#2=ABS[#2]
#3=ABS[#3]
#4=#1
#5=#7
#9=#9*#6
#11=ABS[#11]
#17=ABS[#17]
#18=[2*#7-#1]
#23=ABS[#23]
#21=[SIN[#22]*#11]
#29=[COS[#22]*[#11*2]]
#32=#7
#33=1
#6=360000/#6
IF[#6EQ1]THEN#6=0
IF[#1LT#7]GOTO10
#30=[[#1-#7]/#29]
#29=[-1*#29]
#4=#7
#5=#1
#33=0
GOTO20
N10#30=[[#7-#1]/#29]
N20#28=[#21*#30]
IF[#8GT0]GOTO30
#23=-1*#23
#28=-1*#28
#21=-1*#21
#17=-1*#17
#2=-1*#2
#3=-1*#3
N30#27=#18
G0X#18Z[#26-#2]
WH[#5GT#4]DO1
#7=[#7-#29]
#18=[#18-#29]
#19=0
IF[[[#4GT[#32-#29]]AND[#33EQ1]]OR[[#1LT[#32-#29]]AND[#33EQ0]]]THEN#7=#1
WH[#19LT360000]DO2
IF[#6EQ0]THEN#19=360000
IF[[[#20EQ0]OR[#23EQ0]]AND[#22EQ0]]GOTO50
#25=#26
#31=0
WH[[ABS[#28-#17/2]]GT[ABS[#31]]]DO3
#13=-1
#26=[#26+[#20*#23]]
N35IF[#13GE#20]GOTO40
G0X#18Z[#26-#2+#28-#31]
G32X#7Z[#26+#28-#31]Q#19F#9
G32Z[#8+#26+#28-#31]Q#19F#9
G32X#18Z[#3+#8+#26+#28-#31]Q#19F#9
G0X#27
G0Z[#26-#2+#28]
#13=[#13+1]
#26=[#26-#23]
GOTO35
N40#26=#25
N50G0X#18Z[#26-#2-#28+#31]
G32X#7Z[#26-#28+#31]Q#19F#9
G32Z[#8+#26-#28+#31]Q#19F#9
#32=#5001
G32X#18Z[#3+#8+#26-#28+#31]Q#19F#9
G0X#27
IF[[[#20EQ0]OR[#23EQ0]]AND[#22EQ0]]GOTO60
#31=#31+#17
END3
N60#19=[#19+#6]
G0Z[#26-#2-#28]
END2
#28=[#28-#21]
IF[#33EQ1]GOTO63
#4=#7
GOTO65
N63#5=#7
N65END1
M99
N70#3000=1(NEPRAVILNO_F)
N80#3000=1(H_BOLSHE_D)
N90#3000=1(T_MENSHE_0)
N100#3000=1(UGOL_V_OT_0GRAD_DO_90GRAD)
N110#3000=1(A_RAVNO_D)
N120#3000=1(E_RAVNO_0)
N130#3000=1(NE_ZADAN_K)
%