Hello Guest it is March 28, 2024, 05:40:40 AM

Author Topic: Clearing the current tool by code....  (Read 1243 times)

0 Members and 1 Guest are viewing this topic.

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Clearing the current tool by code....
« 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

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Clearing the current tool by code....
« Reply #1 on: June 02, 2019, 03:19:08 AM »
try

SetDro(24,0)
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Clearing the current tool by code....
« Reply #2 on: June 02, 2019, 03:33:34 AM »
Very nice, thanks TPS  :)

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Clearing the current tool by code....
« Reply #3 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.

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Clearing the current tool by code....
« Reply #4 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

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Clearing the current tool by code....
« Reply #5 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.

Offline Davek0974

*
  •  2,606 2,606
    • View Profile
Re: Clearing the current tool by code....
« Reply #6 on: June 02, 2019, 06:42:05 AM »
Thanks