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

    Immediate Step Skipping Correction - closed / assisted open loop

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    3
    7
    159
    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.
    • abraxasundefined
      abraxas
      last edited by

      Where do I find the command to immediately correct for the skipped steps?

      In (say) one in a Million moves my printer looses steps "preferably" in a 3 day print. - Costly, delaying, unreliable and annoying.

      • To prevent that I bought some different closed loop motors. Trying them out I still can not make the PID controlled closed loop perform as well as in open loop. So I am eagerly waiting for the Troubleshooting for the "Duet_3_1HCL_tuning" "Coming Soon!" since months. Maybe that is not coming so soon, as the manual PID tuning is very complex.

      Ok. So what is the EASY WAY? >> Immediate step skipping correction. - not complex and very rewarding.

      As I did not find an immediate step skipping correction command, neither for assisted open loop nor for closed loop I will argue for it.

      What would the algorithm need to do?
      The software already measures steps in assisted open loop or in closed loop. After exceeding a threshold of lost steps a subroutine is started. (maybe only after the lost step move has finished) That subroutine would just retry the last move with the lost steps, ideally from the position, where the steps were lost. Optionally the subroutine tries the move with only half the speeds and accelerations. If the loosing steps happens again in the same move, maybe there is something in the printing path and the print is paused.

      Benefits:
      If the correction works, there is hardly any time, material, reliability and manpower lost. Even the print quality maybe unaffected. The programming effort for the Immediate step correction feature would be way less than for PID tuning and it would still be a good improvement even with a well working PID tuning.

      What do you think?

      jay_s_ukundefined 1 Reply Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk @abraxas
        last edited by

        @abraxas have a look at the events system https://docs.duet3d.com/en/User_manual/RepRapFirmware/Events
        closed loop position issues is handled with that

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

        abraxasundefined 1 Reply Last reply Reply Quote 0
        • abraxasundefined
          abraxas
          last edited by

          This image taken from assisted open loop shows what can happen when skipping steps:

          Assisted_Open_loop_skipped_steps_2.png

          The red arrow indicates, where we would want to be after the move.

          1 Reply Last reply Reply Quote 0
          • abraxasundefined
            abraxas @jay_s_uk
            last edited by abraxas

            @jay_s_uk ok thank you 😉

            The problem after skipping steps is: The triggered driver-warning reacts like this: "Inform user via console and continue" In this form:

            Warning: Driver 112.0 warning: position tolerance exceeded

            And it just prints on, with lost steps in wrong position, ruining the part. But it does not call a macro like "correct_lost_steps.g" or "retry_last_move_from_lost_step_position.g" and continue afterwards.

            How do I make the warning call a macro?
            Is there already code examples for the above named macros?

            jay_s_ukundefined 1 Reply Last reply Reply Quote 0
            • jay_s_ukundefined
              jay_s_uk @abraxas
              last edited by

              @abraxas i don't think those macro names are correct.
              I would expect something like driver-error.g or driver-warning.g and then using parameters to have different actions for each driver

              Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

              abraxasundefined 1 Reply Last reply Reply Quote 0
              • abraxasundefined
                abraxas @jay_s_uk
                last edited by

                @jay_s_uk ah, ok fine thanks, I will try using that names, so it seems the name of the warning or error is the name of the .g file that is executed 😉

                dc42undefined 1 Reply Last reply Reply Quote 1
                • dc42undefined
                  dc42 administrators @abraxas
                  last edited by dc42

                  @abraxas in assisted open loop mode the motor is commanded to move and the encoder is used to monitor the movement. As the error between commanded motion and measured motion increases, the firmware will increase current up to the maximum configured in order to increase torque. It also uses the acceleration and velocity feedforward terms to increase motor current in anticipation of needing more when accelerating or moving at high speeds. If steps are lost (which will always be a multiple of 4 full steps) the firmware will not try to recover them. So you should always set the error threshold to less than 4 full steps.

                  In closed loop mode the firmware will keep on trying to achieve the current requested position. So lost steps will only persist for as long as the motor cannot provide sufficient torque to overcome an obstruction, or while is it being commanded to move or accelerate faster than is possible.

                  I hope this clarifies the behaviour for you.

                  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