首页/文章/ 详情

RationalDMIS 7.1量块程序

1年前浏览847

校准依据:


《JJF1064-2010坐标测量机校准规范》(基本等同于ISO10360)


标准器:尺寸实物标准器,量块,机器检查规,检测球,二维靶标。


校准项目:


 (1)尺寸测量误差校准


     对于三维测头,通过比较5个不同长度尺寸实物标准器的校准值和指示值,评价坐标测量机是否符合规定的最大允许示值误差MPEE。5个尺寸实物标准器放在测量空间的7个不同的方向或位置,各测量3次,共进行105次测量。


(2)探测误差校准


     通过确定测量点到最小二乘拟合球球心距离的范围,评价三维探测误差P是否符合规定的最大允许探测误差MPEP。




DMISMN/'Created by [山涧果子] on 星期六, 九月 15, 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, 10.000000

RECALL/D(MCS)

SNSLCT/S(21_5_1_21_5_A90D0_B0D0)

GEOALG/BF, LSTSQR

GEOALG/ANGLB, COMPLM

GEOALG/CIRCLE, LSTSQR

GEOALG/ARC, LSTSQR

GEOALG/PLANE, LSTSQR

$$

$$


DECL/COMMON, CHAR, 256, KNPTC1


KNPTC1 = PROMPT/'请输入测量轴向!'


TEXT/OUTFIL, KNPTC1



MODE/MAN

$$ Following block is generated by Quick 321 alignment

DECL/COMMON, DOUBLE, DPROBEX, DPROBEY, DPROBEZ

PRCOMP/OFF

F(PT1)=FEAT/POINT,CART,-396.864,32.175,428.648,-0.000,-1.000,-0.000

F(PT2)=FEAT/POINT,CART,-393.431,32.175,420.868,-0.000,-1.000,-0.000

F(PT3)=FEAT/POINT,CART,-368.566,32.175,427.241,-0.000,-1.000,-0.000

F(PT4)=FEAT/POINT,CART,-397.036,37.688,432.024,-0.020,0.000,1.000

F(PT5)=FEAT/POINT,CART,-373.089,37.085,432.496,-0.020,0.000,1.000

F(PT6)=FEAT/POINT,CART,-402.094,38.316,426.513,-1.000,-0.000,-0.020

MEAS/POINT, F(PT1), 1

  PTMEAS/CART, -396.864,32.175,428.648,-0.000,-1.000,-0.000, APPRCH, 3.000000, RETRCT, 3.000000

ENDMES

MEAS/POINT, F(PT2), 1

  PTMEAS/CART, -393.431,32.175,420.868,-0.000,-1.000,-0.000, APPRCH, 3.000000, RETRCT, 3.000000

ENDMES

MEAS/POINT, F(PT3), 1

  PTMEAS/CART, -368.566,32.175,427.241,-0.000,-1.000,-0.000, APPRCH, 3.000000, RETRCT, 3.000000

ENDMES

MEAS/POINT, F(PT4), 1

  PTMEAS/CART, -397.036,37.688,432.024,-0.020,0.000,1.000, APPRCH, 3.000000, RETRCT, 3.000000

ENDMES

MEAS/POINT, F(PT5), 1

  PTMEAS/CART, -373.089,37.085,432.496,-0.020,0.000,1.000, APPRCH, 3.000000, RETRCT, 3.000000

ENDMES

MEAS/POINT, F(PT6), 1

  PTMEAS/CART, -402.094,38.316,426.513,-1.000,-0.000,-0.020, APPRCH, 3.000000, RETRCT, 3.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.000, 0.000, 0.000, 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

PRCOMP/ON

$$

RECALL/D(CRD1)

$$

TEXT/OPER, '请将测头移动到安全位置!'

$$

$$

MODE/PROG,MAN


GOTO/-5, 35.000, -4.5


DECL/COMMON,INTGR,I


DECL/COMMON,INTGR,J


DECL/COMMON,CHAR,255,C1


$$  量块长度!!


DECL/COMMON,DOUBLE,LK[5]


$$   LK[1] = PROMPT/'请输入量块1长度!', 800, 50

$$   LK[2] = PROMPT/'请输入量块2长度!', 800, 50

$$   LK[3] = PROMPT/'请输入量块3长度!', 800, 50

$$   LK[4] = PROMPT/'请输入量块4长度!', 800, 50

