引入虚点(当前测针红宝石球心的坐标)提高单件小批量产品检测效率1.平面找正第一轴2.将测尖放到孔中心,读取探针的球心作为坐标原点(X,Y原点)。$$ 对于测量需要注意的地方:$$ 在测量点的情况下(测量的类型为POINT),如果测量点数设置为1,那么将按照定义的理论值去测量。如果设置为0,将记录当时测针红宝石球心的坐标,将此作为当前测量点实际值。(1)设置点元素手动采集最少点数为0(2)将测尖放到孔中心(3)平移坐标系3.自动测量圆,精建坐标系。 引入虚点的程序,不受工件位置的局限性,省去了制作工装的费用,减少手动采点操作的重复性工作,节省了检测时间,此种检测方法在同类零件或结构相似的零件中都可使用,应用范围广。$$/* HeaderDMISMN/'Created by [爱科腾瑞科技(北京)有限公司-091520-DEMO] on 星期五, 五月 15, 2020', 4.0UNITS/MM, ANGDEC, MMPSWKPLAN/XYPLANPRCOMP/ONTECOMP/ONFLY/1.0000MODE/MANSNSET/APPRCH, 2.0000SNSET/RETRCT, 2.0000SNSET/DEPTH, 0.0000SNSET/SEARCH, 10.0000SNSET/CLRSRF, 20.0000RECALL/D(MCS)SNSLCT/S(L20-D2.0)GEOALG/BF, LSTSQRGEOALG/ANGLB, DEFALTGEOALG/CIRCLE, LSTSQRGEOALG/ARC, LSTSQRGEOALG/PLANE, LSTSQR$$$$$$*/MODE/MANF(PLN1)=FEAT/PLANE,CART,-0.9253,-1.4820,0.0000,0.0000,0.0000,1.0000$$ Measurement points are created through actual pointsMEAS/PLANE, F(PLN1), 3 PTMEAS/CART, -10.2486, 17.0148, -0.0000, 0.0000, 0.0000, 1.0000 PTMEAS/CART, -11.8742, -12.8735, -0.0000, 0.0000, 0.0000, 1.0000 PTMEAS/CART, 19.3471, -8.5872, -0.0000, 0.0000, 0.0000, 1.0000ENDMESD(CRD1) = DATSET/FA(PLN1), ZDIRD(CRD1) = TRANS/ZORIG, FA(PLN1)TEXT/OPER, '请将测头移动到圆孔中心位置!'$$ 对于测量需要注意的地方:$$ 在测量点的情况下(测量的类型为POINT),如果测量点数设置为1,那么将按照定义的理论值去测量。如果设置为0,将记录当时测针红宝石球心的坐标,将此作为当前测量点实际值。F(PT1)=FEAT/POINT,CART,0.0000,0.0000,0.0000,0.0000,0.0000,1.0000MEAS/POINT, F(PT1), 0ENDMESD(CRD2) = TRANS/XORIG, FA(PT1), YORIG, FA(PT1)MODE/PROG,MAN$$ 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, 2003M(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 ENDMACSNSET/APPRCH, 2.0000SNSET/RETRCT, 2.0000SNSET/DEPTH, 0.0000SNSET/SEARCH, 10.0000SNSET/CLRSRF, FA(PLN1), 20.0000F(CIR1)=FEAT/CIRCLE,INNER,CART,-0.0000,-0.0000,-4.0000,0.0000,0.0000,1.0000, 29.0000$$ Measurement points are created through nominal points$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 0.0000, 0.0000, 21.0000MEAS/CIRCLE, F(CIR1), 8 GOTO/CART, 0.0000, 0.0000, 21.0000 GOTO/CART, 11.5000, 0.0000, 21.0000 GOTO/CART, 11.5000, 0.0000, 16.0000 PTMEAS/CART, 14.5000, 0.0000, -4.0000, -1.0000, 0.0000, 0.0000 GOTO/CART, 10.6246, 4.4009, -4.0000 PTMEAS/CART, 10.2530, 10.2530, -4.0000, -0.7071, -0.7071, -0.0000 GOTO/CART, 4.4009, 10.6246, -4.0000 PTMEAS/CART, 0.0000, 14.5000, -4.0000, -0.0000, -1.0000, -0.0000 GOTO/CART, -4.4009, 10.6246, -4.0000 PTMEAS/CART, -10.2530, 10.2530, -4.0000, 0.7071, -0.7071, 0.0000 GOTO/CART, -10.6246, 4.4009, -4.0000 PTMEAS/CART, -14.5000, 0.0000, -4.0000, 1.0000, 0.0000, 0.0000 GOTO/CART, -10.6246, -4.4009, -4.0000 PTMEAS/CART, -10.2530, -10.2530, -4.0000, 0.7071, 0.7071, 0.0000 GOTO/CART, -4.4009, -10.6246, -4.0000 PTMEAS/CART, 0.0000, -14.5000, -4.0000, 0.0000, 1.0000, 0.0000 GOTO/CART, 4.4009, -10.6246, -4.0000 PTMEAS/CART, 10.2530, -10.2530, -4.0000, -0.7071, 0.7071, 0.0000 GOTO/CART, 8.1317, -8.1317, 16.0000ENDMESD(CRD3) = TRANS/XORIG, FA(CIR1), YORIG, FA(CIR1)来源:山涧果子