584,841 active members*
4,264 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1

    Homing Script Gantry Squaring

    Hey guys I recently overhauled an old MultiCAM router with a new controller and am using Mach3. Everything is set up and running great but Im trying to solve an issue with my auto gantry squaring script while homing.

    The issue is that currently X is set up with two steppers at each end of the gantry like a typical setup. When I home X and A home together but only activate off the X switch. Now I went into settings and there is no change if "Home Slave with Master" is selected or not.

    However, when I go to Config->Slave Axis and unslave the A axis, restart Mach3, and run the same homing script again it works as intended and A will correct itself to it's own switch squaring the gantry. I then have to re-slave and restart Mach3 again.

    I'd like to not have to go through that process and it home without having to mess with the slave axis settings.
    I feel like I'm missing something in my script (below). I tried using CoupleSlave commands with no luck (shown in comments in script where). Any help would be appreciated. I have the feeling I need to enable independent A movement somehow.

    Also site won't let me upload XML?

    Code:
            
    ' Ref all home Script
    
    'Home Z
    DoButton( 24 ) 'Z (4)
    While IsMoving
    Sleep(25)
    Wend
    DoOEMButton(135)
    Sleep(500)
    
    'Home Y
    DoButton( 23 ) 'Y (2)
    While IsMoving
    Sleep(25)
    Wend
    Sleep(500)
    DoOEMButton(134)
    Sleep(500)
    
    'Home X and A Together
    RefCombination(9)
    While IsMoving
    Sleep(25)
    Wend
    Sleep(5000)
    
    'Square Gantry Check
    Message "Going into Square Check"
    SquareCheck
    Message "Done"
    
    Sub SquareCheck()
    
    If IsActive(XHome) Then
    	Message "X Active If 1"
    	If IsActive(AHome) Then
    		DoOEMButton(133)
    		Message "Gantry Already Square 1"
    		Exit Sub
    	End If
    	
    	Message "X Home, Homing A"
    	DoOEMButton(357)
    	' I TRIED CoupleSlave(0) COMMAND HERE WITH NO SUCCESS
    	Sleep(500)
    	DoButton(25)
    	Message "Squared A"
    	DoOEMButton(358)
    	' ReCouple CoupleSlave(1)
    	DoOEMButton(133)
    	Sleep(500)
    	Exit Sub
    End If
    
    If IsActive(AHome) Then
    	If IsActive(XHome) Then
    		DoOEMButton(133)
    		Message "Gantry Already Square 2"
    		Exit Sub
    	End If
    	Message "A Home, Homing X"
    	DoOEMButton(357)
    	'CoupleSlave(0)
    	Sleep(500)
    	DoButton(22)
    	Message "Squared X"
    	DoOEMButton(358)
    	'CoupleSlave(1)
    	DoOEMButton(133)
    	Sleep(500)
    	Exit Sub
    End If
    Exit Sub
    End Sub
    Using an XHC USB Mach3 Motion Control Card Mk4 (link)

  2. #2
    Join Date
    Mar 2003
    Posts
    35538

    Re: Homing Script Gantry Squaring

    The issue is most like due to your XHC controller.
    Most chinese Mach3 controllers have a lot of issues with homing and probing.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  3. #3

    Re: Homing Script Gantry Squaring

    Hey Ger,

    Thanks for the input, your old posts have been a great help in this projects so far.
    Why is it you think it's the controller if changing settings in Mach3 (unslave, home then reslave) works correctly?

    And what is it that most Chinese controllers are doing wrong that causes issue with homing and probing? I ask because I have designed a couple machines I want to OEM and am testing out this controller among others with this router project and would like to know what to look and test for in the future buying other controllers.

    Thanks!

  4. #4
    Join Date
    Mar 2003
    Posts
    35538

    Re: Homing Script Gantry Squaring

    The controllers actually handle the homing. So it's up to the people writing the plugin to get it to work correctly.

    I don't know why they don't work with homing.
    As far as probing, most dont support the GetVAR command, which is used to get the probed position.

    I wouldn't recommend any chinese controllers.
    And at this point in time, I wouldn't recommend Mach3 either, as it's been obsolete (imo), and unsupported, for several years now.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

Similar Threads

  1. Dual Drive Homing and Squaring Script.
    By Greg_Gurden in forum Machines running Mach Software
    Replies: 9
    Last Post: 05-16-2020, 03:10 PM
  2. Squaring the x axis gantry
    By Kris-K2 in forum Commercial CNC Wood Routers
    Replies: 3
    Last Post: 11-26-2017, 01:36 PM
  3. g-code homing script
    By lunchtrayrider in forum G-Code Programing
    Replies: 1
    Last Post: 02-20-2011, 04:04 AM
  4. Squaring the gantry
    By bradbergemann in forum Excitech routers
    Replies: 6
    Last Post: 01-07-2010, 02:31 PM
  5. Z homing script?
    By antonzedd in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 12-09-2009, 04:16 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •