首页/文章/ 详情

RationalDMIS快速3-2-1创建坐标系

1年前浏览3922

典型的3-2-1创建工件坐标系的步骤如下:

            1、测量用于建立零件找正的几何特征,通常测量零件的一个平面

2、测量必要的其他几何特征,用来锁定零件的自由度

3、设为原点,建立坐标系,锁定工件

DMIS程序: 快速3-2-1坐标系  快速平分坐标系,在勾选创建元素的时候会自学习记录DMIS程序;

优点:有无数模都可以,对工件装夹要求不高,不要求工件更多的面与三轴垂直或平行!程序和6点拟合不一码事,对手动测点位置要求不高。


切记:
需要勾选“创建元素”和设置原点偏移。

    (1)用来创建新坐标系的测量点不需要存在数据库.默认情况下,新坐标系建立后它们就丢失掉了."创建元素"选项可以用来选择保存这些点.

    (2)当选中这个复选框后,就会创建出这些元素同时在自学习模式打开的情况下产生DMIS语句.产生的DMIS语句是可以重复运行的.

      (3)原点偏移:X, Y, Z轴的原点偏移可以使用户在创建新坐标系时能够选择将新坐标系的原点移动一段特定的距离.

DMISMN/'Created by [深圳力合精密装备科技有限公司-090118] on 星期五, 七月 13, 2018', 4.0

UNITS/MM, ANGDEC, MMPS

WKPLAN/XYPLAN

PRCOMP/ON

TECOMP/ON

FLY/1.000000

MODE/PROG, MAN

SNSET/APPRCH, 2.000000

SNSET/RETRCT, 2.000000

SNSET/DEPTH, 0.000000

SNSET/SEARCH, 10.000000

SNSET/CLRSRF, 30.000000

RECALL/D(MCS)

SNSLCT/S(ROOTSN1)

GEOALG/BF, LSTSQR

GEOALG/ANGLB, DEFALT

GEOALG/CIRCLE, LSTSQR

GEOALG/ARC, LSTSQR

GEOALG/PLANE, LSTSQR

$$

$$

MODE/MAN

$$ Following block is generated by Quick 321 alignment

DECL/COMMON, DOUBLE, DPROBEX, DPROBEY, DPROBEZ

PRCOMP/OFF

F(PT1)=FEAT/POINT,CART,7.694157,81.508110,36.996286,0.000000,0.000000,1.000000

F(PT2)=FEAT/POINT,CART,7.423362,23.213751,36.996286,0.000000,0.000000,1.000000

F(PT3)=FEAT/POINT,CART,77.289940,12.674599,36.996286,0.000000,0.000000,1.000000

F(PT4)=FEAT/POINT,CART,7.260486,-1.996286,16.243505,-0.000000,-1.000000,-0.000000

F(PT5)=FEAT/POINT,CART,51.274487,-1.996286,16.954004,-0.000000,-1.000000,-0.000000

F(PT6)=FEAT/POINT,CART,-1.996286,17.036184,29.230076,-1.000000,0.000000,0.000000

MEAS/POINT, F(PT1), 1

  PTMEAS/CART, 7.694157,81.508110,36.996286,0.000000,0.000000,1.000000

ENDMES

MEAS/POINT, F(PT2), 1

  PTMEAS/CART, 7.423362,23.213751,36.996286,0.000000,0.000000,1.000000

ENDMES

MEAS/POINT, F(PT3), 1

  PTMEAS/CART, 77.289940,12.674599,36.996286,0.000000,0.000000,1.000000

ENDMES

MEAS/POINT, F(PT4), 1

  PTMEAS/CART, 7.260486,-1.996286,16.243505,-0.000000,-1.000000,-0.000000

ENDMES

MEAS/POINT, F(PT5), 1

  PTMEAS/CART, 51.274487,-1.996286,16.954004,-0.000000,-1.000000,-0.000000

ENDMES

