"> 请教一个简单的问题?也是初学者的第一个问题?
请教一个简单的问题?也是初学者的第一个问题?
大侠们好:
我用pc-dmis4.1编程,请教一个问题?
1。先手动在零件上采一个面和两个孔。
2。以采的面和两孔在平面上的投影见坐标。
3。然后再进行其他的测量,再见坐标,测量。
请教:如何写编程语句,下次只要手动测零件上的一个面和两孔即可,其他自动走。
上面圆心的x、y、z坐标怎么赋值给变量v1、v2、v3。
assign/v1= 园1.ex
assign/v2= 园1.ey
assign/v3= 园1.ez 有x、ex,到底取哪一个。请高手编写一段程序,先谢谢!!
倒~~~~--风马牛不相级点事, 首先做自动程序,或者有夹具。或者首先做一手动简单坐标系,以建立零件与机器之间的矩阵,并方便后面特征的数值和矢量的给定, 然后以下的程序就可以按照您编辑的自动运行。
对楼上 wsyzxxn 版主说两句话:你认为问题简单,可以不回答。不要这样,我是新手,又没参加过培训,问些初级的问题很正常。
呵呵--mm生气了。{/cy}{/cy}
一般测量零件多数情况下步骤是这样的:
1。运行模式选手动,手动测量特征(尽量用最少的点) 然后用手动特征建立初步的坐标系。
2。 运行模式选择自动,根据图纸基准测量特征,可以用自动(自动特征不勾选“测量”,也可以用手动(手动特征最好打完后添加测量点,以让它的点与点之间均匀分布 ),后自学习。
3。用上面的基准特征建立坐标系。
4。用自动特征,或者手动后自学习,测量需要评价的特征。然后评价。
如果有夹具 可以建立夹具坐标系,代替第一步的手动特征, 如果夹具不移动下个零件可以直接从第2步运行,如果没有夹具 就需要建立零件与坐标系之间的矩阵,也就是让坐标机能够知道零件的位置,然后下面的程序就可以直接运行了,注意的是自动部分特征之间要添加适当的移动点或者安全平面。
这样就可以在有夹具的时候 直接自动运行您编辑过的程序,没有夹具的时候只需要测量手动简单建立坐标系的步骤就可以了。
赋值我还没用过
要是要达到你所说的自动程序,只要在你列的第2步后打成自动dcc.那么以后测量时,标记所有程序,然后做第1步测量,之后就走自动程序了
startup =alignment/start,recall:,list=yes
alignment/end
loadprobe/njf1
tip/t1a90b180, shankijk=0, -1, 0, 角度=180
mode/dcc
平面1 =feat/plane,rect,triangle
theo/201.608,337.305,-482.525,0.0426748,-0.9990881,0.0013439
actl/201.7,337.301,-482.52,0.04259,-0.999092,0.0011419
meas/plane,4
hit/basic,normal,169.977,335.987,-482.004,0.0426736,-0.9990882,0.0013419,169.981,335.985,-482.002,use theo = yes
hit/basic,normal,234.623,338.746,-482.01,0.0426736,-0.9990882,0.0013419,234.637,338.738,-482.006,use theo = yes
hit/basic,normal,201.082,337.201,-517.735,0.0426736,-0.9990882,0.0013419,201.086,337.202,-517.734,use theo = yes
hit/basic,normal,201.085,337.293,-448.342,0.0426736,-0.9990882,0.0013419,201.096,337.28,-448.339,use theo = yes
endmeas/
workplane/yplus
圆1 =feat/circle,rect,in,least_sqr
theo/201.056,356.981,-482.25,0,1,0,35.309
actl/201.055,356.972,-482.262,0,1,0,35.305
meas/circle,4,workplane
move/点,normal,201.5,282.736,-477.904
hit/basic,normal,218.707,356.986,-482.015,-0.9998882,0,-0.0149522,218.706,356.98,-482.044,use theo = yes
hit/basic,normal,183.405,356.98,-482.017,0.9998881,0,-0.014959,183.406,356.973,-482.025,use theo = yes
hit/basic,normal,198.074,356.978,-464.88,0.1904166,0,-0.9817034,198.136,356.971,-464.851,use theo = yes
hit/basic,normal,198.077,356.977,-499.62,0.190178,0,0.9817496,198.134,356.966,-499.673,use theo = yes
endmeas/
assign/v1 = 圆1. x
assign/v2 = 圆1. y
assign/v3 = 圆1. z
move/点,normal,v1,v2,v3
move/点,normal,v1,v2-80,v3
move/点,normal,v1+190,v2-80,v3
move/点,normal,v1+190,v2-30,v3
圆2 =auto/circle,showallparams = no,showhits = yes
theo/391.055,326.976,-482.25,0,1,0,55
actl/392.141,326.976,-482.662,0,1,0,54.001
targ/391.055,326.976,-482.25,0,1,0
meas/circle
hit/basic,363.555,326.976,-482.25,1,0,0,365.134,326.97,-482.251
hit/basic,391.055,326.976,-454.75,0,0,-1,391.056,326.967,-455.694
hit/basic,418.555,326.976,-482.25,-1,0,0,419.148,326.965,-482.249
hit/basic,391.055,326.976,-509.75,0,0,1,391.056,326.966,-509.63
endmeas/
move/点,normal,v1+190,v2-80,v3
move/点,normal,v1,v2-80,v3
测平面1和园1,由于大批量测量,相对位置基本不变,平面基本跟y-z平面平行,
所以只要手动测量测平面1和园1,其余自动走。
根据你的描述,每次应该可以应用迭代法,引用你第一次的测量数据,建立坐标系以后自动测量所有数据,但是要注意避开碰撞。 |