NX Warning when post processing a 5-axis tool path using a 3-axis post processor

2019-05-09T07:32:01Z
NX for Manufacturing

Summary


Details

How can we output a warning or abort the process when post processing a multi-axis tool path using a 3-axis post processor?

Solution

Import the following example custom command to the post processor. The abort_opt variable can be set to different values to affect the behavior.

#============================================================= 

proc PB_CMD_before_motion { } { 

#============================================================= 

# Import this command to a 3-axis post to guard against 

# posting multi-axis motions. 

# ==> This command will be executed automatically; 

# there's no need to attach it to any event. 

# Oct-02-2015 gsl - New 

 # Tool axis must be (0,0,1) for a 3-axis post to process. 

 global mom_kin_machine_type mom_tool_axis

 if [string match "3_axis_mill" $mom_kin_machine_type] {

 if { !( [EQ_is_equal $mom_tool_axis(0) 0.0] &&\ 

 [EQ_is_equal $mom_tool_axis(1) 0.0] &&\ 

 [EQ_is_equal $mom_tool_axis(2) 1.0] ) } {

 # User may only abort current operation or skip to End-of-Program, or 

 # abort the entire posting job 

 # 

 set abort_opt 1

 set msg "3-axis post cannot process multi-axis motions!" 

 CATCH_WARNING $msg

 switch $abort_opt { 

 1 { 

 # Abort current operation 

 MOM_abort_operation 

 } 

 2 { 

 # Skip handling events of entire program 

 MOM_skip_handler_to_event END_OF_PROGRAM 

 } 

 3 { 

 # Abort posting job completely 

 MOM_abort $msg 

 } 

 default { 

 # Do nothing 

 } 

 } 

 } 

 } 

}

Notes

KB Article ID# PL8009911

Contents

SummaryDetails

Associated Components

Manufacturing Post Builder