请问是不是在后处理里面添加这个变量就可以了?
proc MOM_end_of_path { } {
#_____________________________________________________________
# This procedure is executed at the end of a path.
#_____________________________________________________________
global nurbs_move_flag
global max_z min_z
global max_x min_x
global max_y min_y
global mom_path_name
global mon_tool_name
global mom_tool_diameter
global mom_tool_cornerl_radius
global nurbs_move_flag
global mom_stock_part
global mom_stock_floor
global mom_cutting_time
global mom_cut_level_min_depth
global mom_cut_level_max_depth
global mom_oper_program
global mom_spindel_rpm
}
#================================================================
proc MOM_end_of_group {} {
#===============================================================
global mom_stock_part
global max_cut_depth
global mom_group_name
global mom_tool_name
global mom_machine_time
global sub_machine_time
global mom_stock_part
global mom_stock_floor
global stock_part
global machine_time
global cut_method
global depth
global sn aq tls clm
global mom_clearance_plane_status
global mom_spindle_speed
global mom_feed_cut_value
set aq ""
#set sub_machine_time $mom_machine_time
set sub_machine_time [expr $mom_machine_time - $sub_machine_time]
set stock_part [format "%.2f" $mom_stock_part]
if { $mom_clearance_plane_status == 1} {
if {$clm <= 0 } {set aq "请检查安全高度"}
}
if {$mom_clearance_plane_status != 1 } {set aq "未设安全高度"}
if {$mom_stock_part >= 0.1 } { set cut_method "粗" }
if {$mom_stock_part >= 0.03 && $mom_stock_part < 0.1 } { set cut_method "中光" }
if {$mom_stock_part < 0.03 && $mom_stock_part >= 0 } { set cut_method "光" }
if {$mom_stock_part <-0.15 } { set cut_method "光" }
if {$mom_stock_part >=-0.15 && $mom_stock_part < 0 } { set cut_method "光" }
if {[EQ_is_gt $sub_machine_time 0]} {
set sn [expr $sn+1]
MOM_output_literal "[format "%4d" $sn] [format "%6s" $mom_group_name] [format "%8s" $mom_tool_name] [format "%3s" $cut_method] [format "%7.2f" $stock_part] [format "%6.1f" $max_cut_depth]"
#MOM_output_literal "-------------------------------------------------------------------------------"
set sub_machine_time $mom_machine_time
}