首页/文章/ 详情

RationalDMIS 托盘测量

1年前浏览978

要求:批量测量托盘上的同类型工件12个
 

工件特点 :工件XY方向等距,X方向间距:10, Y方向间距:20

DMISMN/'Created by [爱科腾瑞(CNC).12.9] on 星期四, 九月 15, 2016', 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, 20.000000

RECALL/D(MCS)

SNSLCT/S(PH10T)

GEOALG/CIRCLE, LSTSQR

GEOALG/ARC, LSTSQR

GEOALG/PLANE, LSTSQR

$$

$$

(L1)

MODE/MAN

F(PLN1) = FEAT/PLANE,CART, -80.000000, -127.500161, 0.000000, -0.000000,$

-0.000000, -1.000000

$$ Empty Meas Block

MEAS/PLANE, F(PLN1), 4

ENDMES

F(LN1) = FEAT/LINE,BND,CART, 0.000000, -0.000000, 0.000000, -0.000000,$

-30.000000, 0.000000, 1.000000, 0.000000, 0.000000

$$ Empty Meas Block

MEAS/LINE, F(LN1), 2

ENDMES

F(LN2) = FEAT/LINE,BND,CART, 0.000000, -0.000000, 0.000000, -35.000000,$

0.000000, 0.000000, 0.000000, 1.000000, -0.000000

$$ Empty Meas Block

MEAS/LINE, F(LN2), 2

ENDMES

F(PT_INTER1) = FEAT/POINT,CART, 0.000000, -0.000000, 0.000000, 0.000000,$

0.000000, -1.000000

CONST/POINT, F(PT_INTER1), INTOF, FA(LN1), FA(LN2)

OUTPUT/FA(PT_INTER1), TA(XCTL), TA(YCTL), TA(ZCTL)

D(CRD1) = DATSET/FA(PLN1), -ZDIR, FA(LN1), -YDIR, FA(PT_INTER1), YORIG

D(CRD1) = TRANS/ZORIG, FA(PLN1), XORIG, FA(PT_INTER1), YORIG, -0

$$ Set.CAD2PCS.CADM_1

$$ Set.CADViewCenter.CADM_1

DECL/COMMON,CHAR,255,C1

C1 = PROMPT/'请输入字符!!'

IF/(C1.EQ.'Y')

JUMPTO/(L1)

ENDIF

TEXT/OPER, 'DCC测量开始!!!'

MODE/PROG,MAN

SNSET/APPRCH, 3.0000

SNSET/RETRCT, 3.0000

SNSET/DEPTH, 0.0000

SNSET/SEARCH, 10.0000

SNSET/CLRSRF, 20.0000

DECL/COMMON,INTGR,I,J

DECL/COMMON,INTGR,V1,V2,V3,V4

$$ V1 = PROMPT/TEXT, '工件测量行数!!'

V1 = ASSIGN/3

$$ V2 = PROMPT/TEXT, '工件测量列数!!'

V2 = ASSIGN/4

$$ V3 = PROMPT/TEXT, '工件X轴向间距!!!'

V3 = ASSIGN/10

$$ V4 = PROMPT/TEXT, '工件Y轴向间距!!!'

V4 = ASSIGN/20

DO/I,1,3,1

 DO/J,1,4,1

RECALL/D(CRD1)

D(CRD2) = TRANS/XORIG, 10*(J-1), YORIG, 20*(I-1)

F(PLN2) = FEAT/PLANE,CART, -60.000000, -127.500161, 0.000000, -0.000000,$

-0.000000, -1.000000

$$ Measurement points are created through nominal points

MEAS/PLANE, F(PLN2), 4

  GOTO/CART,  -120.000000, 0.000000, -21.000000

  PTMEAS/CART,  -120.000000, 0.000000, 0.000000, 0.000000, 0.000000, -1.000000

  PTMEAS/CART,  -120.000000, -170.000214, 0.000000, 0.000000, 0.000000,$

-1.000000

  PTMEAS/CART,  0.000000, -170.000214, 0.000000, 0.000000, 0.000000, -1.000000

  PTMEAS/CART,  0.000000, 0.000000, 0.000000, 0.000000, 0.000000, -1.000000

  GOTO/CART,  0.000000, 0.000000, -21.000000

ENDMES

F(LN3) = FEAT/LINE,BND,CART, -0.000000, -50.000000, 0.000000, -0.000000,$

-170.000214, 0.000000, 1.000000, 0.000000, 0.000000

$$ Measurement points are created through nominal points

MEAS/LINE, F(LN3), 2

  GOTO/CART,  21.000000, -51.500000, 0.000000

  PTMEAS/CART,  -0.000000, -51.500000, 0.000000, 1.000000, 0.000000, 0.000000

  PTMEAS/CART,  -0.000000, -168.500214, 0.000000, 1.000000, 0.000000, 0.000000

  GOTO/CART,  21.000000, -168.500214, 0.000000

