1. 编程流程简介
编程
(1)研读图纸----配置测针方案,确定装夹方案,规划坐标系----------打开自学习-----设定模式,设定逼近回退,设定测头角度,设定坐标系,设定移动轨迹,设定输出报告。
(2)打开机器
2.自学习模式的开启
3.模式选择
在编写程序之前先要设定好,点击黑色摇杆图样图标选择模式,模式/手动模式下写出的DMIS程序运行时需要用手柄操作执行,模式/程序模式,手动模式下所写DMIS程序运行时机器会自动运行,我们选择对应的模式就会生成对应的语句。
$$/* Header
DMISMN/'Created by [山涧果子] on 星期一, 九月 25, 2023', 4.0
UNITS/MM, ANGDEC, MMPS
WKPLAN/XYPLAN
PRCOMP/ON
TECOMP/ON
FLY/1.0000
MODE/PROG, MAN
SNSET/APPRCH, 2.0000
SNSET/RETRCT, 2.0000
SNSET/DEPTH, 0
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, 35.0000
RECALL/D(MCS)
SNSLCT/S(D2L30)
GEOALG/BF, LSTSQR
GEOALG/ANGLB, DEFALT
GEOALG/CIRCLE, LSTSQR
GEOALG/ARC, LSTSQR
GEOALG/PLANE, LSTSQR
$$
$$
$$*/
MODE/MAN
4.参数设置
接近距离:测量产品前测头距离目标点的距离
回退距离:测量目标点结束后测头回弹的距离
深度:设定测量轨迹时测点位置到端口的距离
间距面:开始测量前和结束测量后测针停靠的高度
搜索距离:在测头到达理论测量点位置后,如果没有发生出发,继续向触碰方向前进的距离
应用:对于测量设置的输入值,点击应用进行接受。
如果打开软件自学习,会自动记录DMIS程序。
除上述参数外还有单位和测头补偿的设置也很关键。
5.设定测头角度
测量时测头的角度需要激活完成目标元素所需角度,操作方法为在测量下一目标之前激活对应的测头角度,软件会自动记录角度切换的命令,程序执行时就可以直接更换角度了,此处应当注意的是当你使用的测座是自动测座时要特别注意设备的位置,设置好旋转时的安全点,防止测座碰撞。
6.设定坐标基准
坐标系的写入只需要我们在创建坐标系时将自学自模式打开即可完整记录坐标系的创建过程,包括基准要素的测量。坐标基准一般会创建2次,第一次为初建,即将运行模式设置为手动模式,为了程序的自动运行而建立的定位基准,第二次是将运行模式调整为程序模式,创建一个用于后面的特征位置计算和公差运算的参考坐标系。。
7.设定移动轨迹
程序在自动运行时元素与元素之间需要有过渡点来实现机器的连续运转,并且避免撞机,这种只产生移动不产生碰撞检测的过程我们称之为移动轨迹,控制移动轨迹的命令我们称之为移动命令。。
(1)移动点
移动点命令是将机器停靠在一个固定的坐标位置,从而达到避开障碍的效果,可以通过按手柄上的按键直接写入到程序中,或者按照如下格式直接书写DMIS命令,GOTO/X,Y,Z,检测一个产品时常常会用到多个移动点。
(2)移动到安全平面
当某一个测针角度需要测量的元素很多,此时写移动点串联轨迹就需要很多移动点参与,这时候我们可以设置一个安全高度,在测量之前和测量之后都移动到这个高度,这个操作可以大大提高编程效率,使用设置中的间距面来设置。
8.设定输出
$$/* Header
DMISMN/'Created by [山涧果子] on 星期一, 九月 25, 2023', 4.0
UNITS/MM, ANGDEC, MMPS
WKPLAN/XYPLAN
PRCOMP/ON
TECOMP/ON
FLY/1.0000
MODE/PROG, MAN
SNSET/APPRCH, 2.0000
SNSET/RETRCT, 2.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, 35.0000
RECALL/D(MCS)
SNSLCT/S(D2L30)
GEOALG/BF, LSTSQR
GEOALG/ANGLB, DEFALT
GEOALG/CIRCLE, LSTSQR
GEOALG/ARC, LSTSQR
GEOALG/PLANE, LSTSQR
$$
$$
$$*/
MODE/MAN
F(PLN1)=FEAT/PLANE,CART,85.8013,30.9057,30.0000,0.0000,0.0000,1.0000
$$ Measurement points are created through nominal points
MEAS/PLANE, F(PLN1), 3
PTMEAS/CART, 49.1347, 81.3067, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 58.4753, 7.9741, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 149.7939, 3.4362, 30.0000, 0.0000, 0.0000, 1.0000
ENDMES
D(CRD1) = DATSET/FA(PLN1), ZDIR
F(LN1)=FEAT/LINE,BND,CART,53.6000,0.0000,26.0642,150.5724,0.0000,24.7817,0.0000,-1.0000,0.0000
$$ Measurement points are created through nominal points
MEAS/LINE, F(LN1), 2
PTMEAS/CART, 53.6000, 0.0000, 26.0642, 0.0000, -1.0000, 0.0000
PTMEAS/CART, 150.5724, 0.0000, 24.7817, 0.0000, -1.0000, 0.0000
ENDMES
F(PT1)=FEAT/POINT,CART,0.0000,4.2699,38.3561,-1.0000,0.0000,0.0000
MEAS/POINT, F(PT1), 1
PTMEAS/CART, 0.0000,4.2699,38.3561,-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, -30, YORIG, -0, XORIG, -0
$$ Set.CAD2PCS.CADM_1
MODE/PROG,MAN
SNSET/APPRCH, 2.0000
SNSET/RETRCT, 2.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, FA(PLN1), 35.0000
F(DATUM-A)=FEAT/PLANE,CART,50.0000,55.3750,30.0000,0.0000,0.0000,1.0000
$$ Measurement points are created through nominal points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, -3.0000, 4.2699, 66.0000
MEAS/PLANE, F(DATUM-A), 12
GOTO/CART, -3.0000, 4.2699, 66.0000
GOTO/CART, 54.0221, 7.1633, 66.0000
PTMEAS/CART, 54.0221, 7.1633, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 117.3578, 6.8124, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 151.3251, 3.4453, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 145.7462, 28.0147, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 179.0303, 48.7963, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 192.0292, 67.1832, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 120.0820, 82.8796, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 68.4228, 90.9379, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 13.7174, 95.7851, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 9.0587, 70.8508, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 54.1858, 64.6624, 30.0000, 0.0000, 0.0000, 1.0000
PTMEAS/CART, 59.6927, 35.2011, 30.0000, 0.0000, 0.0000, 1.0000
ENDMES
D(CRD3) = DATSET/FA(DATUM-A), ZDIR
F(DATUM-B)=FEAT/LINE,BND,CART,4.9266,0.0000,25.0000,148.7200,0.0000,25.0000,0.0000,-1.0000,0.0000
$$ Measurement points are created through nominal points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 59.6927, 35.2011, 66.0000
MEAS/LINE, F(DATUM-B), 3
GOTO/CART, 59.6927, 35.2011, 66.0000
GOTO/CART, 4.9266, -3.0000, 66.0000
PTMEAS/CART, 4.9266, 0.0000, 25.0000, 0.0000, -1.0000, 0.0000
PTMEAS/CART, 61.9847, 0.0000, 25.0000, 0.0000, -1.0000, 0.0000
PTMEAS/CART, 148.7200, 0.0000, 25.0000, 0.0000, -1.0000, 0.0000
ENDMES
F(DATUM-C)=FEAT/LINE,BND,CART,0.0000,8.2145,25.0000,0.0000,93.9969,25.0000,-1.0000,-0.0000,-0.0000
$$ Measurement points are created through nominal points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 148.7200, -3.0000, 66.0000
MEAS/LINE, F(DATUM-C), 3
GOTO/CART, 148.7200, -3.0000, 66.0000
GOTO/CART, -3.0000, 8.2145, 66.0000
PTMEAS/CART, 0.0000, 8.2145, 25.0000, -1.0000, 0.0000, 0.0000
PTMEAS/CART, 0.0000, 68.6785, 25.0000, -1.0000, 0.0000, 0.0000
PTMEAS/CART, 0.0000, 93.9969, 25.0000, -1.0000, 0.0000, 0.0000
ENDMES
F(PT_INTER1)=FEAT/POINT,CART,0.0000,0.0000,25.0000,0.0000,0.0000,1.0000
CONST/POINT,F(PT_INTER1),INTOF,FA(DATUM-B),FA(DATUM-C)
D(CRD4) = DATSET/FA(DATUM-A), ZDIR, ZORIG, FA(DATUM-B), XDIR, FA(PT_INTER1), XORIG
D(CRD4) = TRANS/ZORIG, -30, YORIG, FA(PT_INTER1), XORIG, -0
$$ Set.CAD2PCS.CADM_1
GOTO/-3.0000, 93.9969, 105.0000
GOTO/100.0000, 50.0000, 90.0000
F(CIR1)=FEAT/CIRCLE,INNER,CART,100.0000,50.0000,27.0000,0.0000,0.0000,1.0000, 60.0000
$$ Measurement points are created through nominal points
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 100.0000, 77.0000, 66.0000
MEAS/CIRCLE, F(CIR1), 12
GOTO/CART, 100.0000, 77.0000, 66.0000
GOTO/CART, 100.0000, 77.0000, 62.0000
PTMEAS/CART, 100.0000, 80.0000, 27.0000, -0.0000, -1.0000, -0.0000
GOTO/CART, 106.9881, 76.0800, 27.0000
PTMEAS/CART, 115.0000, 75.9808, 27.0000, -0.5000, -0.8660, -0.0000
PTMEAS/CART, 125.9808, 65.0000, 27.0000, -0.8660, -0.5000, -0.0000
PTMEAS/CART, 130.0000, 50.0000, 27.0000, -1.0000, -0.0000, -0.0000
PTMEAS/CART, 125.9808, 35.0000, 27.0000, -0.8660, 0.5000, 0.0000
PTMEAS/CART, 115.0000, 24.0192, 27.0000, -0.5000, 0.8660, 0.0000
PTMEAS/CART, 100.0000, 20.0000, 27.0000, 0.0000, 1.0000, 0.0000
GOTO/CART, 93.0119, 23.9200, 27.0000
PTMEAS/CART, 85.0000, 24.0192, 27.0000, 0.5000, 0.8660, 0.0000
PTMEAS/CART, 74.0192, 35.0000, 27.0000, 0.8660, 0.5000, 0.0000
PTMEAS/CART, 70.0000, 50.0000, 27.0000, 1.0000, 0.0000, 0.0000
GOTO/CART, 73.9200, 56.9881, 27.0000
PTMEAS/CART, 74.0192, 65.0000, 27.0000, 0.8660, -0.5000, 0.0000
PTMEAS/CART, 85.0000, 75.9808, 27.0000, 0.5000, -0.8660, 0.0000
GOTO/CART, 86.5000, 73.3827, 62.0000
ENDMES
F(PT2)=FEAT/POINT,CART,195.4853,7.8878,15.0000,0.0000,0.0000,1.0000
SNSET/APPRCH, 2.0000
SNSET/RETRCT, 2.0000
SNSET/DEPTH, 0.0000
SNSET/SEARCH, 10.0000
SNSET/CLRSRF, FA(DATUM-A), 35.0000
$$ CALL/M(EASI_CLEARPLN_GOTO), 1, 195.4853, 7.8878, 18.0000
MEAS/POINT,F(PT2),1,CLRSRF,FA(DATUM-A),35.0000,CLRSRF,FA(DATUM-A),80.0000
GOTO/CART, 195.4853,7.8878,66.0000
PTMEAS/CART, 195.4853,7.8878,15.0000,0.0000,0.0000,1.0000
ENDMES
T(TDM1)=TOL/DIAM,0.0000,0.0210
OUTPUT/FA(CIR1),TA(TDM1)