Re: How to detect a 5 axis operation in PC

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Hello Javi,

 

You can do the following:

 

proc MOM_initial_move_LIB_ENTRY or MOM_first_move_LIB_ENTRY => arg "start" 

 

PB_CMD_detect_5axis_tool_path with the following code (inside of OOTB):

 

#=============================================================
proc PB_CMD_detect_5axis_tool_path { } {
#=============================================================
# This proc is used to detect if the operation is 5 axis simultaneous milling operation.
#
# This command is referenced by DPP_GE_DETECT_5AXIS_TOOL_PATH.
#
# In this command, tool path type is detected by mom_operation_type, mom_tool_path_type and mom_tool_axis_type.
#
# The result may not always match 5-axis simultaneous milling.
# It is more tolerance.
#
# Return:
# 1 - tool path is 5 axis simultaneous
# 0 - tool path is not 5 axis simultaneous
#
# 16-Jan-2017 shuai - Initial version.
#

global mom_tool_axis_type
global mom_tool_path_type
global mom_operation_type

if {![info exists mom_tool_axis_type] } {
set mom_tool_axis_type 0
}

if {![info exists mom_tool_path_type] } {
set mom_tool_path_type "undefined"
}

if {[PB_CMD_detect_hole_cutting_operation]} {

return 0

} elseif {($mom_tool_axis_type >= 2 && [string match "Variable-axis *" $mom_operation_type]) || \
![string compare "Sequential Mill Main Operation" $mom_operation_type] || \
(![string compare "variable_axis" $mom_tool_path_type] && ![string match "Variable-axis *" $mom_operation_type] && [string compare "Generic Motion" $mom_operation_type])} {

return 1

} else {

return 0
}

}

 

The next time in spanish Smiley Happy

 

Regards,