自动区分MM或INCHES攻丝的代码(F输出值为螺距值):
fmt F 2 tapfeed
------------
imetric : 0 #Cutter inchesmetric type - 0=inches, 1=metric
------
pparameter$ # Run parameter table
if prmcode$ = 15145, imetric = rpar(sparameter$, 1) #Cutter inchesmetric type - 0=inches, 1=metric
if prmcode$ = 15139, tappitch = rpar(sparameter$, 1) #tappitch
-------
ptap$ #Canned Tap Cycle
pdrlcommonb
tapfeed=tappitch
if imetric=1, tapfeed=tappitch
if imetric=0, tapfeed=25.4/tappitch
pcan1, pbld, n, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,
prdrlout, dwell$, *tapfeed, strcantext, e$
pcom_movea
------ |