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

A website estimates print time accurately from speed/acceleration/jerk

Scheduled Pinned Locked Moved
General Discussion
13
31
5.2k
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.
  • undefined
    Shen
    last edited by 30 May 2017, 03:23

    I've made a web tool (http://www.gcodeanalyser.com) to analyze gcode files, and report statistic about the file. The program estimates print time with max speed, acceleration and jerk taking into account, so it's quite accurate. It also reports many other information as well. I think this tool might help you find a balance between speed and quality. I'm very new to web development, so the code is not yet polished under the hood, but I will be optimizing the code and adding new features as a way to learn web development. Let me know what's the estimated print time vs actual print time for you.

    1 Reply Last reply Reply Quote 0
    • undefined
      percar
      last edited by 31 May 2017, 00:48

      Looks good I'm going to try it out and compare

      1 Reply Last reply Reply Quote 0
      • undefined
        Whitewolf
        last edited by 31 May 2017, 01:45

        You should fork the duet web control panel and add this as a tab under the print screen then submit a pull request to have it added into the official release.

        Exploring the universe wherever the tech blows

        1 Reply Last reply Reply Quote 0
        • undefined
          Shen
          last edited by 31 May 2017, 02:35

          @Whitewolf:

          You should fork the duet web control panel and add this as a tab under the print screen then submit a pull request to have it added into the official release.

          Good idea, but I need to clean up the code first, it's currently a little too messy.

          1 Reply Last reply Reply Quote 0
          • undefined
            Jackal
            last edited by 31 May 2017, 04:24

            That's a nice tool, have you tried comparing it with Duet simulation mode times?
            https://duet3d.com/wiki/G-code#M37:_Simulation_mode
            I used it before and it gave accurate time (since it actually run all the code without moving the motors), but it takes quite a while.
            Hope your online tool is faster

            1 Reply Last reply Reply Quote 0
            • undefined
              Shen
              last edited by 31 May 2017, 05:50

              @Jackal:

              That's a nice tool, have you tried comparing it with Duet simulation mode times?
              https://duet3d.com/wiki/G-code#M37:_Simulation_mode
              I used it before and it gave accurate time (since it actually run all the code without moving the motors), but it takes quite a while.
              Hope your online tool is faster

              Thanks for letting me know, I wasn't aware of that command before. I made comparison, with the same gcode and settings, my duet wifi reports 1 hour 56 minutes, and my website reports 1 hour 55 minutes. It took at least a minute on the duet wifi, but only 1 second with my website.

              1 Reply Last reply Reply Quote 0
              • undefined
                tomasf
                last edited by 31 May 2017, 11:25

                Nice! Does this work properly with a delta, where the drives do not correspond directly to axes?
                I got 8 hours 4 minutes for something that actually took something like 8 hours 30 minutes, which is much better than Simplify3D's estimates.
                Having this integrated into the DWC (mainly to fill in the speeds automatically) would be nice.

                1 Reply Last reply Reply Quote 0
                • undefined
                  kelchm
                  last edited by 31 May 2017, 19:01

                  I've been meaning to ask – why are the units for jerk expressed in mm/s? Shouldn't it be mm/s^3?

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    Shen
                    last edited by 31 May 2017, 19:36

                    @tomasf:

                    Nice! Does this work properly with a delta, where the drives do not correspond directly to axes?
                    I got 8 hours 4 minutes for something that actually took something like 8 hours 30 minutes, which is much better than Simplify3D's estimates.
                    Having this integrated into the DWC (mainly to fill in the speeds automatically) would be nice.

                    It should work for delta, since the x,y,z acceleration/jerk do not correspond directly to the axis as well.

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      Shen
                      last edited by 31 May 2017, 19:41

                      @kelchm:

                      I've been meaning to ask – why are the units for jerk expressed in mm/s? Shouldn't it be mm/s^3?

                      Jerk in 3D printing does not refer to the same thing as in physics. In 3D printing jerk is the maximum allowed instant speed change. With higher jerk values you can take sharper turns without slowing down.

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        chrishamm administrators
                        last edited by 1 Jun 2017, 09:50

                        This looks really nice! Would you mind if I integrate your analyser in a future web interface version? I think the firmware already provides most of the required values, so that would allow further automatisation. I'd have to redistribute your work under the terms of the GPLv3 though.

                        Duet software engineer

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          Whitewolf
                          last edited by 1 Jun 2017, 15:20

                          @chrishamm:

                          This looks really nice! Would you mind if I integrate your analyser in a future web interface version? I think the firmware already provides most of the required values, so that would allow further automatisation. I'd have to redistribute your work under the terms of the GPLv3 though.

                          He already agreed to do so:

                          https://www.duet3d.com/forum/thread.php?pid=15574#p15574

                          Exploring the universe wherever the tech blows

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            Shen
                            last edited by 1 Jun 2017, 15:49

                            @chrishamm:

                            This looks really nice! Would you mind if I integrate your analyser in a future web interface version? I think the firmware already provides most of the required values, so that would allow further automatisation. I'd have to redistribute your work under the terms of the GPLv3 though.

                            I wouldn't mind at all, but currently the code quality is not good enough. I just started refactoring the code.

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              lignumaqua
                              last edited by 1 Jun 2017, 15:56

                              Unfortunately this fails for me every time, always with a 'Maximum call stack size exceeded' error. Tried with multiple different gcode files in both Safari and Chrome.

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                Shen
                                last edited by 6 Jan 2017, 16:28 1 Jun 2017, 16:07

                                @lignumaqua:

                                Unfortunately this fails for me every time, always with a 'Maximum call stack size exceeded' error. Tried with multiple different gcode files in both Safari and Chrome.

                                Can you provide the gcode files? I have been updating the JavaScript files, if your browser caches the javascript files and one of the JavaScript file is not up to date, you might see that error.

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  lignumaqua
                                  last edited by 6 Jan 2017, 17:47 1 Jun 2017, 17:44

                                  @Shen:

                                  Can you provide the gcode files? I have been updating the JavaScript files, if your browser caches the javascript files and one of the JavaScript file is not up to date, you might see that error.

                                  I cleared the browser caches, and even tried a completely different browser (Opera this time) but still always get the same error I'm afraid. Line 509 and line 420 of the js look to be recursive in some way: [c]calculateTimeByAcceleration(gcode.nextMovementGcode);[/c]

                                  Here's a sample gcode file https://www.dropbox.com/s/1eyzuovyeoioe0f/ipadmount.gcode?dl=0

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    Shen
                                    last edited by 1 Jun 2017, 18:14

                                    The problem is this line in your gcode:
                                    "G1 S1 X50 Y50 F5000: FRONT LEFT TO HEAT UP"
                                    You used a colon instead of a semi colon. It's a part of your starting gcode that's why none of your file works. I should have used some kind of gcode error handling, but I haven't got a change to work on it yet.

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      lignumaqua
                                      last edited by 1 Jun 2017, 18:52

                                      @Shen:

                                      The problem is this line in your gcode:
                                      "G1 S1 X50 Y50 F5000: FRONT LEFT TO HEAT UP"
                                      You used a colon instead of a semi colon. It's a part of your starting gcode that's why none of your file works. I should have used some kind of gcode error handling, but I haven't got a change to work on it yet.

                                      Well, so I did. Doh! Thank you for spotting that. Page works as expected now. (As you knew it would. :- ) )

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        Shen
                                        last edited by 1 Jun 2017, 19:03

                                        @lignumaqua:

                                        @Shen:

                                        The problem is this line in your gcode:
                                        "G1 S1 X50 Y50 F5000: FRONT LEFT TO HEAT UP"
                                        You used a colon instead of a semi colon. It's a part of your starting gcode that's why none of your file works. I should have used some kind of gcode error handling, but I haven't got a change to work on it yet.

                                        Well, so I did. Doh! Thank you for spotting that. Page works as expected now. (As you knew it would. :- ) )

                                        No problem, I just added some simple error handling code that would prevent problems like that.

                                        1 Reply Last reply Reply Quote 0
                                        • undefined
                                          lignumaqua
                                          last edited by 3 Jun 2017, 21:05

                                          Shen - ran another test today. Your app predicted a print time of 2 hours and 10 seconds. Actual time taken was 2 hours and 14 seconds. Pretty darn good! 🙂

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