|
发表于 2014-1-24 23:27:16
|
显示全部楼层
想了一下午,加奇偶判断语句,终于解决问题。
#=============================================================
proc MOM_drill_deep_move { } {
#=============================================================
global cycle_init_flag
global abc
global mom_spindle_speed
global mom_sys_abort_next_event
if { [info exists mom_sys_abort_next_event] } {
if { [llength [info commands PB_CMD_kin_abort_event]] } {
PB_CMD_kin_abort_event
}
}
if { $abc%2 == 0 } {
MOM_do_template cycle_drill_deep
set cycle_init_flag FALSE
MOM_output_literal "G80"
MOM_output_literal "()"
MOM_output_literal "X-0.01 Y-0.01"
MOM_output_literal "S2000 M04"
MOM_output_literal "G00 Z50.000"
MOM_output_literal "S[ format "%.0f" $mom_spindle_speed] M03"
MOM_output_literal "G00 Z30.000"
MOM_output_literal "()"
}
if { $abc%2 == 1 } {
MOM_do_template cycle_drill_deep
set cycle_init_flag FALSE
}
incr abc
}
postprocessor.rar
(100.96 KB, 下载次数: 221)
|
|