NX Outputting the tool axis of the next operation using pretreatment

2024-05-28T07:49:57Z
NX for Manufacturing

Summary


Details

If we have a CAM setup where the operations have different tool axes, how can we output the next operation's tool axis at the end of the current operation?

Solution

We can use the pretreatment functionality to do this. In the service tcl layer, add this code for example:

proc LIB_SPF_pt_additional_variables_mycustompost {} { LIB_SPF_pretreatment_add_var MOM_first_move mom_tool_axis,0 0 LIB_SPF_pretreatment_add_var MOM_first_move mom_tool_axis,1 0 LIB_SPF_pretreatment_add_var MOM_first_move mom_tool_axis,2 0 } LIB_GE_command_buffer_edit_append MOM_end_of_path_LIB MOM_end_of_path_LIB_ENTRY_end myProc myTag proc myProc {args} { set next_tool_axis_x [LIB_SPF_get_pretreatment mom_tool_axis,0 next] set next_tool_axis_y [LIB_SPF_get_pretreatment mom_tool_axis,1 next] set next_tool_axis_z [LIB_SPF_get_pretreatment mom_tool_axis,2 next] MOM_output_literal "The tool axis of the next operation is $next_tool_axis_x $next_tool_axis_y $next_tool_axis_z" }

LIB_SPF_pretreatment_add_var will save the values of mom_tool_axis at the MOM_first_move event for each operation.

LIB_SPF_get_pretreatment will later read the collected variables so the values can be output. In this case we output the values for the next operation at MOM_end_of_path.

In the below example, the first operation has a tool axis in Z direction and the second operation has a tool axis in XZ direction.


The tool axis of the second operation is output at the end of the first one.


Notes

LIB_SPF_pretreatment_add_var

LIB_SPF_get_pretreatment

KB Article ID# PL8793207

Contents

SummaryDetails

Associated Components

Manufacturing Post Configurator