Hello Guest it is December 06, 2019, 05:19:08 AM

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

0 Members and 1 Guest are viewing this topic.

Offline Davek0974

*
  •  2,580 2,580
    • View Profile
    • DD Metal Products Ltd
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
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline TPS

*
  •  1,413 1,413
    • 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 it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Davek0974

*
  •  2,580 2,580
    • View Profile
    • DD Metal Products Ltd
Re: Clearing the current tool by code....
« Reply #2 on: June 02, 2019, 03:33:34 AM »
Very nice, thanks TPS  :)
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Hood

*
  •  25,856 25,856
  • 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,580 2,580
    • View Profile
    • DD Metal Products Ltd
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
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Hood

*
  •  25,856 25,856
  • 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,580 2,580
    • View Profile
    • DD Metal Products Ltd
Re: Clearing the current tool by code....
« Reply #6 on: June 02, 2019, 06:42:05 AM »
Thanks
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives