Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: Steambuilder on July 17, 2012, 05:20:15 PM
-
I am a new newb to Mach and am trying to add a button to the Manual and Automatic screens of Mach3Turn. I would like this button to Ref All Home with Z first, then X. This would save having to click the Set Home Z button and then the Set Home X. I have the button placed on the screens but am totally lost from there. I have attached a .lset file of what I have so far. Any help would be greatly appreciated. Thanks
Doug
-
What you want to do is have the button set as a VB button, you need to do that in the screen editor you use. Once done then you can open in Mach and edit the button by going to the Operator menu then Edit Button Script. The button will be flashing, click it and the editor will open.
What script you have will depend whether your switches share an input or not but either way the safest would be
Do OemButton(1024)
While IsMoving()
Wend
Do OemButton(1022)
While IsMoving()
Wend
-
Thanks for the reply, Hood. Using Screen4, I got the button set as a VB button then added the script that you listed above but I get a script error. I forgot to mention that I am also using my homing switches as limit switches. Do I have to enter more data into the script to make it work?
-
My apologies, there shouldnt be a space between the Do and the OemButton, so it should be
DoOemButton(1024)
While IsMoving()
Wend
DoOemButton(1022)
While IsMoving()
Wend
-
Thanks for the fast reply! That fixed the problem. Thanks for your excellent help. I'm glad there are guys like you out there to help a greenhorn.
Thanks
Doug
-
We were all greenhorns at one time and to be honest the only people not learning new stuff each day are 6ft under ;)
Hood