首页/文章/ 详情

RationalDMIS循环测量案例

16小时前浏览3

$ $声明中使用跳转语句“JUMPTO”。

$ $

_____________________________________________

$ $

$ $这些代码 可以联机和离线运行。

DMISMN/'Created by [山涧果子] on 星期日, 十一月 05, 2017', 4.0

UNITS/MM, ANGDEC

WKPLAN/XYPLAN

PRCOMP/ON

TECOMP/ON

FLY/1.000

MODE/MAN

SNSET/APPRCH, 3.000

SNSET/RETRCT, 3.000

SNSET/DEPTH, 0.000

SNSET/SEARCH, 10.000

SNSET/CLRSRF, 30.000

RECALL/D(MCS)

SNSLCT/S(LENOVO)

GEOALG/CIRCLE, LSTSQR

GEOALG/ARC, LSTSQR

GEOALG/PLANE, LSTSQR

$$

$$



MODE/PROG,MAN

$$ Loop

DECL/COMMON,INTGR,I

DECL/COMMON,CHAR,255,C1

I=ASSIGN/0

(LOOP)

I=ASSIGN/I+1

IF/(I.GT.10)

   TEXT/OPER,'测量圆结束,退出测量!'  

   JUMPTO/(END_LOOP)   

ENDIF

C1 = ASSIGN/CONCAT('J','-',STR(I))


F(@C1) = FEAT/CIRCLE,INNER,CART, 40.000, 55.000, 33.000, 0.000, 0.000,$

1.000, 45.000

$$ Measurement points are created through nominal points

MEAS/CIRCLE, F(@C1), 4

  PTMEAS/CART,  26.766, 36.803, 33.000, 0.588, 0.809, -0.000

  GOTO/CART,  35.673, 37.013, 35.000

  GOTO/CART,  42.885, 36.726, 35.000

  GOTO/CART,  49.659, 39.222, 35.000

  PTMEAS/CART,  58.197, 41.766, 33.000, -0.809, 0.588, -0.000

  GOTO/CART,  57.987, 50.673, 35.000

  GOTO/CART,  58.274, 57.885, 35.000

  GOTO/CART,  55.778, 64.659, 35.000

  PTMEAS/CART,  53.234, 73.197, 33.000, -0.588, -0.809, 0.000

  GOTO/CART,  44.327, 72.987, 33.000

  GOTO/CART,  37.115, 73.274, 33.000

  GOTO/CART,  30.341, 70.778, 33.000

  PTMEAS/CART,  21.803, 68.234, 33.000, 0.809, -0.588, 0.000

ENDMES  

TEXT/OPER,CONCAT('已测量',STR(I),'次!')

JUMPTO/(LOOP)

(END_LOOP)

ENDFIL


来源:山涧果子
UGUM
著作权归作者所有,欢迎分享,未经许可,不得转载
首次发布时间:2024-12-27
最近编辑:16小时前
山涧果子
大专 签名征集中
获赞 204粉丝 51文章 159课程 0
点赞
收藏
作者推荐

True position calculation in CMM software

True position is probably one of the most used tolerance tools in any CMM software and depending on which industry you're in, you've probably used this tool on every program that you've created for so many years. As long time CMM users we all know the magic formula to calculate TP value from deviations from each axis (and of course we need to double it at the end). This formula works no problem if your features (e.g. circles) are 2D, but have you ever double checked how it works on 3D features (e.g. circles with compound angle to your co-ordinate system)? When I was doing on-site support recently, one of the QE brought up this question: how come the final TP value from PC-Dmis doesn't seem to be calculated correctly from the deviations of 3 axis? What an interesting question, so let's have a look:From the above results, with a very quick calculation we don't think the TP of circle P106, 2.546 is anywhere near the double of those deviations from xyz axis. If I use the formula, here's what I got:TP=2xsqrt[(2.083)^2+(0.552)^2+(0.879)^2] = 4.655So what was wrong? I think you've must realized that there's surface deviation involved in 3D circles so you can't use all those axis deviations for TP calculation. Then how does it work? Firstly, we need to know the orientation of this circle P106:Now you can see the axis of P106 is at 40.15 deg. from your co-ordinate system, but the TP deviation should be square to surface normal (think of a plug pin on checking fixture). To get the correct TP value, we need to follow these steps:1, We need to project deviations from X and Y to get deviation 1:Proj.X = 2.083 x sin(40.15) = 1.3437Proj.Y = 0.552 x cos(40.15) = 0.4219Total dev. = 1.3437 - 0.4219 = 0.92182, Now we need to combine this deviation with Z deviation:TP = 2 x sqrt [(0.9218)^2 + (0.879)^2] = 2 x 1.2735 = 2.547That's only .001 difference from PC-Dmis results, due to round off in software. You can try following this method to double check the TP result on P107 to see if you can get close enough reading compared to the output. Even though we don't need to do this kind of calculation in real world since the software has taken care of this, but this is a good challenge to yourself if you want to be a good CMM programmer to give people right answer when facing questions like this from people who don't trust your CMM as much as you do.来源:山涧果子

未登录
还没有评论
课程
培训
服务
行家
VIP会员 学习计划 福利任务
下载APP
联系我们
帮助与反馈