Request: Check for lost steps

  • Hello all! 🙂
    I have a small wish for future versions of the Duet WiFi firmware: Checking for lost steps.
    Let me explain: When I rebuilt and tuned in my Z-axis I sometimes heard the sound of what might be a skipped step of the Z-axis stepper but there was no way to check if the sound came from something mechanical or if it really was a missed step.
    An easy solution would be to implement a function where you rehome an axis (or all) and it tells you how much of a difference there is between the real and the assumed position.
    Please tell me your opinion about this! 🙂

  • Take a look at - maybe this is what you are looking for.

  • Of course I know of stall detection but what I was requesting is a way of detecting lost steps after they were lost and also how many steps were lost.
    Let's say you have something in your print that looks like a small layer shift. You could never really know if it was a lost step or something mechanical like a loose screw somewhere unless you check everything.
    With the feature I'm trying to describe you could in this case just run it and it'll give you the difference between the assumed (and displayed position) and the 'real' position after a rehome.

    I hope I didn't explain it more complicated than it needed to be 😅
    If yes, feel free to ask more questions.

  • I think your request is quite clear. There is no known way to accomplish this without placing encoders on the motors and going what is known as "closed loop". Very complex and expensive.

  • Obviously it isn't clear... 😅
    The feature isn't something that helps during a print, just during setup and troubleshooting.

    I'll try to make up an example:
    Let's say you command your z-axis to move 10 mm. You look at your printer and you'll see the motors running and the bed moving.
    But unless you put a dial indicator or calipers against the bed you'll never know how much it actually moved.
    If your steps/mm are calibrated right then one could assume that your axis moved the right distance and most of the times that is true.
    But let's say you're tuning in your accelerations or maximum speeds (or maybe even the anti-backlash but on your leadscrew which could produce too much friction if too tight): Unless the motor loses a lot of steps and makes horrible noises of you see the print bed stuttering there is no way of knowing if your motors can handle this speed.

    So what you would do now (with my proposed feature):

    1. Press the button "check for lost steps" (or however it will be called)
    2. the axis (in this case the z-axis) will go to its homing switch
    3. If the motor didn't lose any steps the distance to the homing switch is exactly the distance that you can read in your UI (-> the real position and the assumed position did match).
      But if any steps were lost the firmware would read the endstop as triggered before or after the distance that was displayed. The difference in mm times the steps/mm will give you a value for how many steps weren't performed.

    I hope this makes it clear since I don't know how to make it clearer 😅

  • You have this now.

    • Mark position precisely.
    • G91 (relative motion).
    • G0 X100 (or any other single axis, or multi axis, move that you are trying to setup/debug)
    • G0 X-100
    • Did it return to precisely marked position?

    Why not have this as a firmware feature? Because "mark position precisely" is almost always more precise/repeatable than the accuracy/repeatability of most limit switches.

  • administrators

    There is a way to do this on a Cartesian or CoreXY machine, but not automatically at present. The procedure is:

    • Home the axis to an endstop switch. It will set the axis position to the M208 limit for that axis, assuming you don't use a G92 command to add an offset.
    • Do whatever movement you want (perhaps a complete print)
    • Repeat the homing move(s), but instead of using a G1 S1 move, use S3 instead of S1. Instead of setting the axis position to match the M208 limit, it will do the reverse, i.e. change the M208 limit to match the calculated axis position
    • Send M208 to report the new axis limit, and compare it with the original one.


Looks like your connection to Duet3D was lost, please wait while we try to reconnect.