[UG后处理] UGNX三轴后处理同组不同坐标报警提示,根据夹具偏置和

[复制链接]
查看5284 | 回复0 | 2020-4-7 21:42:32 | 显示全部楼层 |阅读模式
三轴UG后处理同组不同坐标报警提示,根据夹具偏置和坐标系名称判断!

  1. global mom_operation_name nStep Step mom_operation_name_list mom_mcsname_attach_opr
  2. global numbers
  3. global times
  4. global ZMLN

  5. set ZMLN 0
  6. set times 1
  7. set Step -1
  8. set nStep -1
  9. set numbers 0

  10. global mom_fixture_offset_value offset_flag
  11. if {![info exists offset_flag]} {
  12.     set offset_flag 0
  13. }
  14. if {[string compare $mom_fixture_offset_value 0]&&![string compare $offset_flag 0]} {
  15.     set msg [MOM_display_message 程序中包含非G54坐标系,根据夹具偏置判断,默认值为0!请检查!]

  16.         1 {
  17.             set offset_flag 1
  18.         }
  19.         2 {
  20.             MOM_abort 中止
  21.         }
  22.     }


  23. global toollistendi
  24. set toollistendi 0

  25. global mom_fixture_offset_value yj
  26. set c [expr $mom_fixture_offset_value+54]
  27. set d [expr 0-$mom_fixture_offset_value]
  28. set yj $mom_fixture_offset_value
  29. global e
  30. if {$mom_fixture_offset_value >= "0"} {
  31. set e $c
  32. } else {
  33. set e 54.1\ P[format "%02.0f" $d]
  34. }
  35. #MOM_output_literal "G$e"
  36. MOM_force once G_motion G_mold

  37. global mom_operation_name_list mom_mcsname_attach_opr
  38. foreach op $mom_operation_name_list {
  39.            lappend mcs_list $mom_mcsname_attach_opr($op)
  40.            }
  41. set mcs_list_count [llength $mcs_list]

  42. for {set i 1} {$i <= [expr $mcs_list_count - 1]} {incr i} {
  43.      if {![string match [lindex $mcs_list 0] [lindex $mcs_list $i]]} {
  44.     set msg [MOM_display_message 程序中包含多个坐标系,基于坐标系名称检测!请检查!]

  45.         }
  46. }
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

8

主题

1

回帖

243

积分

中级会员

积分
243