NX How to enable post output for the Extra Tool Change user defined event

2021-10-06T23:27:59Z
NX for Manufacturing

Summary


Details

NX includes a standard user defined event (UDE) to call for an extra tool change when post processing.  However, adding this to an operation does not trigger any tool change codes in the posted code.


Solution

The Extra Tool Change UDE adds a LOAD/TOOL statement to the tool path listing.  The default post templates do include the Load Tool event handler, but this typically has no contents and so will produce no output from the post.


To make the post output something when it encounters this event from the Extra Tool Change UDE, we have to populate the event handler.  You can have it do anything here, it's just a matter of writing the code.  For example, we can create a one-line custom command that simply calls the regular auto tool change event to go through whatever is defined there:

You can build more elaborate logic to support tool number validation and testing for whether the UDE has the 'manual tool change' option enabled (and then calling the appropriate tool change handler) by starting with the code from the standard Tool Change event under Machine Control in the post:

The text of this logic is as below:

==================================
    global mom_tool_change_type mom_manual_tool_change
    global mom_tool_number mom_next_tool_number
    global mom_sys_tool_number_max mom_sys_tool_number_min

    if { $mom_tool_number < $mom_sys_tool_number_min || $mom_tool_number > $mom_sys_tool_number_max } {

       global mom_warning_info
       set mom_warning_info "Tool number to be output ($mom_tool_number) exceeds limits of ($mom_sys_tool_number_min/$mom_sys_tool_number_max)"
       MOM_catch_warning
    }

    if { [info exists mom_tool_change_type] } {
       switch $mom_tool_change_type {
          MANUAL { PB_manual_tool_change }
          AUTO   { PB_auto_tool_change }
       }
    } elseif { [info exists mom_manual_tool_change] } {
       if { ![string compare $mom_manual_tool_change "TRUE"] } {
          PB_manual_tool_change
       }
    }
==================================



And, of course, this can be customized or expanded as the user requires.  The key is to make sure that this Load Tool event handler has contents that tells the post what to do when it encounters this event.



Hardware/Software Configuration

Platform: all
OS: n/a
OS Version: n/a
Product: NX
Application: CAM
Version: V1953
Function: USER_DEF_EVENT

Ref: 002-8549041

KB Article ID# PL8549041

Contents

SummaryDetails

Associated Components

Manufacturing General