Jump to content

acceleration in Marlin


Dim3nsioneer

Recommended Posts

Posted · acceleration in Marlin

This is a question for the Marlin experts:

Is it possible that one of you could quickly summarize how Marlin (or Sprinter) is doing the acceleration?

Obviously it doesn't do it separately for each GCODE command line but takes a few code lines together. What are the criteria? When does it accelerate/decelerate and when not?

 

  • Link to post
    Share on other sites

    Posted · acceleration in Marlin

    I've been working on this the last week to get the time estimate of Cura improved (I'm down to 97% accuracy in the estimate)

    Acceleration is planned over 16 moves maximum. What it does it tries to figure out at which speed it should take the intersections, which depends on the changes in speed at that intersection.

    It's quite a bit of code, which has quite some details, it boils down to this:

    https://github.com/Ultimaker/CuraEngine/blob/master/timeEstimate.cpp

     

  • Link to post
    Share on other sites

    Posted · acceleration in Marlin

    I've been working on this the last week to get the time estimate of Cura improved (I'm down to 97% accuracy in the estimate)

    [...]

     

    To have an accurate time estimate in Cura soon, it feels a bit like christmas... :smile:

     

  • Link to post
    Share on other sites

    Posted · acceleration in Marlin

    My quick summary. If "jerk" is zero then it's simple - every line segment would start from a stop, accelerate to max velocity, maintain that velocity as long as possible and then decelerate to 0 at the last possible moment so that it ends the segment with a deceleration ramp. But in practice it doesn't come to a complete stop at each segment so it's similar but starting at a particular velocity, ramping up, maintaining max speed (if it gets there) and then decelerating to be at the proper next vertex speed when it gets to that vertex.

    The "jerk" setting is not zero. The jerk setting is not the official definition of jerk but similar. It sets the velocity at the vertexes where any two line segments come together - the idea is that for a circle of 20 line segments the change in angle is minor and you shouldn't have to come to a complete stop 20 times. So it calculates the "delta" velocity vector from one instant before the vertex to one instant afterwards and keeps that delta below the jerk value. So if jerk is 20mm/sec (default i think) and two vertexes are in a straight line you can go unlimited speed from one vertex to the next. If the vertexes are a 90 degree corner then the minimum speed at the vertex will be sqrt(2)*20 or 28mm/sec. The more gradual the change in direction the faster you are allowed to go. The worst case - 180 degree change in direction implies max speed at vertex at 10mm/sec.

    Now you have to calculate all these max speeds 16 segments ahead and work backwards to "now" and figure out what your max speed is along the whole path.

     

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 23 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...