Homing Script Gantry Squaring


Results 1 to 4 of 4

Thread: Homing Script Gantry Squaring

  1. #1
    Activation process ineffable77's Avatar
    Join Date
    Jan 2019
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default 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)

    Similar Threads:


  2. #2
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default 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
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

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


  3. #3
    Activation process ineffable77's Avatar
    Join Date
    Jan 2019
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default 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
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default 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
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

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


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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Homing Script Gantry Squaring

Homing Script Gantry Squaring