andy1414 发表于 2020-2-3 20:20:36

G74怎麼都不成功

看這個做一個新的輸出G74怎麼都不成功,有特別要注意哪裡嗎?

http://www.ugsnx.com/forum.php?mod=viewthread&tid=253547&highlight=G74

且行且珍惜、 发表于 2020-2-3 21:52:07

在后处理构造器里不会弄不过可以在TCL文件里改如果你会的话
#=============================================================
proc PB_CMD_custom_G74 { } {
#=============================================================
global mom_spindle_direction mom_sys_cycle_tap_code
if { $mom_spindle_direction == "CLW"} {
   set mom_sys_cycle_tap_code "84"
       } elseif { $mom_spindle_direction == "CCLW" } {
   set mom_sys_cycle_tap_code "74"
       }


}
先创建一个这样的条件
然后把PB_CMD_custom_G74复制到PB_CMD_start_of_operation_force_addresses列表下变成这样
#=============================================================
proc PB_CMD_start_of_operation_force_addresses { } {
#=============================================================
MOM_force once X Y Z I J R F
MOM_force once user_G95 user_M29 user_S user_M3 user_G84_F M_spindle S
PB_CMD_custom_G74

}
但这是我的TCL里是这个名字不知道你的里面名字是否相同了

且行且珍惜、 发表于 2020-2-3 22:04:57

andy1414 发表于 2020-2-4 08:19:35

本帖最后由 andy1414 于 2020-2-4 08:29 编辑

且行且珍惜、 发表于 2020-2-3 21:52
在后处理构造器里不会弄不过可以在TCL文件里改如果你会的话
#========================================== ...
非常感謝你的解答已經可以了,代碼都是相同的依照視頻是放在攻絲循環裡怎麼都不成功,
原來要放在工序起始,難怪有人要說祿視頻的壞話,我還花錢買視頻搞了好幾天都失敗。
看tcl語句怎麼也看不出問題,原來放錯地方。再次感謝。。

http://www.ugsnx.com/forum.php?mod=image&aid=281408&size=300x300&key=6b8c99041045c772&nocache=yes&type=fixnone

jjp7366 发表于 2020-2-9 13:48:35

# Determine the tapping G code according to thread direction for float tap.
#
# 06-25-2013 levi - Initial version
# 08-07-2015 gsl- "TRUE" was mistaken as TRUE (no quotes).

global mom_spindle_direction
global final_tap_mode
global mom_cycle_thread_right_handed

# Get the thread direction by feature first, if doesn't exist, get it from spindle rotation direction.
if { } {
   if { $mom_cycle_thread_right_handed == "TRUE" } {
      set final_tap_mode "84"
   } else {
      set final_tap_mode "74"
   }
} elseif { $mom_spindle_direction == "CLW" } {
   set final_tap_mode "84"
} elseif { $mom_spindle_direction == "CCLW" } {
   set final_tap_mode "74"
}

andy1414 发表于 2020-2-9 21:03:23

jjp7366 发表于 2020-2-9 13:48
# Determine the tapping G code according to thread direction for float tap.
#
# 06-25-2013 levi -...

這個語句更好,判別絲錐類別,再不行判別主軸,雙管齊下。

且行且珍惜、 发表于 2020-2-9 21:51:35

jjp7366 发表于 2020-2-9 13:48
# Determine the tapping G code according to thread direction for float tap.
#
# 06-25-2013 levi -...

麻烦大神给我写个判断语句
求一个tcl代码 意思是一个程序中有t=0 且有t≠0 时弹出报警 最好同时指出t=0的工序名称 单独t等于0不报警 t不等于0也不报警 必须满足一个t等于0且有别的工序t不等于0才报警
跪谢

jjp7366 发表于 2020-2-10 08:13:05

这是新版后处理自带的。
页: [1]
查看完整版本: G74怎麼都不成功