Page 1 of 1

Tool Touchoff

Posted: Mon Mar 21, 2022 10:22 pm
by Snyggis
Looking for some help, I have a CNC router which requires a manual tool change. Every time I change tools I rezero the z height off the material. I recently installed a sensor on the side of the table which is permanently fixed in Z, Y, and Z. When I drive a tool into it it trips an IO.

I would like to use this to simplify my tool setting process.

1. Zero Z on my first tool
2. Tool Change
a. touch off tool 1 and measure distance between DRO zero and machine zero
b. Change tools, measure new distance between DRO and MC zero
c. Subtract T1 from T2
d. Update the new DRO position to be at the new "Zero" for the changed tool

I am stuck on step d. I dont know how to push a DRO position into Z. Is this possible? I think another approach would be use tool lengths, but I never use tool lengths, just a manual zeroing at the right height. Is this a good approach? I have my sample code below:

Stuck on the line where I commented out // ch7->Dest=(ch7->(T2-T1)); That is doing all sorts of strange things.
4X8 Router Tool Height.c
(2.74 KiB) Downloaded 89 times
Thanks,

Scott

Re: Tool Touchoff

Posted: Tue Mar 22, 2022 1:12 am
by TomKerekes
Hi Scott,

You should be able to use:

Code: Select all

DoPCFloat(PC_COMM_SET_Z,0.0);
To adjust the GCode Z Offset to make the Z DRO show zero.

HTH

Re: Tool Touchoff

Posted: Tue Mar 22, 2022 11:36 am
by Snyggis
Thanks Tom, will check tonight! Looks like that function will work to set any value for the Z DRO?

Re: Tool Touchoff

Posted: Tue Mar 22, 2022 5:05 pm
by TomKerekes
yes