MEAS/POINT, F(PT6), 1

  PTMEAS/CART, -1.996286,17.036184,29.230076,-1.000000,0.000000,0.000000

ENDMES

KNPTR1 = OBTAIN/FA(PT1)[1], 5

KNPTR2 = OBTAIN/FA(PT1)[1], 6

KNPTR3 = OBTAIN/FA(PT1)[1], 7

F(PLN1) = FEAT/PLANE, CART, 0,0,0, KNPTR1,KNPTR2,KNPTR3

CONST/PLANE, F(PLN1), BF, FA(PT1), FA(PT2), FA(PT3)

KNPTR1 = OBTAIN/FA(PT4), 3

KNPTR2 = OBTAIN/FA(PT4), 4

KNPTR3 = OBTAIN/FA(PT4), 5

KNPTV1 = ASSIGN/VCART(KNPTR1,KNPTR2,KNPTR3)

KNPTR1 = OBTAIN/FA(PT5), 3

KNPTR2 = OBTAIN/FA(PT5), 4

KNPTR3 = OBTAIN/FA(PT5), 5

KNPTV2 = ASSIGN/VCART(KNPTR1,KNPTR2,KNPTR3)

KNPTV3 = ASSIGN/KNPTV2 - KNPTV1

KNPTV1 = ASSIGN/VUNIT(KNPTV3)

KNPTR1 = OBTAIN/FA(PT4)[1], 5

KNPTR2 = OBTAIN/FA(PT4)[1], 6

KNPTR3 = OBTAIN/FA(PT4)[1], 7

F(LN1) = FEAT/LINE, UNBND, CART, 0.000000, 0.000000, 0.000000, VECX(KNPTV1), VECY(KNPTV1), VECZ(KNPTV1), KNPTR1, KNPTR2, KNPTR3

CONST/LINE, F(LN1), BF, FA(PT4), FA(PT5)

D(CRD1) =DATSET/FA(PLN1), ZDIR, ZORIG

D(CRD1) =ROTATE/ZAXIS, FA(LN1), XDIR

D(CRD1) =TRANS/YORIG, FA(LN1)

D(CRD1) =TRANS/XORIG, FA(PT6)

KNPTC1 =VALUE/SNSLCT

KNPTR1 =OBTAIN/SS(KNPTC1), 8

DPROBEZ =ASSIGN/(KNPTR1/2)

KNPTR1 = OBTAIN/FA(PT4)[1], 5

KNPTR2 = OBTAIN/FA(PT4)[1], 6

KNPTR3 = OBTAIN/FA(PT4)[1], 7

KNPTV1 = ASSIGN/VCART(KNPTR1,KNPTR2,KNPTR3)

KNPTV2 = ASSIGN/VCART(0,1,0)

IF/(VDOT(KNPTV1,KNPTV2) .GT. 0)

  DPROBEY = ASSIGN/(-DPROBEZ)

ELSE

  DPROBEY = ASSIGN/DPROBEZ

ENDIF

KNPTR1 = OBTAIN/FA(PT6)[1], 5

KNPTR2 = OBTAIN/FA(PT6)[1], 6

KNPTR3 = OBTAIN/FA(PT6)[1], 7

KNPTV1 = ASSIGN/VCART(KNPTR1,KNPTR2,KNPTR3)

KNPTV2 = ASSIGN/VCART(1,0,0)

IF/(VDOT(KNPTV1,KNPTV2) .GT. 0)

  DPROBEX = ASSIGN/(-DPROBEZ)

ELSE

  DPROBEX = ASSIGN/DPROBEZ

ENDIF

D(CRD1) =TRANS/XORIG, DPROBEX, YORIG, DPROBEY, ZORIG, -DPROBEZ

D(CRD1) =TRANS/ZORIG, -35

PRCOMP/ON

$$ Set.CAD2PCS.CADM_1

$$

MODE/PROG,MAN

F(PLN1)=FEAT/PLANE,CART,31.250000,46.787796,35.000000,0.000000,0.000000,1.000000

