少校
UID2202446
U币2
G币6530
技术0
主题34
精华0
阅读权限90
注册时间2014-6-24
最后登录2024-11-14
在线时间604 小时
手机17715533823
少校
|
global cycle_init_flag
global mom_cycle_rapid_to mom_cycle_retract_to
global mom_tool_pitch ff fh fp fm1 S1
global mom_parent_group_name afterG95
global mom_spindle_speed
global mom_group_name
global mom_tool_type
global feed
global feed_mode
global mom_spindle_rpm
# if it's the first hole, force output the hole parameters
if { [info exists cycle_init_flag] && [string match "TRUE" $cycle_init_flag] } {
MOM_force once X Y Z R cycle_dwell cycle_step G_return G_motion F tap_string cycle_orient user_tapF Q_tap S
if {[string match "Tap" $mom_tool_type ]} {
set afterG95 1
if {![info exists mom_tool_pitch ]} {
set mom_tool_pitch 0.0
}
set fh [expr $mom_tool_pitch*$mom_spindle_speed]
set S1 [format "%.0f" $mom_spindle_speed]
if { [info exists fm1] } {
set ff [ format "%.2f" $mom_tool_pitch ]
MOM_output_literal ""
} else {
set ff [ format "%.1f" $fh ]
# MOM_output_literal "/ M29 S$S1"
}
} else {
if {[string match "*PR" $feed_mode]} {
set ff [expr $feed*$mom_spindle_rpm]
} else {
set ff $feed
}
MOM_output_literal ""
}
}
# if retract move has been output for last hole, force output the hole parameters
# for next hole
if { [EQ_is_lt $mom_cycle_rapid_to $mom_cycle_retract_to] } {
MOM_force once X Y Z R cycle_dwell cycle_step G_return G_motion F tap_string cycle_orient user_tapF Q_tap S
} |
|