首页/文章/ 详情

基于UG和MasterCAM测头自动编写探测程序探讨

2年前浏览668

最近在研究测头探测路径的自动编程,用了UG和mastercam分别进行了测试,感觉UG入门简单,但做探测路径编写太麻烦,没有Mc直观和“智能”。


Mc优势明显,但入门较难,因为没有现成的后处理和测头机床文件,需要繁琐的设置和开发,UG有自带的后处理,但灵活性差,功能没有mc好用,也有可能是我对UG探测模块还没有深入学习导致的偏见,主要网上好像也没有相关的资料供参考学习,只有反复的摸索和实验去验证,要是有朋友在这方面做得好可以共同探讨和合作哈!


UG出的程序好处是直接可以调用雷尼绍的内置O9开头的宏程序,目前正在测试两个软件出的探测程序在不同系统的机床及不同探头上的应用效果,后期会更新这方面的内容。好了,我们对比一下这两个软件出的探头程序,也算是我对最近研究的一些总结,有朋友发现问题可提出,谢谢!


先看一下MaterCAM x9出的探测程序:

O100

(PROGRAM NAME = XB2018-CMM03)

(POST TIME = 2018-10-10, 11:13)

(T4 = D5 LOLLIPOP MILL)

(T1 = D10 END MILL FLAT)

(OVERALL MAX = Z50.)

(OVERALL MIN = Z-10.)

#149=0 (RENPROGSTART)

#148=0 (RENPROGSTARTEND)

(_RENGCODE_START0001)


N100 G21

N102 G91 G28 Z0.

N104 G0 G17 G40 G49 G80 G94 G90 G56

N106 M20

(_RENGCODE_END)


(PRODPLUS_BEGIN)

POPEN

DPRNT[]

DPRNT[*****PGS]

DPRNT[*******1F]

DPRNT[********O]

#1=FIX[#3011/10000]

#2=#3011-[#1*10000]

#3=FIX[#2/100]

#4=#2-[#3*100]