$$ 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), 30.0000

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, -3.996286, 17.494539, 66.996286

MEAS/PLANE, F(PLN1), 4

  GOTO/CART,   -3.996286, 17.494539, 66.996286

  GOTO/CART,   10.172074, 26.745173, 66.996286

  PTMEAS/CART, 10.172074, 26.745173, 35.000000, 0.000000, 0.000000, 1.000000

  PTMEAS/CART,  7.951038, 75.315872, 35.000000, 0.000000, 0.000000, 1.000000

  PTMEAS/CART, 86.402725, 53.018738, 35.000000, 0.000000, 0.000000, 1.000000

  PTMEAS/CART, 76.716408, 19.077938, 35.000000, 0.000000, 0.000000, 1.000000

ENDMES

F(LN1)=FEAT/LINE,BND,CART,7.171782,-1.998258,16.243505,52.054069,-0.001972,16.409681,0.044434,-0.999012,0.000000

$$ Measurement points are created through actual points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 7.438058, -7.984912, 16.243505

MEAS/LINE, F(LN1), 2

  PTMEAS/CART,  7.171782, -1.998258, 16.243505, 0.044434, -0.999012, 0.000000

  PTMEAS/CART, 52.054069, -0.001972, 16.409681, 0.044434, -0.999012, 0.000000

ENDMES

F(LN2)=FEAT/LINE,BND,CART,0.000000,17.976633,30.609835,0.000000,67.622932,28.699263,-1.000000,0.000000,0.000000

$$ Measurement points are created through actual points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, -5.992573, 17.976633, 30.609835

MEAS/LINE, F(LN2), 2

  PTMEAS/CART, 0.000000, 17.976633, 30.609835, -1.000000, 0.000000, 0.000000

  PTMEAS/CART, 0.000000, 67.622932, 28.699263, -1.000000, 0.000000, 0.000000

ENDMES

F(LN_PROJ1)=FEAT/LINE,BND,CART,7.171782,-1.998258,35.000000,52.054069,-0.001972,35.000000,0.000000,0.000000,1.000000

CONST/LINE,F(LN_PROJ1),PROJLI,FA(LN1),FA(PLN1)

F(LN_PROJ2)=FEAT/LINE,BND,CART,0.000000,17.976633,35.000000,0.000000,67.622932,35.000000,0.000000,0.000000,1.000000

CONST/LINE,F(LN_PROJ2),PROJLI,FA(LN2),FA(PLN1)

F(PT_INTER1)=FEAT/POINT,CART,-0.000000,-2.317246,35.000000,0.000000,0.000000,1.000000

CONST/POINT,F(PT_INTER1),INTOF,FA(LN_PROJ1),FA(LN_PROJ2)

D(CRD2) = DATSET/FA(PLN1), ZDIR, ZORIG, FA(LN_PROJ1), XDIR, FA(PT_INTER1), XORIG

D(CRD2) = TRANS/ZORIG, -35, YORIG, FA(PT_INTER1), 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, F(PLN1), 30.0000

F(CIR1)=FEAT/CIRCLE,INNER,CART,8.000000,55.000000,32.000000,0.000000,0.000000,1.000000, 10.000000

F(CIR2)=FEAT/CIRCLE,INNER,CART,24.000000,82.712813,32.000000,-0.000000,-0.000000,1.000000, 10.000000

F(CIR3)=FEAT/CIRCLE,INNER,CART,56.000000,82.712813,32.000000,0.000000,0.000000,1.000000, 10.000000

F(CIR4)=FEAT/CIRCLE,INNER,CART,72.000000,55.000000,32.000000,0.000000,0.000000,1.000000, 10.000000

F(CIR5)=FEAT/CIRCLE,INNER,CART,56.000000,27.287187,32.000000,-0.000000,-0.000000,1.000000, 10.000000

F(CIR6)=FEAT/CIRCLE,INNER,CART,24.000000,27.287187,32.000000,-0.000000,0.000000,1.000000, 10.000000

