Hello Guest it is September 28, 2020, 10:13:28 PM

Author Topic: Auto Zero and Tool Length Zero  (Read 1072 times)

0 Members and 1 Guest are viewing this topic.

Auto Zero and Tool Length Zero
« on: July 04, 2017, 01:18:24 PM »
Hi,

I have tried several Macro's in order to achieve auto tool length zero but they always zero the fixture offset zero and not the tool zero.  I am putting the various macro's in the vb button Auto Tool Zero (this seems to indicate that it would set the tool length and not the fixture offset).  Here is a simple macro i have tried.....  

Message( "Auto Zeroing..." )
If IsSuchSignal (22) Then
code "G31 Z-3 F20"
While IsMoving()
Wend
Call SetDRO( 2, .060 )
code "G1 Z1"
End If

Will i need 2 touch plates?  All i would like to do is have all the fixture offsets at zero and hit the auto tool zero button and have the length set from machine home (z in the highest position).  It would be nice to set the fixture offset to table height and then have positive tool length offsets but I wanted to start with the simple stuff first.  What in the above code can i change to set the active tool offset in the tool information window?  I may be overthinking it but it seems that i could enter 3 in the tool information window load tool 3 in the spindle and hit auto tool zero and it shoiuld zero tool 3 tool length offset but every macro i have found zero's the z fixture offset that is active.  Is this a function of the M31 probe routine?

I am considering buying a screenset from CNC woodworker but i think it works the same way as what i have now.

Thank you in advance,

Matt

Offline TPS

*
  •  1,676 1,676
    • View Profile
Re: Auto Zero and Tool Length Zero
« Reply #1 on: July 05, 2017, 03:51:05 AM »
Hello Matt,

after a G31 you allways should read the exact Position where the probe was hit with:

ZProbePos = GetVar(2002) // 2000 -> X , 2001 -> Y , 2002 -> Z

to write the tool lenght you have to use:

SetToolParam(ToolNr,2, ZProbePos)

to get the current ToolNr:

ToolNr = GetCurrentTool()

Play a Little bit arround with this functions, and you will familar with the complex theme of
offset's and Toollenght.

Thomas
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline RICH

*
  • *
  •  7,412 7,412
    • View Profile
Re: Auto Zero and Tool Length Zero
« Reply #2 on: July 05, 2017, 07:26:02 AM »
The attached sheds light on the influence of feedrate and acceleration when probing.
Just something you may want to consider.

RICH 
Re: Auto Zero and Tool Length Zero
« Reply #3 on: July 05, 2017, 01:11:58 PM »
Thanks guys that is very helpful.  I will play with this and see how it goes.  If i want to set a tool length every time i change tools then i just add this information into my m6.start macro?  I have a router with a tool changer so i usually keep my tool lengths set but i am considering changing to a manual change spindle which would make this very useful.

Thanks,

Matt