ENDMES

F(LN4) = FEAT/LINE,BND,CART, -85.000000, 0.000000, 0.000000, -120.000000,$

0.000000, 0.000000, 0.000000, 1.000000, -0.000000

$$ Measurement points are created through nominal points

MEAS/LINE, F(LN4), 2

  GOTO/CART,  -86.500000, 21.000000, -0.000003

  PTMEAS/CART,  -86.500000, 0.000000, 0.000000, 0.000000, 1.000000, -0.000000

  PTMEAS/CART,  -118.500000, 0.000000, 0.000000, 0.000000, 1.000000, -0.000000

  GOTO/CART,  -118.500000, 21.000000, -0.000003

ENDMES

F(PT_INTER2) = FEAT/POINT,CART, 0.000000, 0.000000, 0.000000, -0.000000,$

-0.000000, -1.000000

CONST/POINT, F(PT_INTER2), INTOF, FA(LN3), FA(LN4)

OUTPUT/FA(PT_INTER2), TA(XCTL), TA(YCTL), TA(ZCTL)

D(CRD2) = DATSET/FA(PLN2), -ZDIR, FA(LN3), -YDIR, FA(PT_INTER2), YORIG

D(CRD2) = TRANS/ZORIG, FA(PLN2), XORIG, FA(PT_INTER2), YORIG, -0

$$ Set.CAD2PCS.CADM_1

$$ Set.CADViewCenter.CADM_1

TEXT/OPER, '测量特征元素开始!!!!'

F(CIR1) = FEAT/CIRCLE,INNER,CART, -60.000000, -39.000000, 0.000000,$

-0.000000, 0.000000, -1.000000, 16.400000

$$ Measurement points are created through nominal points

MEAS/CIRCLE, F(CIR1), 4

  GOTO/CART,  -56.224719, -37.159551, -21.000000

  PTMEAS/CART,  -52.629213, -35.406742, 0.000000, -0.898876, -0.438202,$

-0.000000

  GOTO/CART,  -55.807786, -38.744384, 0.000000

  GOTO/CART,  -56.029079, -40.368132, 0.000000

  GOTO/CART,  -56.854909, -41.783595, 0.000000

  PTMEAS/CART,  -56.406742, -46.370787, 0.000000, -0.438202, 0.898876, 0.000000

  GOTO/CART,  -59.744384, -43.192214, 0.000000

  GOTO/CART,  -61.368132, -42.970921, 0.000000

  GOTO/CART,  -62.783595, -42.145091, 0.000000

  PTMEAS/CART,  -67.370787, -42.593258, 0.000000, 0.898876, 0.438202, 0.000000

  GOTO/CART,  -64.192214, -39.255616, 0.000000

  GOTO/CART,  -63.970921, -37.631868, 0.000000

  GOTO/CART,  -63.145091, -36.216405, 0.000000

  PTMEAS/CART,  -63.593258, -31.629213, 0.000000, 0.438202, -0.898876, -0.000000

  GOTO/CART,  -61.840449, -35.224719, -21.000000

ENDMES

F(PT1) = FEAT/POINT,CART, -88.122421, -25.786127, 0.000000, 0.000000,$

0.000000, -1.000000

MEAS/POINT, F(PT1), 1

  GOTO/CART,  -88.122421, -25.786127, -21.000000

  PTMEAS/CART,  -88.122421, -25.786127, 0.000000, 0.000000, 0.000000, -1.000000

ENDMES

 ENDDO

ENDDO

方法二:


DMISMN/'Created by [爱科腾瑞(CNC).12.9] on 星期四, 九月 15, 2016', 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, 20.000000

RECALL/D(MCS)

SNSLCT/S(PH10T)

GEOALG/CIRCLE, LSTSQR

GEOALG/ARC, LSTSQR

GEOALG/PLANE, LSTSQR

$$

$$

MODE/MAN

F(PLN1) = FEAT/PLANE,CART, 38.505643, 28.974543, 0.000000, 0.000000,$

 0.000000, 1.000000

$$ Measurement points are created through actual points

MEAS/PLANE, F(PLN1), 4

  PTMEAS/CART,  6.523348, 45.315613, 0.000000, 0.000000, 0.000000, 1.000000

  PTMEAS/CART,  3.954416, 9.769600, 0.000000, 0.000000, 0.000000, 1.000000

  PTMEAS/CART,  70.815948, 6.567984, 0.000000, 0.000000, 0.000000, 1.000000

  PTMEAS/CART,  72.728859, 54.244976, 0.000000, 0.000000, 0.000000, 1.000000

ENDMES

OUTPUT/FA(PLN1), TA(XCTL), TA(YCTL), TA(ZCTL)

F(LN1) = FEAT/LINE,BND,CART, 10.565936, 0.000000, -1.982821, 68.791359,$

 0.000000, -2.250588, 0.000000, -1.000000, 0.000000

