Hello Guest it is May 19, 2019, 01:01:55 PM

Author Topic: Hot Button to return Z to Machine Zero Help  (Read 2781 times)

0 Members and 1 Guest are viewing this topic.

Hot Button to return Z to Machine Zero Help
« on: May 06, 2009, 04:37:40 PM »
SO I make buttons all the time using a keyboard emulator so I have hot buttons, but I need one to return Z to Machine Zero for a tool change. I'm sure it's a simple code if anyone can give it to me, thanks.

What I usually do when I first start up my mill is home to reference all to machine zero, then I go abou settig up my piece and REZero the Z to my wokpiece. So I need to know the code to have my Z return to MACHINE Zero.

Offline Hood

*
  •  25,811 25,811
  • Carnoustie, Scotland
    • View Profile
Re: Hot Button to return Z to Machine Zero Help
« Reply #1 on: May 06, 2009, 04:55:41 PM »
G53G0Z0

Hood
Re: Hot Button to return Z to Machine Zero Help
« Reply #2 on: May 06, 2009, 05:34:59 PM »
Great thanks. I forgot to mention I usually copy other code to get what I want, which means I understand what's going on but not totally confident in what I'm doing.

So what I would do is create a button and asign a hot key in screen4 then in Mach edit VB script and put in:

Code "G53 G0Z0"

If I type in MDI "Z0" after hitting the button for the code above the spindle will move to the regular Z0 I set earlier and not return to Machine Zero, Correct? Thanks.

Offline Hood

*
  •  25,811 25,811
  • Carnoustie, Scotland
    • View Profile
Re: Hot Button to return Z to Machine Zero Help
« Reply #3 on: May 06, 2009, 05:39:53 PM »
Yes thats correct except you use Edit Button Script in Mach and when the button flashes clcik on it and enter the code, you will however need to write it as following
code("G53G0Z0")


Yes if you just type G0Z0 it will go to the offset zero, type G53G0Z0 and it will go to machine zero.

Hood

Re: Hot Button to return Z to Machine Zero Help
« Reply #4 on: May 06, 2009, 05:53:37 PM »
Thanks, out of curiosity how come it needs to be G53G0Z0 and not G53 G0Z0? Thanks.

Offline Hood

*
  •  25,811 25,811
  • Carnoustie, Scotland
    • View Profile
Re: Hot Button to return Z to Machine Zero Help
« Reply #5 on: May 06, 2009, 06:00:39 PM »
Sorry skimmed through your post in the usual fashion when I am busy doing other things and never noticed that youhad the "" there and thought you were just saying that you would put the code G53 G0Z0 in the button.
Anyway whichever will work, putting the () round it is the way Brian always seems to have it in anything I have seen so I do that also as I dont have a clue about VB I tend to follow what others do ;) but without the () will work as well.

Hood
Re: Hot Button to return Z to Machine Zero Help
« Reply #6 on: May 06, 2009, 07:59:40 PM »
Thanks.