Z-offset after tool change wrong

Post anything you want to discuss with others about the software.

Z-offset after tool change wrong

Postby CADdy » Fri Jan 20, 2023 6:04 pm

Hi all,
I would like to come back to my problem with the Z height when changing tools. It happened to me again today that after changing the tool and then measuring the new cutter, the Z height was totally wrong. On the first attempt, the cutter milled about 20 mm above the workpiece. Measuring the same tool again then made it fit. A new change with another tool would have rammed it fully into the workpiece. The emergency stop protected against this.

I found the following message:

Tooloffset-Error.png
Tooloffset-Error.png (18.46 KiB) Viewed 5650 times

Could this be related? How could I set the offset to the current tool? What could be done to fix the error? UCCNC version is 1.2115

Peter
CADdy
 
Posts: 148
Joined: Sun Sep 17, 2017 2:26 pm

Re: Z-offset after tool change wrong

Postby cncdrive » Fri Jan 20, 2023 6:08 pm

This is not a "stock" UCCNC message, but the message is likely coming from a macro or from a plugin.
Probably from your tool length macro.
The issue is likely to be in that macro or plugin, so I would check the code in it.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: Z-offset after tool change wrong

Postby CADdy » Fri Jan 20, 2023 10:50 pm

Thank you for your answer. I have the "neon screenset" from laki in use. I did not find the text of the message in any macro or plugin. Would have been too easy.

If I use the original screenset from UCCNC, this error message should not occur anymore? And I hope the indefinable jumps of the Z-position should then also be a thing of the past...

Peter
CADdy
 
Posts: 148
Joined: Sun Sep 17, 2017 2:26 pm

Re: Z-offset after tool change wrong

Postby dezsoe » Sat Jan 21, 2023 7:01 am

This message comes from the probing plugin (probe screen). It is what it is: you have a tool loaded and G43 or G44 is set to another tool. E.g.: M6 T1, G43 H2.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Z-offset after tool change wrong

Postby CADdy » Sat Jan 21, 2023 8:10 am

Ok, but surely this should be set accordingly after probing the new tool?

Peter
CADdy
 
Posts: 148
Joined: Sun Sep 17, 2017 2:26 pm

Re: Z-offset after tool change wrong

Postby dezsoe » Sat Jan 21, 2023 8:46 am

No. Before probing, because the probing counts with the tool length offset. This is why the plugin prints the warning. If you first probe and set zero then apply the TLO then the tool will be offset by the difference between the last TLO and the new TLO.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Z-offset after tool change wrong

Postby CADdy » Sun Jan 22, 2023 12:15 pm

Hi dezsoe,

you are right. This is also the error when the Z offset of a newly changed tool is not correct. The assignment of the measured tool length to the used tool is wrong. Yesterday I made some tests with the original screenset of version 1.2115. Thereby, with the same functionality, this error did not occur.

I just can't fix it unfortunately, because I do not have the programming background. But I think I have understood the problem.

Thanks a lot
Peter
CADdy
 
Posts: 148
Joined: Sun Sep 17, 2017 2:26 pm

Re: Z-offset after tool change wrong

Postby Parkgrr » Sun Jan 29, 2023 10:02 pm

Hi
Hijacking this as it seems to have slowed down. Having a similar issue. Quite random tool lengths, I'm sure my code just sucks. Would someone mind taking a gander at what I've written?

double ZMove = 14.8966; //Travel Distance to probe
double ZPos = exec.GetZmachpos();

exec.Callbutton(182); //Remove tool offset
double OldZpos = ZPos; // Set Old z position to current z position
ZPos = ZPos - ZMove; //Set Zpos to Zpos minus distance to probe
exec.Code("G31 Z" + ZPos + " F5.0" ); // Probes the tool length.
while(exec.IsMoving()){}
ZPos = exec.GetZmachpos();
while(exec.IsMoving()){}

if(ZPos == OldZpos) // Check if the the tool positon was found.
{
MessageBox.Show("ERROR! The tool did not hit the probe and DRO was not set");
exec.Stop();
return;
}

double Zoffset = AS3.Getfielddouble(873); //Set Zoffset to the current Z Mach coord
double Toffset = (Zoffset - ZShift); //Set Toffset to be current Z minus Zshift
exec.Code("G49"); // Cancel/delete tool offset
exec.Wait(100);
AS3.Setfieldtext("Removed Tool Offset ",2000);
AS3.Setfield(Toffset , (195+Tool));
exec.Callbutton(780); // Save tooltable
AS3.Setfieldtext("The Tool Table Is Updated ",2000);
AS3.Setfieldtext(" ",2000);
AS3.Setfieldtext("Applying G43 ",2000);
exec.Wait(1000);
exec.Code("G43 H" +Tool );
AS3.Setfieldtext(" G43 H" +Tool +" Applied ",2000);
AS3.Setfieldtext(" ",2000);
exec.AddStatusmessage("G43 Applied");
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

Re: Z-offset after tool change wrong

Postby Parkgrr » Mon Jan 30, 2023 8:42 am

I should note this works fine about 70% of the time. Often it will be off up to an inch.
Parkgrr
 
Posts: 98
Joined: Mon Dec 07, 2020 9:12 am

Re: Z-offset after tool change wrong

Postby fsli » Mon Jan 30, 2023 12:19 pm

Parkgrr wrote:exec.Code("G31 Z" + ZPos + " F5.0" ); // Probes the tool length.

The axis value should be a relative distance to travel, not an absolute end point.
Frank
fsli
 
Posts: 97
Joined: Mon Jul 11, 2022 12:36 am

Next

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 41 guests