$$ Measurement points are created through actual points

MEAS/LINE, F(LN1), 2

  PTMEAS/CART,  10.565936, 0.000000, -1.982821, 0.000000, -1.000000, 0.000000

  PTMEAS/CART,  68.791359, 0.000000, -2.250588, 0.000000, -1.000000, 0.000000

ENDMES

OUTPUT/FA(LN1), TA(XCTL), TA(YCTL), TA(ZCTL)

F(PT1) = FEAT/POINT,CART, 0.000000, 6.433258, -2.937881, -1.000000,$

 -0.000000, -0.000000

MEAS/POINT, F(PT1), 1

  PTMEAS/CART,  0.000000, 6.433258, -2.937881, -1.000000, -0.000000, -0.000000

ENDMES

OUTPUT/FA(PT1), TA(XCTL), TA(YCTL), TA(ZCTL)

D(CRD1) = DATSET/FA(PLN1), ZDIR, FA(LN1), XDIR, YORIG, FA(PT1), XORIG

D(CRD1) = TRANS/ZORIG, FA(PLN1), YORIG, -0, XORIG, -0

MODE/PROG,MAN

SNSET/APPRCH, 3.0000

SNSET/RETRCT, 3.0000

SNSET/DEPTH, 0.0000

SNSET/SEARCH, 10.0000

SNSET/CLRSRF, 20.0000

DECL/COMMON,INTGR,I

DO/I,1,12,1

DECL/COMMON,DOUBLE,V1

V1 = ASSIGN/(I.GE.1).AND.(I.LE.4)

IF/((I.GE.1).AND.(I.LE.4))

RECALL/D(CRD1)

F(CIR1) = FEAT/CIRCLE,INNER,CART, 19.813467, 17.500000, -0.000000, 0.000000,$

 0.000000, 1.000000, 10.000000

$$ Measurement points are created through nominal points

MEAS/CIRCLE, F(CIR1), 4

  GOTO/CART,  19.813467, 17.500000, 21.000000

  PTMEAS/CART,  15.279185, 15.392801, -0.000000, 0.906856, 0.421440, 0.000000

  PTMEAS/CART,  21.920666, 12.965718, -0.000000, -0.421440, 0.906856, 0.000000

  PTMEAS/CART,  24.347748, 19.607199, -0.000000, -0.906856, -0.421440, 0.000000

  PTMEAS/CART,  17.706267, 22.034282, -0.000000, 0.421440, -0.906856, 0.000000

  GOTO/CART,  19.813467, 17.500000, 21.000000

ENDMES

D(CRD2) = TRANS/XORIG, 10*(I-1)

ENDIF

IF/((I.GE.5).AND.(I.LE.8))

RECALL/D(CRD1)

D(CRD3) = TRANS/XORIG, 10*(I-5), YORIG, 20

F(CIR1) = FEAT/CIRCLE,INNER,CART, 19.813467, 17.500000, -0.000000, 0.000000,$

 0.000000, 1.000000, 10.000000

$$ Measurement points are created through nominal points

MEAS/CIRCLE, F(CIR1), 4

  GOTO/CART,  19.813467, 17.500000, 21.000000

  PTMEAS/CART,  15.279185, 15.392801, -0.000000, 0.906856, 0.421440, 0.000000

  PTMEAS/CART,  21.920666, 12.965718, -0.000000, -0.421440, 0.906856, 0.000000

  PTMEAS/CART,  24.347748, 19.607199, -0.000000, -0.906856, -0.421440, 0.000000

  PTMEAS/CART,  17.706267, 22.034282, -0.000000, 0.421440, -0.906856, 0.000000

  GOTO/CART,  19.813467, 17.500000, 21.000000

ENDMES

ENDIF

IF/((I.GE.9).AND.(I.LE.12))

RECALL/D(CRD1)

D(CRD3) = TRANS/XORIG, 10*(I-9), YORIG, 40

ENDIF

F(CIR1) = FEAT/CIRCLE,INNER,CART, 19.813467, 17.500000, -0.000000, 0.000000,$

 0.000000, 1.000000, 10.000000

$$ Measurement points are created through nominal points

MEAS/CIRCLE, F(CIR1), 4

  GOTO/CART,  19.813467, 17.500000, 21.000000

  PTMEAS/CART,  15.279185, 15.392801, -0.000000, 0.906856, 0.421440, 0.000000

  PTMEAS/CART,  21.920666, 12.965718, -0.000000, -0.421440, 0.906856, 0.000000

  PTMEAS/CART,  24.347748, 19.607199, -0.000000, -0.906856, -0.421440, 0.000000

  PTMEAS/CART,  17.706267, 22.034282, -0.000000, 0.421440, -0.906856, 0.000000

  GOTO/CART,  19.813467, 17.500000, 21.000000

ENDMES

ENDDO



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