Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: shorton on August 08, 2015, 09:26:03 PM
-
I'm a Mach3 beginner. I have a small CNC router I built a year or so ago. My machine is a fixed gantry and my home switches are located in such a way that my table homes to the rear of the machine (min Y) when I execute reference all home. After that, I almost always move the table back to the front of the machine (max Y) to deal with work pieces. That works fine but I wanted to automate that move back to the front after I reference home.
I went to Operator, Edit Button Script and changed the "reference all home" code as follows:
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )
DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)
Code"G0 Y14.7"
It sort of works. But it executes the move to 14.7 first, then does the reference all home. Is there a way I can get that command to happen after the reference all home?
Thanks,
Scott
-
I figured it out. This seems to work:
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )
While (IsMoving())
Wend
code "g53 x1 y14.7"
-
It should be:
While IsMoving()
Wend
You should also have one after
code "g53 x1 y14.7"
Like this:
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )
While IsMoving()
Wend
code "g53 x1 y14.7"
While IsMoving()
Wend
-
Thanks Gerry. I'll correct it. Much appreciated.
-
While I'm at it, what do these do? They have no apparent effect, although I expect they are there for a reason and doing something :)
DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)
-
They zero encoder DRO's I think.
Most people don't need them.