Hello Guest it is March 28, 2024, 10:28:38 PM

Author Topic: Change homing order - which file do I edit?  (Read 3703 times)

0 Members and 1 Guest are viewing this topic.

Offline birdbrain

*
  •  41 41
  • Stupidity, beyond belief!
    • View Profile
Change homing order - which file do I edit?
« on: June 29, 2009, 02:39:38 AM »
Due to the mechanical build of my micro mill, I would like to change the homing order so that the homing order is Y, X, Z, A.
My requirement is that the Z axis homes, downwards, after the X and Y have homed to their normal positions. It is important for the X and Y to home first as they go to the position where the tool length sensor is. The Z axis can then home down onto the tool length sensor.
I am sure that the code to do this is very simple but I can't find which file the code should be in! ::)
Can anyone tell me where I can find the file that should be edited?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Change homing order - which file do I edit?
« Reply #1 on: June 29, 2009, 02:56:56 AM »
Go to Operator menu then Edit Button Script, the Ref All will be flashing, click on it then change the order of the code to
DoButton (23)
DoButton (22)
DoButton (24)
DoButton (25)

You will also need to do the same on any other page that has a Ref All button on it if you intend to use the Ref All on that page.
Hood

Offline birdbrain

*
  •  41 41
  • Stupidity, beyond belief!
    • View Profile
Re: Change homing order - which file do I edit?
« Reply #2 on: June 30, 2009, 02:04:18 AM »
Thanks Hood. That should be very easy.
Is it possible to go a bit further with the code so that when the button is pressed the first move is of the Z axis to a known safe height, say 50mm above the table, and then home the  Y, X, Z and A? It would be very useful to make sure that the tool isn't going to hit anything when homing.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Change homing order - which file do I edit?
« Reply #3 on: June 30, 2009, 02:14:37 AM »
Yes you can do that no problem, what you will need to know is the position you want to move the X to in machine coordinates and then just add the following at the start of the macro

Code ("G53G0Z***")
While IsMoving()
Sleep 10
Wend


Just replace the *** in the above example with the actual the machine coordinates position you want to move to, also you may not need the Sleep 10 if you are using a later version of Maach but it wont do any harm either way.
Hood