$$   LK[5] = PROMPT/'请输入量块5长度!', 800, 50

$$   LK[6] = PROMPT/'请输入量块5长度!', 800, 50


LK[1] = ASSIGN/499.9998


LK[2] = ASSIGN/400.0019


LK[3] = ASSIGN/300.0002


LK[4] = ASSIGN/125.0001


LK[5] = ASSIGN/30.0003



$$  请输入量块数量!


DECL/COMMON,DOUBLE,KN


KN = ASSIGN/5


$$  KN = PROMPT/'请输入量块数量!', 10.000000, 1.000000


$$  测量安全高度!!


DECL/COMMON,DOUBLE,ZT


$$ ZT = PROMPT/'请输入测量安全高度!', 100.000000, 10.000000


ZT = ASSIGN/30


$$  移动到安全位置!!

DO/I,1,KN,1



C1 = ASSIGN/CONCAT('量块长度为:',STR(LK[I]))


TEXT/OUTFIL, C1


GOTO/-5.000, ZT, -4.500

F(DCC-1)=FEAT/POINT,CART,0.000,-5.000,-4.500,-1.000,0.000,-0.000

MEAS/POINT, F(DCC-1), 1

  PTMEAS/CART, 0.000,-5.000,-4.500,-1.000,0.000,-0.000, APPRCH, 2.000000, RETRCT, 2.000000

ENDMES

GOTO/-5.000, ZT, -4.500

GOTO/5.000, ZT, -4.500

F(DCC-2)=FEAT/POINT,CART,5.000,0.000,-4.500,0.000,1.000,0.000

MEAS/POINT, F(DCC-2), 1

  PTMEAS/CART, 5.000,0.000,-4.500,0.000,1.000,0.000, APPRCH, 2.000000, RETRCT, 2.000000

ENDMES

GOTO/5.000, ZT, -4.500

GOTO/5.000, ZT, 5.000

F(DCC-3)=FEAT/POINT,CART,5.000,-4.000,0.000,0.000,0.000,1.000

MEAS/POINT, F(DCC-3), 1

  PTMEAS/CART, 5.000,-4.000,0.000,0.000,0.000,1.000, APPRCH, 2.000000, RETRCT, 2.000000

ENDMES

F(DCC-4)=FEAT/POINT,CART,5.000,-10.000,0.000,0.000,0.000,1.000

MEAS/POINT, F(DCC-4), 1

  PTMEAS/CART, 5.000,-10.000,0.000,0.000,0.000,1.000, APPRCH,2.000000, RETRCT, 2.000000

ENDMES

GOTO/5.000, ZT, 5.000

GOTO/LK[I]-5, ZT, 5.000

F(DCC-5)=FEAT/POINT,CART,LK[I]-5,-10.000,0.000,0.000,0.000,1.000

MEAS/POINT, F(DCC-5), 1

  PTMEAS/CART, LK[I]-5,-10.000,0.000,0.000,0.000,1.000, APPRCH, 2.000000, RETRCT, 2.000000

ENDMES

F(DCC-6)=FEAT/POINT,CART,LK[I]-5,-4.000,0.000,0.000,0.000,1.000

MEAS/POINT, F(DCC-6), 1

  PTMEAS/CART, LK[I]-5,-4.000,0.000,0.000,0.000,1.000, APPRCH, 2.000000, RETRCT, 2.000000

ENDMES

GOTO/LK[I]-5, ZT, 5.000

GOTO/LK[I]-5, ZT, -4.5


F(DCC-7)=FEAT/POINT,CART,LK[I]-5,0.000,-4.500,0.000,1.000,0.000

MEAS/POINT, F(DCC-7), 1

  PTMEAS/CART, LK[I]-5,0.000,-4.500,0.000,1.000,0.000, APPRCH, 2.000000, RETRCT, 2.000000

ENDMES

GOTO/LK[I]-5, ZT, -4.500

GOTO/LK[I]+5, ZT, -4.500

F(PLN_BF1)=FEAT/PLANE,CART,LK[I]/2,-7.000,0.000,0.000,0.000,1.000

CONST/PLANE,F(PLN_BF1),BF,FA(DCC-3),FA(DCC-4),FA(DCC-5),FA(DCC-6)


CALL/M(EASI_2PT_TO_LINE),(DCC-2),(DCC-7),(LN_BF1), 0.000, 1.000, 0.000

