DMISMN/'Created by [天永智能装备股份有限公司] on 星期二, 十月 17, 2017', 4.0
UNITS/MM, ANGDEC
WKPLAN/XYPLAN
PRCOMP/ON
TECOMP/ON
FLY/1.0
MODE/PROG, MAN
SNSET/APPRCH, 3.000000
SNSET/RETRCT, 3.000000
SNSET/DEPTH, 0.000000
SNSET/SEARCH, 10.000000
SNSET/CLRSRF, 50.000000
RECALL/D(MCS)
SNSLCT/S(20-30X2)
GEOALG/CIRCLE, LSTSQR
GEOALG/ARC, LSTSQR
GEOALG/PLANE, LSTSQR
$$
$$
MODE/MAN
F(PLN1) = FEAT/PLANE,CART, 447.9898, -851.3108, -663.7937, 0.000002,$
-0.000739, 1.000000
$$ Measurement points are created through actual points
MEAS/PLANE, F(PLN1), 4
PTMEAS/CART, 381.124480, -783.327320, -663.743379, 0.000002, -0.000739,$
1.000000
PTMEAS/CART, 518.325999, -783.327232, -663.743587, 0.000002, -0.000739,$
1.000000
PTMEAS/CART, 518.331993, -919.289585, -663.844089, 0.000002, -0.000739,$
1.000000
PTMEAS/CART, 374.176822, -919.299166, -663.843878, 0.000002, -0.000739,$
1.000000
ENDMES
D(CRD1) = DATSET/FA(PLN1), ZDIR
D(CRD1) = TRANS/ZORIG, FA(PLN1)
F(CIR1) = FEAT/CIRCLE,INNER,CART, 414.7606, -847.5162, -5.3283, 0.000000,$
0.000000, 1.000000, 35.1921
$$ Measurement points are created through actual points
MEAS/CIRCLE, F(CIR1), 4
PTMEAS/CART, 397.235226, -849.091495, -5.328321, 0.995985, 0.089524,$
-0.000000
PTMEAS/CART, 410.098353, -830.549086, -5.328321, 0.264961, -0.964259,$
-0.000000
PTMEAS/CART, 431.525423, -842.171906, -5.328321, -0.952760, -0.303723,$
-0.000000
PTMEAS/CART, 411.759462, -864.854446, -5.328321, 0.170558, 0.985348,$
-0.000000
ENDMES
F(CIR2) = FEAT/CIRCLE,INNER,CART, 485.2421, -847.2645, -4.3219, 0.000000,$
0.000000, 1.000000, 35.2190
$$ Measurement points are created through actual points
MEAS/CIRCLE, F(CIR2), 4
PTMEAS/CART, 481.453270, -830.067499, -4.321950, 0.215158, -0.976579,$
-0.000000
PTMEAS/CART, 502.362259, -843.142241, -4.321950, -0.972213, -0.234096,$
-0.000000
PTMEAS/CART, 485.096192, -864.873422, -4.321950, 0.008285, 0.999966,$
-0.000000
PTMEAS/CART, 467.994641, -850.816908, -4.321950, 0.979441, 0.201730,$
-0.000000
ENDMES
F(PROJPT1) = FEAT/POINT,CART, 414.7606, -847.5162, 0.0000, -0.000000,$
0.000000, -1.000000
CONST/POINT,F(PROJPT1),PROJPT,FA(CIR1),FA(PLN1)
F(PROJPT2) = FEAT/POINT,CART, 485.2421, -847.2645, 0.0000, -0.000000,$
0.000000, -1.000000
CONST/POINT,F(PROJPT2),PROJPT,FA(CIR2),FA(PLN1)
$$ CREATED BY : External-Array Software, Inc
$$ DATE : Jan 19, 2009
$$ DISLAIMER:
$$ This Macro has been tested internally but not been tested with
$$ other DMIS compatible software. This Macro is provided as sample
$$ and can be modifed for your own use. External-Array doesn't not
$$ guarantee the quality of this Macro.
$$ FUNCION: Create a nominal line using two actual features
$$ DI, DJ, DK are the normal vector of the plane that the line lies on
M(EASI_2PT_TO_LINE) = Macro/'FEAT1', 'FEAT2', 'FEATLINE', DI, DJ, DK
DECL/LOCAL,DOUBLE,DVALUE[6]
DECL/LOCAL,INTGR, INDEX1, INDEX2
CALL/M(EASI_GETX_INDEX), FEAT1, INDEX1
CALL/M(EASI_GETX_INDEX), FEAT2, INDEX2
DVALUE[1] = OBTAIN/FA(@FEAT1),INDEX1
DVALUE[2] = OBTAIN/FA(@FEAT1),INDEX1+1
DVALUE[3] = OBTAIN/FA(@FEAT1),INDEX1+2
DVALUE[4] = OBTAIN/FA(@FEAT2),INDEX2
DVALUE[5] = OBTAIN/FA(@FEAT2),INDEX2+1
DVALUE[6] = OBTAIN/FA(@FEAT2),INDEX2+2
F(@FEATLINE) = FEAT/LINE,BND,CART,DVALUE[1],DVALUE[2],DVALUE[3],$
DVALUE[4],DVALUE[5],DVALUE[6],$
DI, DJ, DK
ENDMAC
CALL/M(EASI_2PT_TO_LINE),(PROJPT1),(PROJPT2),(BFLN1), -0.000002, 0.000739,$
1.000000
CONST/LINE,F(BFLN1),BF,FA(PROJPT1),FA(PROJPT2)
D(CRD2) = ROTATE/ZAXIS, FA(BFLN1), XDIR
D(CRD3) = TRANS/XORIG, FA(PROJPT1), YORIG, FA(PROJPT1)
TEXT/OPER, '请将测头移动到安全位置!!'
GOTO/0.000000, 0.000000, 200.000000
MODE/PROG,MAN
$$ 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
$$ FUNCION: Move machine CLEAR DIST above the current clear surface
$$ plane and then move machine parallel to the clear surface
$$ plane to the project point of POINT(TARX, TARY, TARZ) on
$$ the clear surface plane but CLEAR DIST above the 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
$$ ruby ball instead of the center of it.
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/GOTO, XAXIS
CURY = VALUE/GOTO, YAXIS
CURZ = VALUE/GOTO, 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, 3
SNSET/RETRCT, 3
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, 50
DECL/COMMON,REAL,PLN1_1_AX
PLN1_1_AX = OBTAIN/FA(PLN1)[1],2
DECL/COMMON,REAL,PLN1_1_AY
PLN1_1_AY = OBTAIN/FA(PLN1)[1],3
DECL/COMMON,REAL,PLN1_2_AX
PLN1_2_AX = OBTAIN/FA(PLN1)[2],2
DECL/COMMON,REAL,PLN1_2_AY
PLN1_2_AY = OBTAIN/FA(PLN1)[2],3
DECL/COMMON,REAL,PLN1_3_AX
PLN1_3_AX = OBTAIN/FA(PLN1)[3],2
DECL/COMMON,REAL,PLN1_3_AY
PLN1_3_AY = OBTAIN/FA(PLN1)[3],3
DECL/COMMON,REAL,PLN1_4_AX
PLN1_4_AX = OBTAIN/FA(PLN1)[4],2
DECL/COMMON,REAL,PLN1_4_AY
PLN1_4_AY = OBTAIN/FA(PLN1)[4],3
F(PT1) = FEAT/POINT,CART, PLN1_1_AX,PLN1_1_AY,0, 0,0,1
MEAS/POINT, F(PT1), 1
PTMEAS/CART, -33.407453, 63.818190, 0.000000, -0.000000, -0.000000, 1.000000
ENDMES
F(PT2) = FEAT/POINT,CART, PLN1_2_AX,PLN1_2_AY,0, 0,0,1
MEAS/POINT, F(PT2), 1
PTMEAS/CART, 103.793192, 63.328350, 0.000000, -0.000000, -0.000000, 1.000000
ENDMES
F(PT3) = FEAT/POINT,CART, PLN1_3_AX,PLN1_3_AY,0, 0,0,1
MEAS/POINT, F(PT3), 1
PTMEAS/CART, 103.313684, -72.633194, 0.000000, -0.000000, -0.000000,$
1.000000
ENDMES
F(PT4) = FEAT/POINT,CART, PLN1_4_AX,PLN1_4_AY,0, 0,0,1
MEAS/POINT, F(PT4), 1
PTMEAS/CART, -40.840603, -72.128017, 0.000000, -0.000000, -0.000000,$
1.000000
ENDMES
GOTO/-40.831450, -72.126086, 153.998471
F(PLN2) = FEAT/PLANE,CART, 33.2147, -4.4037, 0.0000, 0.000000, -0.000000,$
1.000000
CONST/PLANE,F(PLN2),BF,FA(PT1),FA(PT2),FA(PT3),FA(PT4)
SNSET/APPRCH, 3.0000
SNSET/RETRCT, 3.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, FA(PLN2), 50.0000
F(CIR3) = FEAT/CIRCLE,INNER,CART, -0.0000, 0.0000, -5.0000, -0.000000,$
-0.000000, 1.000000, 35.2000
$$ Measurement points are created through nominal points
CALL/M(EASI_CLEARPLN_GOTO), 1, -6.653232, -11.754379, 45.000000
MEAS/CIRCLE, F(CIR3), 4
GOTO/CART, -6.653232, -11.754379, 45.000000
PTMEAS/CART, -8.620282, -15.229601, -5.000000, 0.492581, 0.870267, -0.000000
GOTO/CART, -10.644991, -8.313549, -5.000000
GOTO/CART, -13.016147, -3.607056, -5.000000
GOTO/CART, -13.405712, 1.648578, -5.000000
PTMEAS/CART, -15.229601, 8.620282, -5.000000, 0.870267, -0.492581, -0.000000
GOTO/CART, -8.313549, 10.644991, -5.000000
GOTO/CART, -3.607056, 13.016147, -5.000000
GOTO/CART, 1.648578, 13.405712, -5.000000
PTMEAS/CART, 8.620282, 15.229601, -5.000000, -0.492581, -0.870267, 0.000000
GOTO/CART, 10.644991, 8.313549, -5.000000
GOTO/CART, 13.016147, 3.607056, -5.000000
GOTO/CART, 13.405712, -1.648578, -5.000000
PTMEAS/CART, 15.229601, -8.620282, -5.000000, -0.870267, 0.492581, 0.000000
GOTO/CART, 11.754379, -6.653232, 45.000000
ENDMES
F(CIR4) = FEAT/CIRCLE,INNER,CART, 70.5000, 0.0000, -5.0000, -0.000000,$
-0.000000, 1.000000, 35.2000
$$ Measurement points are created through nominal points
CALL/M(EASI_CLEARPLN_GOTO), 1, 11.763818, -6.651222, 50.991889
MEAS/CIRCLE, F(CIR4), 4
GOTO/CART, 11.763818, -6.651222, 50.991889
GOTO/CART, 84.006355, -0.096476, 45.000000
PTMEAS/CART, 87.999554, -0.125000, -5.000000, -0.999975, 0.007100, 0.000000
GOTO/CART, 82.941325, -5.257791, -5.000000
GOTO/CART, 79.982216, -9.618654, -5.000000
GOTO/CART, 75.579526, -12.515165, -5.000000
PTMEAS/CART, 70.375000, -17.499554, -5.000000, 0.007100, 0.999975, -0.000000
GOTO/CART, 65.242209, -12.441325, -5.000000
GOTO/CART, 60.881346, -9.482216, -5.000000
GOTO/CART, 57.984835, -5.079526, -5.000000
PTMEAS/CART, 53.000446, 0.125000, -5.000000, 0.999975, -0.007100, 0.000000
GOTO/CART, 58.058675, 5.257791, -5.000000
GOTO/CART, 61.017784, 9.618654, -5.000000
GOTO/CART, 65.420474, 12.515165, -5.000000
PTMEAS/CART, 70.625000, 17.499554, -5.000000, -0.007100, -0.999975, 0.000000
GOTO/CART, 70.596476, 13.506355, 45.000000
ENDMES
CALL/M(EASI_2PT_TO_LINE),(CIR3),(CIR4),(BFLN2), 0.000001, 0.000739, 1.000000
CONST/LINE,F(BFLN2),BF,FA(CIR3),FA(CIR4)
D(CRD4) = DATSET/FA(PLN2), ZDIR, FA(BFLN2), XDIR, FA(CIR3), XORIG
D(CRD4) = TRANS/ZORIG, FA(PLN2), YORIG, FA(CIR3), XORIG, -0
MODE/PROG,MAN
SNSET/APPRCH, 3.0000
SNSET/RETRCT, 3.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, FA(PLN2), 50.0000
F(J-1) = FEAT/CIRCLE,INNER,CART, 0.0000, 0.0000, -5.0000, 0.000000,$
-0.000000, 1.000000, 35.2000
$$ Measurement points are created through nominal points
CALL/M(EASI_CLEARPLN_GOTO), 1, 13.506300, -0.103886, 45.000000
MEAS/CIRCLE, F(J-1), 4
GOTO/CART, 13.506300, -0.103886, 45.000000
PTMEAS/CART, 17.499482, -0.134600, -5.000000, -0.999970, 0.007700, -0.000000
GOTO/CART, 12.438439, -5.264615, -5.000000
GOTO/CART, 9.476938, -9.623855, -5.000000
GOTO/CART, 5.072659, -12.517949, -5.000000
PTMEAS/CART, -0.134600, -17.499482, -5.000000, 0.007700, 0.999970, -0.000000
GOTO/CART, -5.264615, -12.438439, -5.000000
GOTO/CART, -9.623855, -9.476938, -5.000000
GOTO/CART, -12.517949, -5.072659, -5.000000
PTMEAS/CART, -17.499482, 0.134600, -5.000000, 0.999970, -0.007700, 0.000000
GOTO/CART, -12.438439, 5.264615, -5.000000
GOTO/CART, -9.476938, 9.623855, -5.000000
GOTO/CART, -5.072659, 12.517949, -5.000000
PTMEAS/CART, 0.134600, 17.499482, -5.000000, -0.007700, -0.999970, 0.000000
GOTO/CART, 0.103886, 13.506300, 45.000000
ENDMES
F(J-2) = FEAT/CIRCLE,INNER,CART, 70.5000, 0.0000, -5.0000, 0.000000,$
-0.000000, 1.000000, 35.2000
$$ Measurement points are created through nominal points
CALL/M(EASI_CLEARPLN_GOTO), 1, 0.112622, 13.508852, 50.993301
MEAS/CIRCLE, F(J-2), 4
GOTO/CART, 0.112622, 13.508852, 50.993301
GOTO/CART, 84.006300, -0.103886, 45.000000
PTMEAS/CART, 87.999482, -0.134600, -5.000000, -0.999970, 0.007700, -0.000000
GOTO/CART, 82.938439, -5.264615, -5.000000
GOTO/CART, 79.976938, -9.623855, -5.000000
GOTO/CART, 75.572659, -12.517949, -5.000000
PTMEAS/CART, 70.365400, -17.499482, -5.000000, 0.007700, 0.999970, -0.000000
GOTO/CART, 65.235385, -12.438439, -5.000000
GOTO/CART, 60.876145, -9.476938, -5.000000
GOTO/CART, 57.982051, -5.072659, -5.000000
PTMEAS/CART, 53.000518, 0.134600, -5.000000, 0.999970, -0.007700, 0.000000
GOTO/CART, 58.061561, 5.264615, -5.000000
GOTO/CART, 61.023062, 9.623855, -5.000000
GOTO/CART, 65.427341, 12.517949, -5.000000
PTMEAS/CART, 70.634600, 17.499482, -5.000000, -0.007700, -0.999970, 0.000000
GOTO/CART, 70.603886, 13.506300, 45.000000
ENDMES
F(J-3) = FEAT/CIRCLE,INNER,CART, -4.7500, -50.0000, -5.0000, 0.000000,$
-0.000000, 1.000000, 8.0000
$$ Measurement points are created through nominal points
CALL/M(EASI_CLEARPLN_GOTO), 1, -4.743301, -50.000052, 45.000000
MEAS/CIRCLE, F(J-3), 4
GOTO/CART, -4.743301, -50.000052, 45.000000
PTMEAS/CART, -0.750119, -50.030800, -5.000000, -0.999970, 0.007700,$
-0.000000
PTMEAS/CART, -4.780800, -53.999881, -5.000000, 0.007700, 0.999970, -0.000000
PTMEAS/CART, -8.749881, -49.969200, -5.000000, 0.999970, -0.007700, 0.000000
PTMEAS/CART, -4.719200, -46.000119, -5.000000, -0.007700, -0.999970,$
0.000000
GOTO/CART, -4.749948, -49.993301, 45.000000
ENDMES
F(J-4) = FEAT/CIRCLE,INNER,CART, 75.2500, -50.0000, -5.0000, 0.000000,$
-0.000000, 1.000000, 8.0000
$$ Measurement points are created through nominal points
CALL/M(EASI_CLEARPLN_GOTO), 1, -4.740238, -49.992304, 50.993301
MEAS/CIRCLE, F(J-4), 4
GOTO/CART, -4.740238, -49.992304, 50.993301
GOTO/CART, 75.256699, -50.000052, 45.000000
PTMEAS/CART, 79.249881, -50.030800, -5.000000, -0.999970, 0.007700,$
-0.000000
PTMEAS/CART, 75.219200, -53.999881, -5.000000, 0.007700, 0.999970, -0.000000
PTMEAS/CART, 71.250119, -49.969200, -5.000000, 0.999970, -0.007700, 0.000000
PTMEAS/CART, 75.280800, -46.000119, -5.000000, -0.007700, -0.999970,$
0.000000
GOTO/CART, 75.250052, -49.993301, 45.000000
ENDMES
F(J-5) = FEAT/CIRCLE,INNER,CART, -14.7500, -85.0000, -5.0000, 0.000000,$
-0.000000, 1.000000, 8.0000
$$ Measurement points are created through nominal points
CALL/M(EASI_CLEARPLN_GOTO), 1, 75.258617, -49.991418, 50.993301
MEAS/CIRCLE, F(J-5), 4
GOTO/CART, 75.258617, -49.991418, 50.993301
GOTO/CART, -14.743301, -85.000052, 45.000000
PTMEAS/CART, -10.750119, -85.030800, -5.000000, -0.999970, 0.007700,$
-0.000000
PTMEAS/CART, -14.780800, -88.999881, -5.000000, 0.007700, 0.999970,$
-0.000000
PTMEAS/CART, -18.749881, -84.969200, -5.000000, 0.999970, -0.007700,$
0.000000
PTMEAS/CART, -14.719200, -81.000119, -5.000000, -0.007700, -0.999970,$
0.000000
GOTO/CART, -14.749948, -84.993301, 45.000000
ENDMES
F(J-6) = FEAT/CIRCLE,INNER,CART, 85.2500, 85.0000, -5.0000, 0.000000,$
-0.000000, 1.000000, 7.9977
$$ Measurement points are created through nominal points
CALL/M(EASI_CLEARPLN_GOTO), 1, -14.740631, -84.990851, 50.993301
MEAS/CIRCLE, F(J-6), 4
GOTO/CART, -14.740631, -84.990851, 50.993301
GOTO/CART, 85.255549, 84.999957, 45.000000
PTMEAS/CART, 89.248731, 84.969200, -5.000000, -0.999970, 0.007700, -0.000000
PTMEAS/CART, 85.219200, 81.001269, -5.000000, 0.007700, 0.999970, -0.000000
PTMEAS/CART, 81.251269, 85.030800, -5.000000, 0.999970, -0.007700, 0.000000
PTMEAS/CART, 85.280800, 88.998731, -5.000000, -0.007700, -0.999970, 0.000000
GOTO/CART, 85.250043, 85.005549, 45.000000
ENDMES
MODE/AUTO,PROG,MAN
BADTST/ON
SNSET/SEARCH,6.0000
F(ST1)=FEAT/POINT,CART,0,0,0,0,0,1
MEAS/POINT,F(ST1),1
PTMEAS/CART,0,0,0
ENDMES
$$ check to see if the point feature was successfully measured.
$$ if not sucecess mesure the hole
IF/(BADPT())
SNSET/RETRCT,5
SNSET/APPRCH,5
F(S-CIRE1)=FEAT/CIRCLE,INNER,CART,0,0,-5,0,0,1,35.2
MEAS/CIRCLE,F(S-CIRE1),4
ENDMES
ENDIF
BADTST/OFF
T(TCOR1) = TOL/CORTOL,XAXIS, -0.020, 0.020
T(TCOR2) = TOL/CORTOL,YAXIS, -0.020, 0.020
OUTPUT/FA(J-1),TA(TCOR1),TA(TCOR2)
OUTPUT/FA(J-2),TA(TCOR1),TA(TCOR2)
OUTPUT/FA(J-3),TA(TCOR1),TA(TCOR2)
OUTPUT/FA(J-4),TA(TCOR1),TA(TCOR2)
OUTPUT/FA(J-5),TA(TCOR1),TA(TCOR2)
OUTPUT/FA(J-6),TA(TCOR1),TA(TCOR2)