MEAS/POINT,F(L),1[,CLRSRF,【F,FA,】#,CLRSRE,【F,FA,]#
第一个 CLRSRE在第一个 PTMEAS时起作用;
第二个CLRSRF在元素测量完之后增加抬高位置;
MODE/PROG,MAN
F(PLN1)=FEAT/PLANE,CART,31.2500,46.7878,35.0000,0.0000,0.0000,1.0000
$$ MACRO: EASI_CLEARPLN_GOTO
$$ FUNCTION: CLEARANCE SURFACE IMPLEMENTATION
$$ Move machine CLEAR SURFACE DIST above the current clear surface
$$plane and then move machine parallel to the clear surface plane
$$ ALL Macro parameters are in PCS and Current UNITS
$$ Last update: 3-1-04 Add mode checking. only works in PROG MODE
$$ Last update: 8-24-04 Clear position is based on the surface of
$$
$$ This sample DMIS Macro is provided by External-Array Software, Inc.
$$ It should be modified for your own use. There is no guarantee for
$$ the quality of this Macro. November, 2003
M(EASI_CLEARPLN_GOTO) = MACRO/ISNOM, TARX, TARY, TARZ
DECL/LOCAL, REAL, CCX, CCY, CCZ, CCI, CCJ, CCK
DECL/LOCAL, REAL, CURX, CURY, CURZ, TD, CLRDIST, SDIAM
DECL/LOCAL, CHAR, 255, CLRLABEL, FLABEL, MMODE, SNAME
MMODE = VALUE/MODE
CLRLABEL = VALUE/SNSET, CLRSRF
IF/ ( (LEN(CLRLABEL) .GT. 0) .AND. (MMODE .EQ. 'PROG,MAN') )
CLRDIST = VALUE/SNSET, CLRSRF, DIST
FLABEL = ASSIGN/'FA'
IF/ ISNOM .EQ. 0
FLABEL = ASSIGN/'F'
ENDIF
CCX = OBTAIN/FLABEL(@CLRLABEL), 3
CCY = OBTAIN/FLABEL(@CLRLABEL), 4
CCZ = OBTAIN/FLABEL(@CLRLABEL), 5
CCI = OBTAIN/FLABEL(@CLRLABEL), 6
CCJ = OBTAIN/FLABEL(@CLRLABEL), 7
CCK = OBTAIN/FLABEL(@CLRLABEL), 8
SNAME = VALUE/SNSLCT
SDIAM = OBTAIN/SS(SNAME), 8
CCX = ASSIGN/CCX + CCI * SDIAM/2
CCY = ASSIGN/CCY + CCJ * SDIAM/2
CCZ = ASSIGN/CCZ + CCK * SDIAM/2
CURX = VALUE/GOTOM, XAXIS
CURY = VALUE/GOTOM, YAXIS
CURZ = VALUE/GOTOM, ZAXIS
TD = ASSIGN/(CURX - CCX) * CCI + (CURY - CCY) * CCJ + (CURZ - CCZ) * CCK
IF/ TD .LT. CLRDIST
TD = ASSIGN/(CLRDIST - TD)
GOTO/CURX+CCI*TD, CURY+CCJ*TD, CURZ+CCK*TD
ENDIF
TD = ASSIGN/(TARX - CCX) * CCI + (TARY - CCY) * CCJ + (TARZ - CCZ) * CCK
IF/ TD .LT. CLRDIST
TD = ASSIGN/(CLRDIST - TD)
GOTO/TARX+CCI*TD, TARY+CCJ*TD, TARZ+CCK*TD
ENDIF
ENDIF
ENDMAC
SNSET/APPRCH, 2.0000
SNSET/RETRCT, 2.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, F(PLN1), 20.0000
F(PT1)=FEAT/POINT,CART,7.0740,73.5291,35.0000,0.0000,0.0000,1.0000
$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 7.0740, 73.5291, 38.0000
MEAS/POINT, F(PT1), 1, CLRSRF, F(PLN1), 20.000000, CLRSRF, F(PLN1), 20.000000
GOTO/CART, 7.0740,73.5291,56.0000
PTMEAS/CART, 7.0740,73.5291,35.0000,0.0000,0.0000,1.0000, APPRCH, 2.000000, RETRCT, 2.000000
ENDMES