F(CIR7)=FEAT/CIRCLE,INNER,CART,40.000000,55.000000,32.000000,0.000000,0.000000,1.000000, 45.000000

F(CIR8)=FEAT/CIRCLE,INNER,CART,40.000000,55.000000,27.000000,0.000000,0.000000,1.000000, 20.000000

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 7.489714, 55.864320, 66.996286

MEAS/CIRCLE, F(CIR1), 4

  GOTO/CART,    7.489714, 55.864320, 66.996286

  PTMEAS/CART,  5.458008, 59.305610, 32.000000,  0.508398, -0.861122,  0.000000

  PTMEAS/CART,  3.694390, 52.458008, 32.000000,  0.861122,  0.508398, -0.000000

  PTMEAS/CART, 10.541992, 50.694390, 32.000000, -0.508398,  0.861122, -0.000000

  PTMEAS/CART, 12.305610, 57.541992, 32.000000, -0.861122, -0.508398,  0.000000

  GOTO/CART,    8.864320, 55.510286, 66.996286

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 23.105464, 82.257570, 66.996286

MEAS/CIRCLE, F(CIR2), 4

  GOTO/CART,   23.105464, 82.257570, 66.996286

  PTMEAS/CART, 19.543867, 80.445021, 32.000000,  0.891227,  0.453558,  0.000000

  PTMEAS/CART, 26.267792, 78.256680, 32.000000, -0.453558,  0.891227, -0.000000

  PTMEAS/CART, 28.456133, 84.980605, 32.000000, -0.891227, -0.453558, -0.000000

  PTMEAS/CART, 21.732208, 87.168946, 32.000000,  0.453558, -0.891227,  0.000000

  GOTO/CART,   23.544757, 83.607349, 66.996286

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 55.020272, 82.494697, 66.996286

MEAS/CIRCLE, F(CIR3), 4

  GOTO/CART,   55.020272, 82.494697, 66.996286

  PTMEAS/CART, 51.119485, 81.626270, 32.000000,  0.976103,  0.217309, 0.000000

  PTMEAS/CART, 57.086543, 77.832298, 32.000000, -0.217309,  0.976103, 0.000000

  PTMEAS/CART, 60.880515, 83.799355, 32.000000, -0.976103, -0.217309, 0.000000

  PTMEAS/CART, 54.913457, 87.593328, 32.000000,  0.217309, -0.976103, 0.000000

  GOTO/CART,   55.781884, 83.692541, 66.996286

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 71.017020, 55.202958, 66.996286

MEAS/CIRCLE, F(CIR4), 4

  GOTO/CART,   71.017020, 55.202958, 66.996286

  PTMEAS/CART, 67.103286, 56.011037, 32.000000,  0.979343, -0.202207,  0.000000

  PTMEAS/CART, 70.988963, 50.103286, 32.000000,  0.202207,  0.979343, -0.000000

  PTMEAS/CART, 76.896714, 53.988963, 32.000000, -0.979343,  0.202207, -0.000000

  PTMEAS/CART, 73.011037, 59.896714, 32.000000, -0.202207, -0.979343,  0.000000

  GOTO/CART,   72.202958, 55.982980, 66.996286

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 55.197693, 27.890300, 66.996286

MEAS/CIRCLE, F(CIR5), 4

  GOTO/CART,   55.197693, 27.890300, 66.996286

  PTMEAS/CART, 52.003309, 30.291594, 32.000000,  0.799338, -0.600881, -0.000000

  PTMEAS/CART, 52.995593, 23.290496, 32.000000,  0.600881,  0.799338,  0.000000

  PTMEAS/CART, 59.996691, 24.282780, 32.000000, -0.799338,  0.600881,  0.000000

  PTMEAS/CART, 59.004407, 31.283878, 32.000000, -0.600881, -0.799338, -0.000000

  GOTO/CART,   56.603113, 28.089494, 66.996286

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 23.495160, 28.154700, 66.996286

