NX Need to post out tool change / Start-up codes for every operation

2019-05-15T15:30:17Z
NX for Manufacturing

Summary


Details

The machine type is Mazak.  How to post the tool change and spindle start for every process. 
NOTE: Previously, this was accomplished by putting the tool change codes in the Initial Move and First Move events; however, this presents a problem with inserting start event UDEs in the proper sequence in the code file.



Solution

Make the post call the usual auto tool change event at the beginning of each operation with a set of custom commands.  As the first thing in Start of Program, initialize the flag variable that will be used:


#============================================================= 
proc PB_CMD_init_tl_chg_flag { } { 
#============================================================= 
global force_tl_chg


set force_tl_chg 0


}


As the LAST thing in Start of Path, force the call to the standard auto tool change event when the test flag has a value of 1 (meaning that this is not a true tool change):


#============================================================= 
proc PB_CMD_call_tl_change_if_required { } { 
#============================================================= 
global force_tl_chg


if { $force_tl_chg == 1 } { 
 PB_auto_tool_change 
 }


}


The last thing in End of Path is where the testing is done for the check flag.  If the next operation does not need a real tool change, set the force_tl_chg flag to 1:


#============================================================= 
proc PB_CMD_check_tl_chg { } { 
#============================================================= 
global mom_next_oper_has_tool_change 
global force_tl_chg


if { $mom_next_oper_has_tool_change == "NO" } { 
 set force_tl_chg 1 
 } else { 
 set force_tl_chg 0 
 }


}


So, the normal auto tool change event is always called, regardless of whether there is a real tool change required or not, and it's only called one time per operation. 


There are some go home type moves in the tool change event that only need to come out for a real tool change.  To handle this situation, use the existing force_tl_chg flag value, as it knows whether a real tool change is being processed or not.  For these blocks, create an output condition like this:


=============================== 
 global force_tl_chg


 if { $force_tl_chg == 0 } { 
 return 1 
 } else { 
 return 0 
 } 
=============================== 
A similar (reversed) logic can be used to enable other lines that should come out only when the tool change event is being called without a true tool change.



Notes and References


Hardware/Software Configuration

Platform: all
OS: n/a
OS Version: n/a
Product: NX
Application: CAM
Version: V10.0.3
Function: POSTBUILDER

Ref: 001-7957314

KB Article ID# PL8010274

Contents

SummaryDetails

Associated Components

Manufacturing Post Builder