QQ登录

只需一步,快速开始

快捷登录

登录 或者 注册 请先

UG爱好者

查看: 1582|回复: 2
打印 上一主题 下一主题

[求助] UG编程后NC程序中自动生成调取附件头指令

[复制链接]

五级士官

Rank: 4

4

主题

35

帖子

993

积分
跳转到指定楼层
楼主
发表于 2020-7-22 14:52:34 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
可有大师知道如何利用UG编程后NC程序中自动生成调取附件头指令?就像如图中所示的NC代码。其中M106是标准直头,M101是附件头(角度头:可以360度自动旋转的)。

微信截图_20200722145053.png (22.5 KB, 下载次数: 30)

微信截图_20200722145053.png

微信截图_20200722145130.png (23.29 KB, 下载次数: 32)

微信截图_20200722145130.png

有奖推广贴子: 

回复

使用道具 举报

五级士官

Rank: 4

7

主题

75

帖子

988

积分
沙发
发表于 2020-7-23 00:00:34 | 只看该作者
应该可以,加个 operator message M101 或M106
开始操作里加个custom comand  读取operator message 写入M101
#operator_message中输入M101 M106


# Default handler for UDE MOM_operator_message
# - Do not attach it to any event!
#
# This procedure is executed when the Operator Message command is activated.
#
   global mom_operator_message mom_operator_message_defined
   global mom_operator_message_status
   global ptp_file_name group_output_file mom_group_name
   global mom_sys_commentary_output
   global mom_sys_control_in
   global mom_sys_control_out
   global mom_sys_ptp_output
    global mom_tool_number
     global t_string
   if { [info exists mom_operator_message_defined] } {
      if { $mom_operator_message_defined == 0 } {
return
      }
   }

   if { [string compare "ON" $mom_operator_message] && [string compare "OFF" $mom_operator_message] } {
        if {[string first "M101" $mom_operator_message]==0} {
            

            MOM_output_literal "M101"
            return
            }
        }
大概就是这样
看大神怎么做
回复 支持 反对

使用道具 举报

五级士官

Rank: 4

4

主题

35

帖子

993

积分
板凳
 楼主| 发表于 2020-7-27 16:13:39 | 只看该作者
jisx0404 发表于 2020-7-23 00:00
应该可以,加个 operator message M101 或M106
开始操作里加个custom comand  读取operator message 写入 ...

试了一下你这个行不通吧
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

 
 
QQ:1359218528
工作时间:
9:00-17:00
 
微信公众号
手机APP
机械社区
微信小程序

手机版|UG爱好者论坛 ( 京ICP备10217105号-2 )    论坛管理员QQ:1359218528

本站信息均由会员发表,不代表本网站立场,如侵犯了您的权利请联系管理员,邮箱:1359218528@qq.com  

Powered by UG爱好者 X3.2  © 2001-2014 Comsenz Inc. GMT+8, 2024-4-27 12:28

返回顶部