相关文章,在仿真秀官网搜索:
RationalDMIS 2022元素拾取:面型元素拾取+测量:平面,圆柱,圆锥,球,圆环,曲面
RationalDMIS 2022元素拾取:线型元素拾取+测量:圆,直线,曲线
RationalDMIS 2022元素拾取:点型元素拾取+测量:点,键槽,椭圆,正多边形
RationalDMIS 2020 脱机编程+镜像程序 最新详解 2021
RationalDMIS 2020 简单说说数模编程 (脱机编程) 2021
RationalDMIS 2020 脱机编程注意事项
换工件的时候可以暂停
编程时,使用该命令可以减少断点和提示语句的输入,方便测量,防止碰撞!作用相当于DMIS标准中的PASUE功能。。。
(1)DMESW/STOP 语句
这个命令可以停止 DMIS 程序的执行,在和外部设备同步时需要使用这条命令 。
例如:
DID(DEFAULTSOCKET) = DEVICE/SOCKET,':8000'
OPEN/DID(DEFAULTSOCKET),DIRECT,OUTPUT
GOTO/100.000000, 0.000000, 0.000000
GOTO/100.000000, 100.000000, 0.000000
GOTO/100.000000, 100.000000, 100.000000
DMESW/COMAND,'WAITSTOP'
WRITE/DID(DEFAULTSOCKET),'I am ready'
DMESW/STOP
CLOSE/DID(DEFAULTSOCKET)
定义并打开接口
DID(DEFAULTSOCKET) = DEVICE/SOCKET,':8000'
OPEN/DID(DEFAULTSOCKET),DIRECT,OUTPUT
通知外部程序 CMM 状态
WRITE/DID(DEFAULTSOCKET),'I am ready'
停止 DMIS 执行,并等待外部程序反馈
DMESW/STOP
使用外部程序控制软件继续运行 DMIS
(2)RESUME/STOP
这个命令会终止当前的程序执行,并使语法解析器处于暂停状态。
(3)DMESW/DELAY,120
可以用DMESW/DELAY,n 这个延迟来替代,n表示需要停止多少秒。
(4)TEXT/OPER, '是否,继续测量!'
根据提示语句,选择是否继续测量!
也可以直接无条件循环,加一个弹出提示就行,换完按一下确定就行了。
(kkkk)
$$定义循环开始标记
„„
$$中间输入要循环执行的语句,例如循环测量 PT1
TEXT/OPER, '是否,继续测量!
'$$等待控制器执行完
JUMPTO/(kkkk)
$$/* Header
DMISMN/'Created by [山涧果子] on 星期五, 一月 21, 20082', 4.0
UNITS/MM, ANGDEC, MMPS
WKPLAN/XYPLAN
PRCOMP/ON
TECOMP/ON
FLY/1.0000
MODE/MAN
SNSET/APPRCH, 2.0000
SNSET/RETRCT, 2.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, 10.0000
RECALL/D(MCS)
SNSLCT/S(L30D2)
GEOALG/BF, LSTSQR
GEOALG/ANGLB, DEFALT
GEOALG/CIRCLE, LSTSQR
GEOALG/ARC, LSTSQR
GEOALG/PLANE, LSTSQR
$$
$$
$$*/
MODE/MAN
F(PLN1)=FEAT/PLANE,CART,33.5804,40.8807,0.0000,0.0000,0.0000,1.0000
$$ Measurement points are created through nominal points
MEAS/PLANE, F(PLN1), 4
PTMEAS/CART, 6.7824, 57.9351, 0.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 5.4747, 11.0406, 0.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 59.2418, 12.1105, 0.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 62.8225, 82.4368, 0.0000, 0.0000, 0.0000, 1.0000
ENDMES
D(CRD1) = DATSET/FA(PLN1), ZDIR
F(LN1)=FEAT/LINE,BND,CART,4.7612,0.0000,-2.6257,63.2680,0.0000,-1.7509,0.0000,-1.0000,0.0000
$$ Measurement points are created through nominal points
MEAS/LINE, F(LN1), 2
PTMEAS/CART, 4.7612, 0.0000, -2.6257, 0.0000, -1.0000, 0.0000
PTMEAS/CART, 63.2680, 0.0000, -1.7509, 0.0000, -1.0000, 0.0000
ENDMES
F(PT1)=FEAT/POINT,CART,0.0000,4.1472,-1.9774,-1.0000,-0.0000,-0.0000
MEAS/POINT, F(PT1), 1
PTMEAS/CART, 0.0000,4.1472,-1.9774,-1.0000,-0.0000,-0.0000
ENDMES
D(CRD2) = DATSET/FA(PLN1), ZDIR, ZORIG, FA(LN1), XDIR, YORIG, FA(PT1), XORIG
D(CRD2) = TRANS/ZORIG, -0, YORIG, -0, XORIG, -0
$$ Set.CAD2PCS.CADM_1
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, 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, FA(PLN1), 10.0000
F(PT2)=FEAT/POINT,CART,5.0075,59.6062,0.0000,0.0000,0.0000,1.0000
F(PT3)=FEAT/POINT,CART,7.6859,4.7016,0.0000,0.0000,0.0000,1.0000
F(PT4)=FEAT/POINT,CART,59.5643,6.9515,0.0000,0.0000,0.0000,1.0000
F(PT5)=FEAT/POINT,CART,41.9836,93.3840,0.0000,0.0000,0.0000,1.0000
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 5.0075, 59.6062, 3.0000
MEAS/POINT, F(PT2), 1
GOTO/CART, 5.0075,59.6062,11.0000
PTMEAS/CART, 5.0075,59.6062,0.0000,0.0000,0.0000,1.0000
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 7.6859, 4.7016, 3.0000
MEAS/POINT, F(PT3), 1
GOTO/CART, 7.6859,4.7016,11.0000
PTMEAS/CART, 7.6859,4.7016,0.0000,0.0000,0.0000,1.0000
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 59.5643, 6.9515, 3.0000
MEAS/POINT, F(PT4), 1
GOTO/CART, 59.5643,6.9515,11.0000
PTMEAS/CART, 59.5643,6.9515,0.0000,0.0000,0.0000,1.0000
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 41.9836, 93.3840, 3.0000
MEAS/POINT, F(PT5), 1
GOTO/CART, 41.9836,93.3840,11.0000
PTMEAS/CART, 41.9836,93.3840,0.0000,0.0000,0.0000,1.0000
ENDMES
DMESW/STOP
F(CIR1)=FEAT/CIRCLE,INNER,CART,31.5000,31.5000,-3.0000,0.0000,0.0000,1.0000, 20.0000
$$ Measurement points are created through nominal points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 32.6692, 38.4017, 11.0000
MEAS/CIRCLE, F(CIR1), 5
GOTO/CART, 32.6692, 38.4017, 11.0000
PTMEAS/CART, 33.1703, 41.3595, -3.0000, -0.1670, -0.9860, 0.0000
GOTO/CART, 30.4792, 38.4252, -3.0000
GOTO/CART, 28.3892, 37.7708, -3.0000
GOTO/CART, 26.6037, 36.5026, -3.0000
PTMEAS/CART, 22.6392, 36.1353, -3.0000, 0.8861, -0.4635, 0.0000
GOTO/CART, 24.5983, 32.6692, -3.0000
GOTO/CART, 24.5748, 30.4792, -3.0000
GOTO/CART, 25.2292, 28.3892, -3.0000
PTMEAS/CART, 24.3534, 24.5052, -3.0000, 0.7147, 0.6995, 0.0000
GOTO/CART, 28.2553, 25.2974, -3.0000
GOTO/CART, 30.3308, 24.5983, -3.0000
GOTO/CART, 32.5208, 24.5748, -3.0000
PTMEAS/CART, 35.9440, 22.5417, -3.0000, -0.4444, 0.8958, 0.0000
GOTO/CART, 36.3963, 26.4974, -3.0000
GOTO/CART, 37.7026, 28.2553, -3.0000
GOTO/CART, 38.4017, 30.3308, -3.0000
PTMEAS/CART, 41.3931, 32.9582, -3.0000, -0.9893, -0.1458, 0.0000
GOTO/CART, 38.4252, 32.5208, 11.0000
ENDMES
RESUME/STOP
F(CIR2)=FEAT/CIRCLE,INNER,CART,52.4500,11.5500,-3.0000,0.0000,0.0000,1.0000, 6.7960
$$ Measurement points are created through nominal points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 52.3995, 11.9448, 11.0000
MEAS/CIRCLE, F(CIR2), 5
GOTO/CART, 52.3995, 11.9448, 11.0000
PTMEAS/CART, 52.0189, 14.9205, -3.0000, 0.1269, -0.9919, 0.0000
PTMEAS/CART, 49.1112, 12.1816, -3.0000, 0.9826, -0.1859, 0.0000
PTMEAS/CART, 50.8176, 8.5698, -3.0000, 0.4804, 0.8770, 0.0000
PTMEAS/CART, 54.7799, 9.0766, -3.0000, -0.6857, 0.7279, 0.0000
PTMEAS/CART, 55.5224, 13.0015, -3.0000, -0.9042, -0.4272, 0.0000
GOTO/CART, 52.8099, 11.7200, 11.0000
ENDMES
DMESW/DELAY,120
F(CIR3)=FEAT/CIRCLE,INNER,CART,47.0885,40.5000,-3.0000,0.0000,0.0000,1.0000, 10.0000
$$ Measurement points are created through nominal points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 45.6174, 39.1451, 11.0000
MEAS/CIRCLE, F(CIR3), 5
GOTO/CART, 45.6174, 39.1451, 11.0000
PTMEAS/CART, 43.4107, 37.1126, -3.0000, 0.7356, 0.6775, 0.0000
GOTO/CART, 46.1081, 38.7568, -3.0000
GOTO/CART, 46.6947, 38.5391, -3.0000
GOTO/CART, 47.3199, 38.5134, -3.0000
PTMEAS/CART, 49.1735, 35.9555, -3.0000, -0.4170, 0.9089, 0.0000
GOTO/CART, 48.4434, 39.0289, -3.0000
GOTO/CART, 48.8317, 39.5196, -3.0000
GOTO/CART, 49.0493, 40.1063, -3.0000
PTMEAS/CART, 52.0549, 41.0787, -3.0000, -0.9933, -0.1157, 0.0000
GOTO/CART, 48.9063, 41.3340, -3.0000
GOTO/CART, 48.5596, 41.8549, -3.0000
GOTO/CART, 48.0689, 42.2432, -3.0000
PTMEAS/CART, 48.0728, 45.4022, -3.0000, -0.1969, -0.9804, 0.0000
GOTO/CART, 46.8570, 42.4866, -3.0000
GOTO/CART, 46.2544, 42.3178, -3.0000
GOTO/CART, 45.7335, 41.9711, -3.0000
PTMEAS/CART, 42.7304, 42.9510, -3.0000, 0.8716, -0.4902, 0.0000
GOTO/CART, 45.3452, 41.4804, 11.0000
ENDMES
TEXT/OPER, '是否,继续测量!'
F(PT6)=FEAT/POINT,CART,18.3153,78.0516,-3.0000,0.0000,0.0000,1.0000
F(PT7)=FEAT/POINT,CART,28.2918,59.9345,-3.0000,0.0000,0.0000,1.0000
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 28.2918, 59.9345, 0.0000
MEAS/POINT, F(PT7), 1
GOTO/CART, 28.2918,59.9345,11.0000
PTMEAS/CART, 28.2918,59.9345,-3.0000,0.0000,0.0000,1.0000
ENDMES
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 18.3153, 78.0516, 0.0000
MEAS/POINT, F(PT6), 1
GOTO/CART, 18.3153,78.0516,11.0000
PTMEAS/CART, 18.3153,78.0516,-3.0000,0.0000,0.0000,1.0000
ENDMES