~女少荒洪
global mom_feed_cut_unit mom_spindle_speed feed1 ms mss mom_feed_cut_value feed2
if { [string match "mmpr" $mom_feed_cut_unit ] } {
set feed1 [string trimright [format "%.3f" $mom_feed_cut_value] "0"]
} elseif { [string match "mmpm" $mom_feed_cut_unit] } {
set feed2 [expr $mom_spindle_speed*$mom_feed_cut_value]
set feed1 [string trimright [format "%.3f" $feed2] "0"]
}
我是这样搞的