Cancel
Showing results for 
Search instead for 
Did you mean: 

TOOL CHANGE ZERO

Valued Contributor
Valued Contributor

I need to call tool zero at the beginning and end of the program for tool changes.Ive tried mom_tool_number with an expr of -1 with no luck new at postbuilder any help would be much appreciated .

7 REPLIES

Re: TOOL CHANGE ZERO

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I.e. you need "T0 M6" output?

 

Assuming Post Builder...

One option:
create a custom command "PB_CMD_Hastloy_Tool_Zero"

global mom_tool_number
set mom_tool_number 0
MOM_force once T M
MOM_do_template tool_change_1

Note the block template ("tool_change_1" after "MOM_do_template") may vary with your post.

 

Use "N/C Data Definitions" tab -> "Block" tab -> scroll thru list to find the correct block.

 

Once created, put PB_CMD_Hastloy_Tool_Zero in whatever event you need it (start of program, end of program, etc)

 

Note this is over-writing the current tool number.  If that is an issue, you could save it to another variable & then restore it after you output the block.

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: TOOL CHANGE ZERO

Valued Contributor
Valued Contributor

Thanks Ken  for your response I'll try that.

Re: TOOL CHANGE ZERO

Valued Contributor
Valued Contributor

Ken,

The custom command works fine but your right the overwriting does cause a problem.I entered the same command converting it back to tool 1 but that just made every tool change tool 1.Ive included an examlple of what im trying to do  as you can see i need it to M06 the previous tool after the tool zero at the beginning.

 

 

 

 

EXAMPLE POST.PNG

Re: TOOL CHANGE ZERO

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

maybe something like this:

 

global mom_tool_number
global hastloy_previous_tool_number

if {![info exists hastloy_previous_tool_number]} {
     set hastloy_previous_tool_number 0
}
set save_tool $mom_tool_number 
set mom_tool_number $hastloy_previous_tool_number 
MOM_force once T M
MOM_do_template tool_change_1
set hastloy_previous_tool_number  $save_tool 
set mom_tool_number  $save_tool 

I'm not sure if there is a mom_prev_tool_number (I don't think so, but I'm not sure)

 

There are other ways of doing this as well.

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: TOOL CHANGE ZERO

Valued Contributor
Valued Contributor

post_error.PNG

Ended up with this error

Re: TOOL CHANGE ZERO

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Make sure to enter your commands on a separate line, since you have two SET command on one line as shown in the error message.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide

Re: TOOL CHANGE ZERO

Valued Contributor
Valued Contributor

Ken ,

 moved the lines around slightly had it formated a little different from what you wrote.Once i put it exactly like you had it works like a charm thanks alot for your help!!

Learn online





Solution Information