prathmesh80
Aerospace
- Jul 11, 2012
- 4
I am trying to make a tool list for one turning machine & it is require Tool list at the top of the pgm.
When I am using same grooving tool (same tool no) for two or more than two operations with different tracking point.
I want to output the tool two times in tool list, with different adjust register i.e. left & right used in operation.
I try to use the standard tool list CC. & customised it to suit my requirement.
What I did is :
proc MAP_TOOL_TYPE { } {
global mom_tool_type
global mom_tool_left_adjust_reg
global mom_tool_right_adjust_reg
global mom_tool_adjust_register
if {[string match "Milling*" $mom_tool_type]} {
return "MILL"
} elseif { [string match "Turning*" $mom_tool_type]} {
return "LATHE"
} elseif { [string match "Grooving*" $mom_tool_type] && $mom_tool_left_adjust_reg != $mom_tool_adjust_register } {
return "GROOVER"
} elseif { [string match "Grooving*" $mom_tool_type] && $mom_tool_right_adjust_reg != $mom_tool_adjust_register } {
return "GROOVEL"
} elseif { [string match "Threading*" $mom_tool_type]} {
return "LATHE"
} elseif { [string match "Drilling*" $mom_tool_type]} {
return "DRILL"
} else {
return ""
}
}
I am switching the tool type for output as above.
But somehow the procedure is holding the mom_tool_adjust_register value of last operation either left or right.
& i am not getting the required result.
Any thoughts how to get this done.
When I am using same grooving tool (same tool no) for two or more than two operations with different tracking point.
I want to output the tool two times in tool list, with different adjust register i.e. left & right used in operation.
I try to use the standard tool list CC. & customised it to suit my requirement.
What I did is :
proc MAP_TOOL_TYPE { } {
global mom_tool_type
global mom_tool_left_adjust_reg
global mom_tool_right_adjust_reg
global mom_tool_adjust_register
if {[string match "Milling*" $mom_tool_type]} {
return "MILL"
} elseif { [string match "Turning*" $mom_tool_type]} {
return "LATHE"
} elseif { [string match "Grooving*" $mom_tool_type] && $mom_tool_left_adjust_reg != $mom_tool_adjust_register } {
return "GROOVER"
} elseif { [string match "Grooving*" $mom_tool_type] && $mom_tool_right_adjust_reg != $mom_tool_adjust_register } {
return "GROOVEL"
} elseif { [string match "Threading*" $mom_tool_type]} {
return "LATHE"
} elseif { [string match "Drilling*" $mom_tool_type]} {
return "DRILL"
} else {
return ""
}
}
I am switching the tool type for output as above.
But somehow the procedure is holding the mom_tool_adjust_register value of last operation either left or right.
& i am not getting the required result.
Any thoughts how to get this done.