Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    M92 parameter to indicate microstepping

    Firmware wishlist
    2
    7
    692
    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.
    • wilriker
      wilriker last edited by

      Background

      In my head I usually always calculate steps/mm @x16 microstepping. And usually that is also what I have set for all axes as the effective microstepping factor.

      Now I ran into an issue that took me a while to figure out. Only in recent 2.02RC6 a bug was fixed that would cause a loss of E-steps < 1 microstep instead of accumulating them. The recommended workaround was to set microstepping to a factor so that E-steps/mm would be in the 400-800 range. I added an appropriate command to switch to x128 in my filament's config.g (I am using only one filament at the moment anyway) after I set the steps/mm for this specific filament. I also have a M703 in my start codes.

      When I did the next print it still was at x128 (because I did not add a reset to x16+I in the end code) and then setting the steps/mm again to something around 100 led to the extruder virtually not extruding anything anymore.

      Request

      Add a parameter to M92 that overrides the microstepping-factor the given values apply to, e.g.

      M92 E102.432 U16
      

      This would mean the 102.432 steps/mm are based on x16 microstepping. Or

      M92 Z100 U1
      

      means 100 steps/mm in full steps, etc.
      If the parameter is omitted it will take whatever microstepping-factor is currently set.

      Manuel
      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
      with probably always latest firmware/DWC (incl. betas or self-compiled)
      My Tool Collection

      1 Reply Last reply Reply Quote 0
      • dc42
        dc42 administrators last edited by

        When you send M350, it adjusts the M92 steps/mm automatically to account for the change in microstepping. So we recommend that in config.g any M350 commands come after the M92 commands. That way you can always use the step/mm at x16 microstepping in the M92 commands in config.g.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        wilriker 1 Reply Last reply Reply Quote 0
        • wilriker
          wilriker @dc42 last edited by wilriker

          @dc42 Yes, in /sys/config.g my M92 comes first, then M350. For the extruder I set M92 [...] E100 in config.g because this is what the steps/mm @x16 are supposed to be for this (ungeared) model.

          Now I have checked my steps/mm also for some of my filaments and override the steps/mm in the filament's config.g. Yes, this has some issues for filaments that I have not yet checked in case I change filament without a power-cycle (but I virtually never do that so far).

          As part of the recommendation to change steps/mm for the extruder to be somewhere around 400-800 prior to 2.02RC6 I added M350 E128 to my filament's config.g right after the M92 command that sets the steps/mm for this filament. The first time everything is OK but the second print this will fail.

          Of course I have upgraded to 2.02RC6 and removed the M350 from filament's config.g but still the idea to give M92 a parameter to indicate at which microstepping-factor these values were calculated sparked.

          Manuel
          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
          with probably always latest firmware/DWC (incl. betas or self-compiled)
          My Tool Collection

          1 Reply Last reply Reply Quote 0
          • dc42
            dc42 administrators last edited by

            I'll add this to the firmware wishlist.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            wilriker 1 Reply Last reply Reply Quote 0
            • wilriker
              wilriker @dc42 last edited by

              @dc42 Thanks. 🙂

              Manuel
              Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
              with probably always latest firmware/DWC (incl. betas or self-compiled)
              My Tool Collection

              1 Reply Last reply Reply Quote 0
              • wilriker
                wilriker last edited by

                @dc42 I just created https://github.com/dc42/RepRapFirmware/pull/247 that implements this.

                wilriker created this issue in dc42/RepRapFirmware

                closed Add a parameter Snnn to M92 that indicates the microstepping factor #247

                Manuel
                Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                with probably always latest firmware/DWC (incl. betas or self-compiled)
                My Tool Collection

                dc42 1 Reply Last reply Reply Quote 0
                • dc42
                  dc42 administrators @wilriker last edited by

                  Thanks, I'll review it before next release.

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

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