Hello Guest it is March 28, 2024, 01:17:57 PM

Author Topic: button to set tool change to current location??  (Read 3167 times)

0 Members and 1 Guest are viewing this topic.

button to set tool change to current location??
« on: July 18, 2012, 09:52:50 PM »
I run a semi manual tool change macro and need to set the tool change location often.

The way I currently do this is to read machine coordinance from the DRO and then switch
to the setup screen and manually type in the numbers.

What would be fantastic is a simple button on the setup screen that will put the current
machine coordinance into the tool change location. 

Any idea's?

Thank you

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: button to set tool change to current location??
« Reply #1 on: July 19, 2012, 03:04:33 AM »
Easy enough to do, just have a VB button that looks at the machine coords and then writes them to the toolchange DROs
Hood
Re: button to set tool change to current location??
« Reply #2 on: July 19, 2012, 08:46:36 PM »

[/quote]
Easy enough to do, just have a VB button that looks at the machine coords and then writes them to the toolchange DROs
Hood
[/

Thank you Hood,
Could you point me in the right direction on how to start?

I assume I need to try out the screen editor to add a button and then write a script?

Any help with the script would be appreciated since I am not a programmer.


Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: button to set tool change to current location??
« Reply #3 on: July 20, 2012, 02:53:37 AM »
Yes use one of the screen editors to put a button on screen and then make sure it is set as a VB cutton. Save it then exit the editor and open it from Mach then go to the Operator menu then Edit Button Scripts. You should see the new button flashing, click it and the editor will open.
Paste the following into the editor and then File and Save and it should do what you are wanting.

XTool= GetOemDRO(83)
YTool= GetOemDRO(84)
ZTool= GetOemDRO(85)

SetOemDRO (1200,XTool)
SetOemDRO (1201,YTool)
SetOemDRO (1202,ZTool)


Hood
Re: button to set tool change to current location??
« Reply #4 on: July 20, 2012, 05:22:35 PM »
Very cool, thank you!

I edited the Mach 1024 screen and changed the Auto Tool Zero button to "Set Tool Change Pos."

Then added the script... works great on my test version of mach

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: button to set tool change to current location??
« Reply #5 on: July 21, 2012, 02:15:11 AM »
No problem, glad its working how you want :)
Hood