Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Homing and Axis issues

    Scheduled Pinned Locked Moved
    CNC
    2
    2
    38
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • daniel.armstrongundefined
      daniel.armstrong
      last edited by

      Hi all,

      Im in the process of of upgrading my CNC (workbee) and have experienced an issue when i have moved the locations of my endstops. They are now situated bottom left of the machine, previously top right. I have x and y homing to bottom left but the machine sees them as at axis max. When i move the machine after homing im required to use negative values. if i reverse the motors to give positive values the machine homes away from the endstops, how can i fix this?

      M574 X0 P"xstop" ; Set active high X endstop
      M574 Y0 P"ystop" ; Set active high Y endstop
      M574 Z1 P"zstop" ; Set active high Z endstop

      M208 X0 Y0 Z0 S1 ; Set axis minima
      M208 X740 Y775 Z125 ; Set axis maxima

      M569 P0 S0 ; Drive 0 goes forwards
      M569 P1 S0 ; Drive 1 goes forwards
      M569 P2 S1 ; Drive 2 goes forwards
      M569 P3 S0 ; Drive 3 goes forwards

      HOMEALL.G
      G91 ; relative positioning
      G21 ; Set units to mm
      G1 H1 Z{move.axes[2].max2} F900 ; move quickly to Z axis endstop and stop there (first pass)
      G1 H1 X{move.axes[0].max
      2} F2400 ; move quickly to X axis endstops and stop there (first pass)
      G1 H1 Y{move.axes[1].max2} F2400 ; move quickly to Y axis endstops and stop there (first pass)
      G92 X{move.axes[0].max} Y{move.axes[1].max} Z{move.axes[2].max} ; Set Home Position
      G1 X-3 Y-3 Z-3 F2400 ; go back a few mm
      G1 H1 X{move.axes[0].max
      2} F300 ; move slowly to X axis endstops once more (second pass)
      G1 H1 Y{move.axes[1].max2} F300 ; move slowly to Y axis endstops once more (second pass)
      G1 H1 Z{move.axes[2].max
      2} F300 ; move slowly to Z axis endstop once more (second pass)
      G92 X{move.axes[0].max} Y{move.axes[1].max} Z{move.axes[2].max} ; Set Home Position
      G90 ; absolute positioning

      sebkritikelundefined 1 Reply Last reply Reply Quote 0
      • sebkritikelundefined
        sebkritikel @daniel.armstrong
        last edited by

        @daniel-armstrong When I imagine bottom left, if I'm standing in front of the machine, I'm thinking of the X limit switch on my left, and the Y limit switch closest to me. If this is correct, then both X and Y are homing to the low side.

        @daniel-armstrong said in Homing and Axis issues:

        M574 X0 P"xstop" ; Set active high X endstop
        M574 Y0 P"ystop" ; Set active high Y endstop
        M574 Z1 P"zstop" ; Set active high Z endstop

        Why X0 and Y0 above? If you intend to have them on the low side of each axis, it should be X1 and Y1.
        https://docs.duet3d.com/User_manual/Reference/Gcodes/M574 . I would also recomend setting the S flag as well (unsure if there is a default). Sounds like they should be:

        M574 X1 P"xstop" S1  ; X axis homes low side, active high
        M574 Y1 P"ystop" S1  ; Y axis homes low side, active high
        M574 Z1 P"zstop" S1  ; Z axis homes low side, active high
        

        Unsure on Z, reused what you had.

        What I'm imaging based on "bottom left", is this isn't correct, let me know!
        7e3b41ed-c98f-4b65-ac6c-05fe5ff95aae-image.png

        If my thoughts above are correct, then in homeall.g you appear to be moving X and Y in the wrong direction. Again, check my notes above for Z. Some questions:

        1. I see move.axes[0].max2, move.axes[1].max2, move.axes[2].max2 ... is the max2 right? Later you use move.axes[0].max, but I'm not familiar with a max2 in the object model (I'm also not particularly well versed in CNC mode)
        2. You're using H1 mode for your homing moves, which is good. I think then that the G92 command is redundant, as H1 is setting position to the limit defined in M208.

        Large(ish?) IDEX - 6HC, 1HCL
        Stratasys Dimension 1200es to 6HC Conversion

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Unless otherwise noted, all forum content is licensed under CC-BY-SA