a_Man 发表于 2019-4-17 13:04:42

请教大神:UG后处理加余量,钻孔一用到mom_operation_type就报错,什么原因

请教一下各位大神:按网上的说法,
global mom_tool_name mom_tool_diameter mom_tool_corner1_radius mom_operation_type
if { $mom_operation_type == "Point to Point" } {
                MOM_output_literal "(WS=0 FS=0)"
   }
   else { MOM_output_literal "(WS= FS=)" }


每次到这里就报错.什么原因,有哪位大神知道,请指点.谢谢!

893011376 发表于 2019-4-17 13:28:25

global mom_operation_type mom_stock_part mom_stock_floor

if { $mom_operation_type == "Point to Point" } {
MOM_output_literal "(WS=0 FS=0)"
} else {
MOM_output_literal "(WS= FS=)"
}
这样才对

a_Man 发表于 2019-4-17 14:12:05

还是不行啊,大神,好像只要遇到mom_operation_type这个变量就出错

a_Man 发表于 2019-4-17 14:16:12

本帖最后由 a_Man 于 2019-4-17 14:22 编辑

#=============================================================
proc MOM_start_of_path { } {
#=============================================================
# MOM_output_literal "(start_of_path)"
global mom_sys_in_operation
   set mom_sys_in_operation 1

global first_linear_move ; set first_linear_move 0
   TOOL_SET MOM_start_of_path
      
#MOM_tool_change

global mom_sys_add_cutting_time mom_sys_add_non_cutting_time
global mom_sys_machine_time mom_machine_time
   set mom_sys_add_cutting_time 0.0
   set mom_sys_add_non_cutting_time 0.0
   set mom_sys_machine_time $mom_machine_time

   if ] {
      PB_CMD_kin_start_of_path
   }

   PB_CMD_start_of_operation_force_addresses

   global mom_operation_type
   global mom_stock_part
   global mom_stock_floor

    if { $mom_operation_type == "Point to Point" } {
                MOM_output_literal "(WS=0 FS=0)"
   }
   else { MOM_output_literal "(WS= FS=)" }
}

请教,这样哪里错了呢?

习惯le孤单 发表于 2019-4-17 15:10:10

因为钻孔没有余量

destiny0515 发表于 2019-4-17 15:30:44

你用的holemaking钻孔还是老版本的钻孔?

a_Man 发表于 2019-4-18 17:06:03

destiny0515 发表于 2019-4-17 15:30
你用的holemaking钻孔还是老版本的钻孔?

老版本的钻孔,9.0,10.0都是这样.我只是想避开钻孔而已,为啥别人都能用这个变量mom_operation_type,偏偏我用就报警呢.

destiny0515 发表于 2019-4-18 22:00:03

a_Man 发表于 2019-4-17 14:16
#=============================================================
proc MOM_start_of_path { } {
#===== ...

最后的花括号是多余的,删掉试试

a_Man 发表于 2019-4-19 12:26:08

呵呵,跟花括弧没啥关系的,是这个变量的问题mom_operation_type,花括弧是跟前面配套的.
页: [1]
查看完整版本: 请教大神:UG后处理加余量,钻孔一用到mom_operation_type就报错,什么原因