MEAS/CIRCLE, F(CIR6), 4

  GOTO/CART,   23.495160, 28.154700, 66.996286

  PTMEAS/CART, 21.485141, 31.608701, 32.000000,  0.502972, -0.864303,  0.000000

  PTMEAS/CART, 19.678486, 24.772328, 32.000000,  0.864303,  0.502972,  0.000000

  PTMEAS/CART, 26.514859, 22.965673, 32.000000, -0.502972,  0.864303, -0.000000

  PTMEAS/CART, 28.321514, 29.802046, 32.000000, -0.864303, -0.502972, -0.000000

  GOTO/CART,   24.867513, 27.792027, 66.996286

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 22.635229, 61.391570, 66.996286

MEAS/CIRCLE, F(CIR7), 4

  GOTO/CART,   22.635229, 61.391570, 66.996286

  PTMEAS/CART, 18.884923, 62.771971, 32.000000,  0.938448, -0.345421,  0.000000

  GOTO/CART,   21.511096, 54.259830, 32.000000

  GOTO/CART,   23.201731, 47.240775, 32.000000

  GOTO/CART,   27.449750, 41.402992, 32.000000

  PTMEAS/CART, 32.228029, 33.884923, 32.000000,  0.345421,  0.938448, -0.000000

  GOTO/CART,   40.740170, 36.511096, 32.000000

  GOTO/CART,   47.759225, 38.201731, 32.000000

  GOTO/CART,   53.597008, 42.449750, 32.000000

  PTMEAS/CART, 61.115077, 47.228029, 32.000000, -0.938448,  0.345421, -0.000000

  GOTO/CART,   58.488904, 55.740170, 32.000000

  GOTO/CART,   56.798269, 62.759225, 32.000000

  GOTO/CART,   52.550250, 68.597008, 32.000000

  PTMEAS/CART, 47.771971, 76.115077, 32.000000, -0.345421, -0.938448,  0.000000

  GOTO/CART,   46.391570, 72.364771, 66.996286

ENDMES

$$ Measurement points are created through nominal points

$$ CALL/M(EASI_CLEARPLN_GOTO), 0, 34.365828, 57.073808, 66.996286

MEAS/CIRCLE, F(CIR8), 4

  GOTO/CART,   34.365828, 57.073808, 66.996286

  PTMEAS/CART, 30.615521, 58.454209, 27.000000,  0.938448, -0.345421, 0.000000

  GOTO/CART,   34.001091, 54.759845, 27.000000

  GOTO/CART,   34.549635, 52.482442, 27.000000

  GOTO/CART,   35.927947, 50.588316, 27.000000

  PTMEAS/CART, 36.545791, 45.615521, 27.000000,  0.345421,  0.938448, 0.000000

  GOTO/CART,   40.240155, 49.001091, 27.000000

  GOTO/CART,   42.517558, 49.549635, 27.000000

  GOTO/CART,   44.411684, 50.927947, 27.000000

  PTMEAS/CART, 49.384479, 51.545791, 27.000000, -0.938448,  0.345421, 0.000000

  GOTO/CART,   45.998909, 55.240155, 27.000000

  GOTO/CART,   45.450365, 57.517558, 27.000000

  GOTO/CART,   44.072053, 59.411684, 27.000000

  PTMEAS/CART, 43.454209, 64.384479, 27.000000, -0.345421, -0.938448, 0.000000

  GOTO/CART,   42.073808, 60.634172, 66.996286

ENDMES

CLOSE/DID(DEFAULTFILE)

来源:RationalDMIS测量技术
SCL
著作权归作者所有,欢迎分享,未经许可,不得转载
首次发布时间:2023-07-01
最近编辑:1年前
山涧果子
大专 签名征集中
获赞 203粉丝 48文章 1203课程 0
点赞
收藏
未登录
还没有评论
课程
培训
服务
行家
VIP会员 学习 福利任务 兑换礼品
下载APP
联系我们
帮助与反馈