Showing results for 
Search instead for 
Do you mean 

Tool length D1. How change?

5axis Cnc machine with Siemens Sinumerik 840D. I have measured tool length and enter this value into D1 field.
And for activate it I use in my programm:
G54 D1
After few motion I need to change tool length, and I want to change it inside nc-programm, many times.
Is it possible?

Re: Tool length D1. How change?

To be sure:

- you want to change tool length by switching D... register number to D2, D3 etc?

- or you are going to modify tool length by overriding $P_TOOLL[] ?


This way or another, my idea would be to use User Defined Events for this. In some operations, you can add additional UDEs to Transfer/Rapid motions.
If you need it also in other places on tool path, you can use Tool Path Editor to add UDEs wherever you like.

UDE which you want to use might be Cutter Compensation or Insert (it would be my choice if this command can exists as separate line in NC code)



Marek Pawlus, NCmatic

Production: NX 11.0.1
Development: C#, Tcl/Tk, CSE

Re: Tool length D1. How change?

I am not sure, but may be you can use for tool No 3 and D1


$TC_DP1[3,1] = $TC_DP1[3,1] + 1.000


Try it.

Re: Tool length D1. How change?

If it only needs to be changed for specific operations (not WITHIN an operation), "Length adjust" (typically right next to "tool number") can be used to set this.

Set the tool's length adjust to 1 (or whatever you want as the default)

Then in each operation you can over-ride the length adjust to the desired number (2 or 3 or ...)

You might want to add code to your post to make sure the length adjust is not zet to zero or > 7 (or whatever the max is for your machine)

Then output as the D word


The variable in the post is "mom_tool_adjust_register"

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

Learn online

Solution Information