DPRNT[*****#4[20]**#3[20]*#1[40]]

#1=FIX[#3012/10000]

#2=#3012-[#1*10000]

#3=FIX[#2/100]

#4=#2-[#3*100]

DPRNT[*****#1[20]**#3[20]**#4[20]]

PCLOS

M5

G56

G90

G65P2109A1.C0.I2.5D2.E2.H4.M0.Q0.R0.T-999U4.V2.W1.Z50.

G65P2002Z50.

G65P2002X34.5Y0.Z50.

G65P2102A34.5B0.C-7.5I42.5J0.K-17.25I29.878J-21.25K36.806I-17.25J-29.878K-21.25I-36.806J0.K0.I0.J100.K101.I102.J103.K105.I0.J0.K1.I0.J0.

#104=[40.-[#103*0.5]]*[1.]

G65P2002Z50.

G65P2108B5261.I0.J1.C0.D0.F1.H1.K5261.Q0.R102.S103.U1.V1.W1.X100.Y101.

G65P2007

(PRODPLUS_END0004)

(_RENGCODE_START0005)


N142 M21

N144 G91 G28 Z0.

N146 G28 Y0.

N148 M01

N1001

T1 M6

(D10 END MILL FLAT)

(Z-MAX = Z25.)

(Z-MIN = Z-10.)

N150 G05.1 Q1

N152 G0 G90 G56 X-10. Y15.5 S1000 M3

N154 G43 Z25. H1

N156 Z10.

N158 G1 Z-10. F600.

N160 Y25.5 F120.

N162 G2 X0. Y35.5 I10. J0.

N164 X35.5 Y0. I0. J-35.5

N166 X0. Y-35.5 I-35.5 J0.

N168 X-35.5 Y0. I0. J35.5

N170 X0. Y35.5 I35.5 J0.

N172 X10. Y25.5 I0. J-10.

N174 G1 Y15.5

N176 G0 Z25.

N178 M5

N180 G05.1 Q0

N182 G91 G28 Z0.

N184 M01

N186 M20

(_RENGCODE_END)


(PRODPLUS_BEGIN)

M5

...

...

...

探头探测路径如下图:

机床模拟效果:


剩下的就是到机床上去探测取回数据了,后续会更新结果。。。


再看一下UG12.0下的探测路径

程序如下:

%

N0010 G40 G17 G90 G71

N0020 G91 G28 Z0.0

N0030 T00 M06

N0040 M19

N0050 M31

N0060 G04 P3.

N0070 M02

N0010 G65 P9810 X0.0 Y0.0 Z5. F400. M00

N0020 P9802 D80.

N0010 G65 P9810 X0.0 Y0.0 Z5. F400. M00   (测头校准)

N0020 P9802 D80.                                ( 测圆及各个点)

N0030 G65 P9810 X0.0 Y0.0 Z4.5 F400. M00

N0040 G65 P9810 X0.0 Y0.0 Z-20. F400. M00

N0050 P9814 D80. R0.0 S02 T00 W00

N0060 G65 P9810 X0.0 Y0.0 Z4.5 F400. M00

N0070 G65 P9810 X0.0 Y0.0 Z34.5 F400. M00

N0080 G65 P9810 X0.0 Y70. Z34.5 F400. M00

N0090 G65 P9810 X20. Y70. Z34.5 F400. M00

N0100 G65 P9810 X21.0728 Y67.5 Z-10. F400. M00

N0110 P9821 A-90. D5.

N0120 G65 P9810 X36.1471 Y62.2879 Z-10. F400. M00

N0130 P9821 X32.6116 Y58.7524 C00

N0140 G65 P9810 X39.5 Y50.8768 Z-10. F400. M00

N0150 P9821 A180. D5.

N0160 G65 P9810 X39.5 Y44.4804 Z-10. F400. M00

N0170 P9821 X34.5

N0180 G65 P9810 X41.2334 Y42.766 Z-10. F400. M00

N0190 P9821 X37.5337 Y39.4026

N0200 G65 P9810 X54.2352 Y28.4641 Z-10. F400. M00

N0210 P9821 X50.5355 Y25.1007

N0220 G65 P9810 X59.5 Y12.4963 Z-10. F400. M00

N0230 P9821 X54.5

N0240 G65 P9810 X59.5 Y-14.6103 Z-10. F400. M00

N0250 P9821 X54.5

N0260 G65 P9810 X54.1264 Y-28.5837 Z-10. F400. M00

N0270 P9821 X50.4267 Y-25.2204

N0280 G65 P9810 X42.2555 Y-41.6417 Z-10. F400. M00

N0290 P9821 X38.5558 Y-38.2783

N0300 G65 P9810 X39.5 Y-43.1009 Z-10. F400. M00

N0310 P9821 X34.5

N0320 G65 P9810 X39.5 Y-51.6466 Z-10. F400. M00

N0330 P9821 X34.5

N0340 G65 P9810 X35.2064 Y-63.2286 Z-10. F400. M00

N0350 P9821 A135. D5.

N0360 G65 P9810 X23.495 Y-67.5 Z-10. F400. M00

N0370 P9821 Y-62.5

N0380 G65 P9810 X-21.3399 Y-67.5 Z-10. F400. M00

N0390 P9821 Y-62.5

N0400 G65 P9810 X-19.2467 Y-66.1817 Z-10. F400. M00

N0410 P9821 X-22.7822 Y-62.6462

N0420 G65 P9810 X-30.4658 Y-70.5 Z-10. F400. M00

N0430 P9821 Y-65.5

N0440 G65 P9810 X-43.04 Y-70.5 Z-10. F400. M00

N0450 P9821 Y-65.5

N0460 G65 P9810 X-56.732 Y-65.7031 Z-10. F400. M00

N0470 P9821 X-53.1964 Y-62.1675

N0480 G65 P9810 X-61.5 Y-49.3332 Z-10. F400. M00

N0490 P9821 X-56.5

N0500 G65 P9810 X-61.5 Y53.0132 Z-10. F400. M00

N0510 P9821 X-56.5

N0520 G65 P9810 X-56.6523 Y65.7827 Z-10. F400. M00

N0530 P9821 X-53.1168 Y62.2472

N0540 G65 P9810 X-43.4485 Y70.5 Z-10. F400. M00

N0550 P9821 Y65.5

N0560 G65 P9810 X-29.7184 Y70.5 Z-10. F400. M00

N0570 P9821 Y65.5

N0580 G65 P9810 X-19.48 Y66.4151 Z-10. F400. M00

N0590 P9821 X-23.0156 Y62.8795

N0600 G65 P9810 X-18.5362 Y67.5 Z-10. F400. M00

N0610 P9821 Y62.5

N0620 G65 P9810 X-18.5362 Y67.5 Z70. F400. M00

...

...

...

看上去比mc的程序要简洁好读懂一些

检测路径如下图;

还有就是Ug的测头尺寸不知道怎么修改呢,默认的是测球直径为9mm,怎么修改还真正摸索中。。。

先不管,后续把这两种程序导入机床测试一下便知!


来源:NX网
UGPLM
著作权归作者所有,欢迎分享,未经许可,不得转载
首次发布时间:2022-11-07
最近编辑:2年前
老叶
本科 签名征集中
获赞 199粉丝 232文章 572课程 0
点赞
收藏
未登录
还没有评论
课程
培训
服务
行家
VIP会员 学习计划 福利任务
下载APP
联系我们
帮助与反馈