CONST/LINE,F(LN_BF1),BF,FA(DCC-2),FA(DCC-7)

D(CRD2) = DATSET/FA(PLN_BF1), ZDIR, ZORIG, FA(LN_BF1), XDIR, YORIG, FA(DCC-1), XORIG

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

RECALL/D(CRD2)

$$

$$

$$ Set.OutputCtrl.USERDF.Decpl.Nom(5)

$$ Set.OutputCtrl.USERDF.Decpl.Act(5)

$$ Set.OutputCtrl.USERDF.Decpl.Dev(5)

$$ Set.OutputCtrl.USERDF.Decpl.Tol(5)


$$  评价距离公差,循环次数!!


$$  评价距离公差,循环次数!!


DECL/COMMON,INTGR,NUM


NUM = ASSIGN/3


$$  NUM = PROMPT/'请输入循环次数!', 100, 3


DECL/COMMON,REAL,T1[NUM]


DECL/COMMON, DOUBLE, KNPTR1


DECL/COMMON, DOUBLE, KNPTR2


DECL/COMMON, DOUBLE, KNPTR3


DECL/COMMON,DOUBLE,Z_MAX,Z_MIN


DECL/COMMON, DOUBLE,AVERAG


DECL/COMMON,DOUBLE,V1


DECL/COMMON,CHAR,255,C2


DECL/COMMON,CHAR,255,C3


DECL/COMMON,CHAR,255,C4


DO/J,1,NUM,1


C4 = ASSIGN/CONCAT('TDST1','-',STR(J))


GOTO/LK[I]+10, ZT, -4.500

 

F(TEST-1)=FEAT/POINT,CART,LK[I],-5.000,-4.500,1.000,0.000,0.000

MEAS/POINT, F(TEST-1), 1

  PTMEAS/CART, LK[I],-5.000,-4.500,1.000,0.000,0.000, APPRCH, 2.000000, RETRCT, 2.000000

ENDMES

GOTO/LK[I]+5, ZT, -4.500

GOTO/-5.000,ZT, -4.500

F(TEST-2)=FEAT/POINT,CART,0.000,-5.000,-4.500,-1.000,0.000,-0.000

MEAS/POINT, F(TEST-2), 1

  PTMEAS/CART, 0.000,-5.000,-4.500,-1.000,0.000,-0.000, APPRCH, 2.000000, RETRCT,2.000000

ENDMES

GOTO/-5.000, ZT, -4.500


$$  KNPTR1 = PROMPT/'请输入探测误差!', 5.000000, 0.300000


KNPTR1 = ASSIGN/1.4


KNPTR2 = ASSIGN/(1.4+LK[I]/300)/1000


$$  300需要更改为需要的数值!


T(@C4)=TOL/DISTB,NOMINL,LK[I],-KNPTR2,KNPTR2,XAXIS,AVG


OUTPUT/FA(TEST-1),FA(TEST-2),TA(@C4)


T1[J]= VALUE/TA(@C4),ACT


ENDDO


Z_MAX= ASSIGN/T1[1]


Z_MIN= ASSIGN/T1[1]


AVERAG= ASSIGN/T1[1]


DO/J,1,NUM,1


IF/(T1[J].GT.Z_MAX)


Z_MAX = ASSIGN/T1[J]


ENDIF


IF/(T1[J].LT.Z_MIN)


Z_MIN= ASSIGN/T1[J]


ENDIF


ENDDO


DO/J,2,NUM,1


AVERAG= ASSIGN/(AVERAG+T1[J])


ENDDO


KNPTR3 = ASSIGN/Z_MAX-Z_MIN


C2= ASSIGN/CONCAT('重复性误差为;',STR(KNPTR3))


TEXT/OUTFIL,C2


V1 = ASSIGN/AVERAG/NUM


C3 = ASSIGN/CONCAT('实测平均值:',STR(V1))


TEXT/OUTFIL, C3


IF/(I.LT.4)


D(CRD3) = TRANS/XORIG, 0, YORIG, 0, ZORIG, -20


$$  20为Z向平面间距


RECALL/D(CRD3)


ENDIF



IF/(I.EQ.4)


D(CRD4) = TRANS/XORIG, 9.6, YORIG, 0, ZORIG, -20


$$  9.6为X向平面间距,20为Z向平面间距。

RECALL/D(CRD4)


ENDIF



ENDDO


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