|
发表于 2019-3-8 16:51:52
|
显示全部楼层
#PB_CMD_TOOL_INFO
set outputthd 1
global mom_tool_name
global mom_tool_diameter
global mom_tool_corner1_radius
set tdi [ format "%.2f" $mom_tool_diameter]
set tr [ format "%.2f" $mom_tool_corner1_radius]
MOM_output_literal "($mom_tool_name,D$tdi,R$tr)"
global mom_tool_adjust_register
global mom_cutcom_adjust_register
global mom_tool_adj_reg_defined
global mom_tool_number
if [info exists mom_tool_number] {
set tt $mom_tool_number
} else {
set tt 0
}
if {$mom_tool_adj_reg_defined == 1} {
set th $mom_tool_adjust_register
} else {
set th 0
}
if [info exists mom_cutcom_adjust_register] {
set td $mom_cutcom_adjust_register
} else {
set td 0
}
set tt [format "%02.0f" $tt]
set th [format "%02.0f" $th]
set td [format "%02.0f" $td]
if {$outputthd == 1 } {
#MOM_output_literal "(T$tt,H$th,D$td#)"
} else {
#MOM_output_literal "(T00,H00,D$td#)"
}
global mom_stock_part side
global mom_stock_floor
global mom_stock use floor same as side
global mom_operation_type
global mom_motion_type
set xystock 0
set zstock 0
if [info exists mom_stock_floor] {
set xystock [format "%.2f" $mom_stock_part side]
set zstock [format "%.2f" $mom_stock_floor]
}
if {$mom_operation_type == "point to point"} {
set xystock 0
set zstock 0
}
MOM_output_literal "(XY=[format "%.2f" $xystock], Z=[format "%.2f" $zstock])"
#output tool info
global ptp_file_name
global tool_lists_file_name
global ino
global mom_group_name mom_output_file_suffix mom_output_file_basename
global mom_sys_max_travel
global mom_sys_min_travel
global mom_machine_time
set tool_lists_file_name ${ptp_file_name}_toollists
if {![info exists ino]} {
set ino 1
if {[file exists $tool_lists_file_name]} {
MOM_remove_file $tool_lists_file_name
}
}
set tfile [open $tool_lists_file_name a]
if {$ino > 1} {
puts $tfile "(T$tt $mom_tool_name D$tdi R$tr H$th ZMIN=[format "%.2f" $mom_sys_min_travel(2)])"
}
set mom_sys_max_travel(2) -9999.999
set mom_sys_min_travel(2) 9999.999
set ino [expr $ino+1]
close $tfile
|
|