Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: birdbrain 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?
-
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
-
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.
-
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