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

    RepRapFirmware 3.01beta1 released

    Scheduled Pinned Locked Moved
    Beta Firmware
    16
    60
    3.4k
    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.
    • dc42undefined
      dc42 administrators @pipersw
      last edited by

      @pipersw said in RepRapFirmware 3.01beta1 released:

      Likewise, default endstop switches are not set up, so you will need to set up X and Y endstops (and Z odf needed) explicity, using one M574 line for each, and specifying the port name. Example: M574 X1 S1 P"xstop".

      To be fair to @chas2706, I have only just added that bit!

      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
      • kraegarundefined
        kraegar
        last edited by kraegar

        Got a macro in testing for iterating on bed leveling, and it's pretty amazing!

        aa87229d-a254-4898-a54d-e6ac8fc5a6ba-image.png

        My initial round had two && in one line, which caused the duet to hard crash and reboot. I switched it to nested if statements, and that worked well. I want to tweak it a bit, but definitely working!

        ( was iterating until initialDeviation was < 0.01 AND deviation was within 0.002 of initialDeviation)

        dc42undefined 1 Reply Last reply Reply Quote 0
        • kraegarundefined
          kraegar
          last edited by

          Cleaned up the output to make it easier to follow. (also changed my leadscrew locations to make it take longer to converge for these tests, so I could troubleshoot easier)

          2139e476-bf1c-49f6-acea-5f88055f8c39-image.png

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

            @kraegar said in RepRapFirmware 3.01beta1 released:

            My initial round had two && in one line, which caused the duet to hard crash and reboot.

            Can you provide that version, so that I can fix it?

            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
            • kraegarundefined
              kraegar
              last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • kraegarundefined
                kraegar
                last edited by kraegar

                Here is the version that works well:

                M561                         ; clear any existing bed transform
                ; If the printer hasn't been homed, home it
                if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed
                  G28
                  
                G1 Z7.5
                
                ;Run initial 4 point leveling routine
                G30 P0 X15 Y45 Z-99999
                G30 P1 X15 Y227.5 Z-99999
                ;G30 P2 X235 Y125 Z-99999 S3
                G30 P2 X235 Y227.5 Z-99999
                G30 P3 X235 Y45 Z-99999 S3
                
                
                
                while true
                  if iterations = 5
                    abort "Too many auto calibration attempts"
                  if move.initialDeviation.deviation < 0.01 
                    if move.calibrationDeviation.deviation < move.initialDeviation.deviation + 0.005
                      if move.calibrationDeviation.deviation > move.initialDeviation.deviation - 0.005
                        break
                  echo "Repeating calibration because initial deviation (" ^ move.initialDeviation.deviation ^ "mm) must be < 0.01"
                  echo "and (" ^ move.calibrationDeviation.deviation ^ "mm) must be within 0.005 of initialDeviation"
                
                  G30 P0 X15 Y45 Z-99999
                  G30 P1 X15 Y227.5 Z-99999
                  ;G30 P2 X235 Y125 Z-99999 S3
                  G30 P2 X235 Y227.5 Z-99999
                  G30 P3 X235 Y45 Z-99999 S3
                
                echo "Auto calibration successful, deviation", move.calibrationDeviation.deviation ^ "mm"
                echo "Auto calibration successful, initialDeviation", move.initialDeviation.deviation ^ "mm"  
                    
                G28 Z
                
                G1 X0 Y0 F24000               ; move the head to the corner (optional)
                

                And removing the nested if's to replace with && crash it

                  if move.initialDeviation.deviation < 0.01 && move.calibrationDeviation.deviation < move.initialDeviation.deviation + 0.005 && move.calibrationDeviation.deviation > move.initialDeviation.deviation - 0.005
                        break
                

                Edit: I realize I could just have some major syntax issues, still figuring this out. But that's a hard crash if you do that 🙂

                dc42undefined garyd9undefined 2 Replies Last reply Reply Quote 0
                • carlossprundefined
                  carlosspr @carlosspr
                  last edited by

                  @carlosspr Solved. I was missing M584 drive mapping on config.g

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

                    @kraegar said in RepRapFirmware 3.01beta1 released:

                    And removing the nested if's to replace with && crash it

                    Thanks, I've reproduced the crash by adding that line to my own script. I will look into it. Even if you do make a syntax error, you should get a helpful error message.

                    PS - now I know that the new crash handler I added for uncaught exceptions works!

                    Last software reset at 2020-01-15 16:35, reason: Terminate called, spinning module GCodes, available RAM 9464 bytes (slot 2)

                    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 1
                    • kraegarundefined
                      kraegar
                      last edited by

                      Trying to test if move.initialDeviation.deviation is 0.000

                      if move.initialDeviation.deviation != 0
                        echo "one " ^ move.initialDeviation.deviation
                      

                      83c9cb72-03ae-4e80-91d3-58941a2c06fd-image.png

                      I've tried using 0.000 as well, with the same result. == 0.000 or == 0 doesn't match, even though it is.

                      (I'm trying to determine if leveling has been run at all yet, my only clear method for now is to see if initial and calirbated deviation and mean are all 0.000)

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

                        Just done some tests. There is a problem with equality between floats.

                        The other problem you had is because the GCode line was too long. I changed it to throw an exception when that happens, but the exception isn't caught.

                        This is all very new code, so I was expecting some bugs.

                        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
                        • kraegarundefined
                          kraegar
                          last edited by

                          Yep, I'm just playing, happy to just keep reporting. Variables will clean the code up a lot, but that's a big ask 🙂

                          1 Reply Last reply Reply Quote 0
                          • kraegarundefined
                            kraegar
                            last edited by

                            Once variables are implemented, if they're "system wide" and not constrained to the macro they're called in, I would set a "is_level = false" in config.g, and set to true once leveling is run. Negating the need for this method of checking.

                            But I can't resist playing 🙂

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

                              Thanks for your reports. These two issues are now fixed in the latest builds at https://www.dropbox.com/sh/3azy1njy3ayjsbp/AACquxr2m00eV568RZg5QG5wa?dl=0.

                              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 1
                              • kraegarundefined
                                kraegar
                                last edited by

                                Can I just say, HUGE thank you!
                                I've already made a script to tune PA, Temp, and Extrusion % (just call the macros via layer change) as well as the auto-leveling and a "pre-print" systems readiness check.

                                This is amazing!

                                1 Reply Last reply Reply Quote 0
                                • kraegarundefined
                                  kraegar
                                  last edited by

                                  Float comparisons are now working, and the other errors gracefully:

                                  Error: in file macro, line 20 column 1: GCode command too long

                                  Thanks!

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

                                    Thanks for confirming. FWIW, maximum GCode line length excluding leading white space, line number and checksum (if present) and comments is currently 160 characters.

                                    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

                                    DIY-O-Sphereundefined gtj0undefined 2 Replies Last reply Reply Quote 1
                                    • kraegarundefined
                                      kraegar
                                      last edited by

                                      We're going to need line numbers in the file editor in DWC now 🙂

                                      1 Reply Last reply Reply Quote 0
                                      • 4latheundefined
                                        4lathe
                                        last edited by

                                        Can I use that new duet2combinedfirmware.bin on my maestro? The 3.01 was duetmaestrofirmware.bin.

                                        DIY-O-Sphereundefined 1 Reply Last reply Reply Quote 0
                                        • DIY-O-Sphereundefined
                                          DIY-O-Sphere @4lathe
                                          last edited by

                                          @4lathe
                                          It's still DuetMaestroFirmware.bin

                                          (UTC+1)

                                          1 Reply Last reply Reply Quote 1
                                          • DIY-O-Sphereundefined
                                            DIY-O-Sphere @dc42
                                            last edited by DIY-O-Sphere

                                            @dc42
                                            Hi David, maybe I have found a bug....
                                            For testing I was back on 2.05 on a Maestro (DWC 2.06) and I was not able to get back directly to 3.01b.
                                            Flashing 3.0 stable worked.

                                            (UTC+1)

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