Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: budman68 on November 30, 2008, 05:46:12 PM
-
Just a quick question for you fellas. When I ref all home my machine, and the machine moves back off the switches, it's still "touching" the switches even though the microswitch button has released.
I found the code through a search that would allow me to move off the switches completely, for example:
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )
Code"G53 G00 X.2 Y.3 Z-.1"
But what do I need in the script to make the DRO's to Zero again after it's off the switches?
Thanks,
Dave
-
I am not sure you can but why would you want to do this? maybe if I can understand why I may see a way to do it.
Hood
-
When I'm ready to shut down the machine, I'd like to be able to just hit ref all home and after it homes, I'd like to have it move off the switches completely.
Thanks,
Dave
-
Sorry still dont follow, does your G53 not do that? I realise it wont zero your DROs at that position but it shouldnt do so either as machine zero should only be set by your switches (if enabled) I guess I am wondering why you want the DROs to zero other than where they should. You could probably set a home off distance to zero the DROs at this offset position but it would screw with softlimits I think and you would have to disable them each time you referenced the machine.
Hood
-
Set your home offsets to something like -1, then do a goto zero after homing.
-
Ya know, the more I'm thinking about this, you're right, I shouldn't be messing with the home positioning at all. I should just make a button to move the tables off the switches completely after it homes and be done with it. I just wanted to keep the tension of the home switch levers when the machine is off, that's all, no big deal.
Thanks for letting me waste your time, fellas - :D Just a reminder that I'm still very much a newb ....... :P
Dave
-
You can move off the switches if you require, I think your G53 G0 should do that but if not then a G28 would, you then set the position you want on the homing and limits page.
Oh BTW not sure if you need () round your code now but safest to do that so your above example would be
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )
Code("G53 G00 X.2 Y.3 Z-.1")
Hood
-
Thanks, Hood, didn't know about the () as I copied that code from Brian B. ahile back in another post of his.
Dave-
-
Dave, not sure if its needed now or not, I know previously it wasnt but I know I do it now for all code or messages but cant say why ;D
Hood
-
If you want the homing sequence to leave the G53 zero a little off the home switches this is how I would do it.
Say you wanted each axis to finish homing 10mm off the switch but still be at G53 zero
Set "Home Off" at -10 in "Homing and Limits" on each axis
Use this as homing script.
DoOEMButton ( 1024 )
Code "G53 G00 Z0"
DoOEMButton ( 1023 )
Code "G53 G00 Y0"
DoOEMButton ( 1022 )
Code "G53 G00 X0"
DoOEMButton ( 1025 )
Do the same for the A axis if needed.
This will home, leaving the axis 10 mm off the switch and move on to the next axis etc.
Greg
-
Thanks so much, Greg - :)
Dave