y∩__∩y 发表于 2020-7-22 14:52:34

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

可有大师知道如何利用UG编程后NC程序中自动生成调取附件头指令?就像如图中所示的NC代码。其中M106是标准直头,M101是附件头(角度头:可以360度自动旋转的)。

jisx0404 发表于 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 { } {
      if { $mom_operator_message_defined == 0 } {
return
      }
   }

   if { && } {
      if {==0} {
            

            MOM_output_literal "M101"
            return
            }
        }
大概就是这样
看大神怎么做

y∩__∩y 发表于 2020-7-27 16:13:39

jisx0404 发表于 2020-7-23 00:00
应该可以,加个 operator message M101 或M106
开始操作里加个custom comand读取operator message 写入 ...

试了一下你这个行不通吧

y∩__∩y 发表于 2020-7-29 14:29:31

C:\Users\Administrator\Desktop

页: [1]
查看完整版本: UG编程后NC程序中自动生成调取附件头指令