Welcome to Our Community

Some features disabled for guests. Register Today.

Trouble with XYYZ Auto-Squaring on CNC.JS

Discussion in 'CNC Mills/Routers' started by Paul Mitchener, Nov 17, 2021.

  1. Paul Mitchener

    Builder

    Joined:
    Sep 9, 2021
    Messages:
    14
    Likes Received:
    2
    Hi All,

    I'm a Noob here. Just fired up my Lead 1510 machine and I am tweaking my homing positions etc.

    I am using the latest version of CNC.JS along with an XPro V5 controller. I have 4 limit switches on the machine. X,Y, Y & Z.

    The machine is homing on the X, Z and one of the Y limit switches no problem at all. How do I get it to auto square and home on the second Y limit switch?

    Below is my initialising Macro for CNC.JS

    $Homing/Cycle0=Z
    $Homing/Cycle1=XY
    $Stepper/Pulse=5
    $Stepper/IdleTime=255
    $Stepper/DirInvert=X
    $Stepper/EnableInvert=Off
    $Limits/Invert=On
    $Probe/Invert=Off
    $Report/Status=1
    $Limits/Hard=On
    $Homing/Enable=On
    $Homing/DirInvert=XY
    $Homing/Feed=100.000
    $Homing/Seek=1000.000
    $Homing/Pulloff=10.000
    $X/StepsPerMm=200.000
    $Y/StepsPerMm=200.000
    $Z/StepsPerMm=200.000
    $A/StepsPerMm=200.000
    $X/MaxRate=3000.000
    $Y/MaxRate=3000.000
    $Z/MaxRate=2500.000
    $A/MaxRate=3000.000
    $X/Acceleration=150.000
    $Y/Acceleration=150.000
    $Z/Acceleration=150.000
    $A/Acceleration=150.000
    $X/MaxTravel=1250.00
    $Y/MaxTravel=810.00
    $Z/MaxTravel=210.00
    $A/MaxTravel=810.00
    $X/Current/Run=1.950
    $Y/Current/Run=1.950
    $Z/Current/Run=1.950
    $A/Current/Run=1.950
    $X/Current/Hold=1.250
    $Y/Current/Hold=1.250
    $Z/Current/Hold=1.250
    $A/Current/Hold=1.250
    $X/Microsteps=8
    $Y/Microsteps=8
    $Z/Microsteps=8
    $A/Microsteps=8
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    13,997
    Likes Received:
    4,109
    Would be good to check in with the board or machine vendor for support, directly.
     
    sharmstr likes this.
  3. that-jim

    that-jim Journeyman
    Builder

    Joined:
    Apr 19, 2020
    Messages:
    143
    Likes Received:
    149
  4. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,695
    Likes Received:
    1,326
    For what it's worth I had to adjust the alignment of my Y axes twice in over three years - once when a stepper cable broke and one Y motor went bananas, and once when I stupidly crashed the X C-beam into a cramp. If you are running your machine within it's capabilities the Y axes going out of alignment is a sign that something is wrong that needs fixing.
    Alex.
     
    Peter Van Der Walt likes this.
  5. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    13,997
    Likes Received:
    4,109
    Possibly because there has never been a 'Lead 1510' from any of the official vendors or resellers, thus best to approach the 'vendor' he bought from for support for their product.
     
    Giarc and sharmstr like this.
  6. Paul Mitchener

    Builder

    Joined:
    Sep 9, 2021
    Messages:
    14
    Likes Received:
    2
    Thanks for your help.

    Separate cycles for each axis
    $Homing/Cycle0=Z
    $Homing/Cycle1=X
    $Homing/Cycle2=Y

    and
    $Homing/Squared=Y

    This fixed the homing cycle. Only trouble is my XPro V5 isn't registering the Y2 limit switch. It is a NC limit switch which is showing 24V at the controller and 0V when activated, yet I am net getting Pn:A in the status when it is activated.

    Do I need anything in my initialization script to register this limit switch?
     
  7. that-jim

    that-jim Journeyman
    Builder

    Joined:
    Apr 19, 2020
    Messages:
    143
    Likes Received:
    149
    I do not recall having to set up anything for the switches and I do not have access to that machine.


    I think both switches report Y (not Y2 or A), you could test both Y limits individually to see if this is the case. I recall the grbl_esp32 wiki having more complete documentation about this.
     
  8. Paul Mitchener

    Builder

    Joined:
    Sep 9, 2021
    Messages:
    14
    Likes Received:
    2
    @that-jim thanks for the response. I think I have found the answer on grbl_esp32 wiki. It seems you need to connect both limit switches to the Y limit switch input.

    Trouble is I have NC and I need to wire them in parallel, but when doing so I am getting substantial voltage drop. It must have something to do with the internal resistors. I am getting 12v out the other side and the controller is erroring as it's not within the trigger voltage range.

    I am going to go and pickup so NO sensors and wire them in parallel. This should solve the problem.
     
  9. that-jim

    that-jim Journeyman
    Builder

    Joined:
    Apr 19, 2020
    Messages:
    143
    Likes Received:
    149
    Did you try testing Y and A/Y2 individually to see if they both report Y? Just curious because I think they define two inputs so you can use NC switches.
     
  10. Paul Mitchener

    Builder

    Joined:
    Sep 9, 2021
    Messages:
    14
    Likes Received:
    2
    Hi All,

    Spark Concepts came back to me via their GitHub issues page and gave me the fix. You can enable Y2 by making a couple of tweaks to the src code and re-compiling. Effectively changing the default A limit switch to Y2. - Y2 Limit Switch not registering · Issue #85 · Spark-Concepts/xPro-V5

    Although, now that auto-squaring is working, the trouble is I now have a kernel panic when starting up my spindle using M3. To follow rectification of this issue follow this thread - xPro v5 kernel panic after firmware compile
     
  11. Paul Mitchener

    Builder

    Joined:
    Sep 9, 2021
    Messages:
    14
    Likes Received:
    2

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice