Endstop Not stopping Movement

  • To expand a little bit on what @deckingman said:

    1. In config.g you define all endstops to be at the min positions.
    2. In homex.g you try to home to max position
    3. In homey.g you try to home to min position but instead of going back up after the first hit of the endstop you try to go even further down (luckily without S2 so it just won't do anything and there will be effectively no second pass)
    4. In homez.g you first lift Z 5mm (unnecessary) and then go to min position but only once - also setting Z to 0 with G92 Z0 is superfluous
    5. In homeall.g you try to home X and Y to max (twice) and Z to min (again once plus unnecessary G92 Z0)

    I guess there is a bit of fixing required. 😉

  • ok thanks guys for the help. Is there a sample config I can use to get running? I am running a D-Bot that was all dialed in before the update. Is is there some changes I can make to my old config file to get it working in the new 1.20?

  • @sharpie said in Endstop Not stopping Movement:

    ok thanks guys for the help. Is there a sample config I can use to get running? I am running a D-Bot that was all dialed in before the update. Is is there some changes I can make to my old config file to get it working in the new 1.20?

    As per my post above.

    Take your old 1.18 config.g and reverse the Y motor direction. Assuming you haven't re-mapped any motors, then the X motor will be 0 and the Y motor will be 1. So you'll have something like M569 P1 S1 and you'll need to change it to M569 P1 S0. Obviously, if it was S0 then you'll need to change it to S1. That'll take care of the CoreXY motor direction change which was introduced in 1.19.

    Then add M564 H0 anywhere to config.g and that will take care of the axes not being able to move until they have been homed which was introduced in 1.20 (or thereabouts).

    That should be all you need to do I think, but read the release notes that I linked to to make sure. If you make those changes, then you don't need to make any changes to the homing files and what you had originally should work (I think - but check the release notes to be sure).

    Alternatively, leave out the M564 H0 from config.g but add S2 to the Z moves in your original (working) homex and homey but don't change anything else.

  • Totally didn't think of the core xy change! Good catch @deckingman

  • ok I made the changes, but I still get the problem when the endstop is hit the machine does NOT stop. Is there something I can put in to stop the machine.

  • What kind of endstops are you using?

    When you test them by hand to they show as triggered?


  • I have these endstops and they show as triggered in the screen when I press them by hand but it takes a few seconds to register. Is that normal?

  • Those are makerbot style endstops which are active high. It looks like you have them set up correctly in your config.g

    ; Endstops
    M574 X1 Y2 Z1 S0                                   ; Set active high endstops

    Double check the instructions here. I had to swap the wires on mine.


  • I have not changed any wiring from 1.18 to 1.20 they has been only software. I have noticed though that when Homing X only 1 stepper motor moves and with my Core XY config dont both have to move?

  • The only changes to corexy are mentioned above. So if you've double checked wiring and adjusted for the changes mentioned and the motor tests move as expected and the endstops trigger properly by hand I'm not sure what else to say.

    You say the endstop seems to have a delay in the DWC. Does the led on the duet itself also have a delay? Does the led on the endstop have a delay?

  • Would you suggest me going back down to 1.18?

  • For troubleshooting, sure give it a shot.

    Remember to take into account any changes you've made during the upgrade. Ideally you have a backup of your configs from before?

  • So I dont have a backup of my config =(, but I am still when I send move commands it works as intended but when I Home only one of my 2 steppers move. I ran through the RepRap config file generator again and it gave me the same settings so I am not sure what to change.

    Is there a setting that makes it not move both steppers as needed for CoreXY or does my machine think its in Cartesian mode when it Homes?

  • Is your config the same as your first post?

  • So if you command a Y or X movement in the DWC it will move correctly?

    It's just homex.g that doesn't move properly? or do you mean the endstop doesn't trigger properly?

  • When I send a move command the machine moves correctly the issue is that when I issue a Home command on either X or Y that only one Stepper moves and does not stop when the end stop is triggered.

  • I see your problem.

    ; homex.g
    ; called to home the X axis
    ; generated by RepRapFirmware Configuration Tool on Tue Sep 04 2018 19:39:36 GMT-0700 (Pacific Daylight Time)
    G91              ; relative positioning
    G1 Z5 F6000 S2   ; lift Z relative to current position
    G1 S2 X-305 F1800 ; move quickly to X axis endstop and stop there (first pass)
    G1 X-5 F6000     ; go back a few mm
    G1 S2 X-305 F360  ; move slowly to X axis endstop once more (second pass)
    G1 Z-5 F6000 S2  ; lower Z again
    G90              ; absolute positioning

    Your X moves to seek the endstop need to be S1, not S2. HomeY and homeall are ok. See if that solves the problem.

  • ok So I went and and made the changes and it did not do what I thought it would so I re-Tested my Direction settings

    <code>; Machine configuration
    M569 P0 S1 ; Drive 0 goes forwards (change to S0 to reverse it) X-Axis
    M569 P1 S1 ; Drive 1 goes forwards Y-Axis
    M569 P2 S0 ; Drive 2 goes forwards Z-Axis
    M569 P3 R-1 ; Drive 3 goes forwards
    M569 P4 S1 ; Drive 4 goes forwards<\code>

    now when I test and change my P0 from "S1" my X-axis moves to "S0" my Y-Axis moves

    I feel like I am loosing it. Is there a working config I can just buy from someone?

  • I think you misunderstood me. The S2 and S1 I was referring to are in your homex.g.

    G1 S2 lets you move an axis that isn't homed. G1 S1 moves until an endstop is hit.

    The motor direction settings in M569 will depend on how you have the motor wired, so there's no one config that will work unless the phases of the motors are also wired the same. But that's why there is the movement test for Core XY to verify that the motors are turning correctly. I think you verified they were?

Log in to reply