Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: fixittt on May 26, 2020, 11:38:13 PM

Title: Homing double touch the home switch
Post by: fixittt on May 26, 2020, 11:38:13 PM
So, I have been using mach3 for a LONNNGGGGG time.
Now I am trying to get the homing routine a little more accurate.
What I have now is I click home all or home+probe on my screenset
The button editor says DoButton (24)  DoButton (23) DoButton (22) 
when I click home all it goes and touches the home switch, then reverses and stops.

What I would like to happen is it bounces off the switch, then move the axis 1mm away and repeats the process at 20mm per minute.

I cannot find the DoButton script.  Or How do I edit the button?

I appriciate the help, I do not know much about VB editing, but I am learning more and more.

Thanks
Title: Re: Homing double touch the home switch
Post by: ZASto on May 27, 2020, 04:13:38 AM
DoButton is not a script.
To edit button, go to: Operator -> Edit Button Script, then click on your REF ALL HOME button.
Title: Re: Homing double touch the home switch
Post by: fixittt on May 27, 2020, 10:54:04 AM
The button editor says DoButton (24)  DoButton (23) DoButton (22) 
This is what i get when I do that.
Title: Re: Homing double touch the home switch
Post by: ZASto on May 27, 2020, 01:35:33 PM
The button editor says DoButton (24)  DoButton (23) DoButton (22) 
This is what i get when I do that.
And you an write code in the opened window.
DoButton (24) homes Z Axis,
DoButton (23) homes Y Axis,
DoButton (22) homes X Axis.

Try to find "Mach3 V3.x Programmer Reference Draft v0.11a.pdf"
It exists somewhere on this forum as an attachment.
Title: Re: Homing double touch the home switch
Post by: Tweakie.CNC on May 28, 2020, 01:08:56 AM
The 'Mach3 Programmers Reference Draft v0.11a.pdf' mentioned by ZASto can be downloaded from here; https://www.machsupport.com/forum/index.php?action=dlattach;topic=12740.0;attach=17815

Tweakie.
Title: Re: Homing double touch the home switch
Post by: fixittt on June 09, 2020, 01:25:50 PM
I am still fighting this as I do not know VB at all.

I was able to edit my tool probe script by typing in simple G code commands but this is now working for me. 
Can anybody dumb this down for me?
I have tried going to the button script editor and doing a
DoButton (24)
code(g91)
Code(g0z-1)
While Ismoving()
Wend
DoButton(23)

I did this just to see if I could get the Z to move down after the home.
But when I run it from the script editor window I get Compile error Script Error
Title: Re: Homing double touch the home switch
Post by: fixittt on June 09, 2020, 02:18:47 PM
Well I am gaining on this issue.  I am able to edit the button script for home all on my installed screenset.
I found a script on the forum that helped me, I edited all 3 axis calls  like this.  This is for the Z axis.
SetParam ("XRefPer",40)
DoOEMButton (1022)  'home at 40%
While IsMoving()
Wend
Code "G53 X-2"  'move off switch 2mm
While IsMoving()
Wend
SetParam ("XRefPer",5)
Sleep 200
DoOEMButton (1022)  'home at 5%
While IsMoving()
Wend
SetParam ("XRefPer",100)
End Sub   
Now I do not know how to get into the screen set and edit the individual home buttons.  They do not flash when I go into Operator>Edit Button Scripts

Title: Re: Homing double touch the home switch
Post by: Tweakie.CNC on June 10, 2020, 01:04:14 AM
Quote
Now I do not know how to get into the screen set and edit the individual home buttons.  They do not flash when I go into Operator>Edit Button Scripts

You need to use a Screen Designer (such as Klaus's Screen) https://www.machsupport.com/downloads-updates/screensets/
to change the buttons to VB buttons before you can enter your VB scripts.

Tweakie.