Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Davek0974 on June 02, 2019, 02:28:55 AM

Title: Clearing the current tool by code....
Post by: Davek0974 on June 02, 2019, 02:28:55 AM
For one reason or another  ;) I want to clear the current tool with a macro code.

I have tried SetCurrentTool(0) but although it clears the tool DRO it does not clear the tool offset or the tool description label.

Can it be done properly?

This is on Mach Turn BTW
Title: Re: Clearing the current tool by code....
Post by: TPS on June 02, 2019, 03:19:08 AM
try

SetDro(24,0)
Title: Re: Clearing the current tool by code....
Post by: Davek0974 on June 02, 2019, 03:33:34 AM
Very nice, thanks TPS  :)
Title: Re: Clearing the current tool by code....
Post by: Hood on June 02, 2019, 05:55:32 AM
I think the above will only clear the DRO but the description and offsets will still be in the tool table.
To set the tool table offsets zero you could use the same code  as you do in the height setter macro but include the X. Remeber X is rad in the tool table but if setting to zero it won't matter anyway.

G90 G10 L1 P1 X0 ZO will set offset 1 to zero, or it should. The label I am unsure of.

Title: Re: Clearing the current tool by code....
Post by: Davek0974 on June 02, 2019, 06:32:13 AM
Thanks Hood, TPS had it - i just wanted to remove the current tool from the system not from the actual tool table, setting the DRO to 0 seems ok,

 ;)
Dave
Title: Re: Clearing the current tool by code....
Post by: Hood on June 02, 2019, 06:37:42 AM
Ah ok, thought you were wanting to clear the table.
Calling T0000 should do the same I would think.
Title: Re: Clearing the current tool by code....
Post by: Davek0974 on June 02, 2019, 06:42:05 AM
Thanks