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

    Wouldn't it be easier if we had separate CNC and FDM firmware?

    Scheduled Pinned Locked Moved
    Firmware wishlist
    7
    26
    2.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.
    • A Former User?
      A Former User
      last edited by

      @deckingman said in Wouldn't it be easier if we had separate CNC and FDM firmware?:

      @bearer You misunderstand my point

      Nope, maybe re-read wilriker's response? Its not CNC specific at all, and if the change to M574 had been subject to review before implementation and testing before release you would not have lost a feature, but never received it in the first place.

      And even if a specific G/M code required different behaviour for different modes (like f.ex. laser mode and G0/G1) its almost neither here nor there if its a run-time change or a completely different firmware image - the important part is that the correct places to write conditional code is found, and if not new features from one mode will be able to affect the others regardless of how the the firmware is delivered.

      deckingmanundefined 1 Reply Last reply Reply Quote 0
      • wilrikerundefined
        wilriker @deckingman
        last edited by wilriker

        @deckingman said in Wouldn't it be easier if we had separate CNC and FDM firmware?:

        Thanks Manuel - I appreciate your help. I note your "CAUTION" in large type so I'll maybe give it a go when I'm feeling brave.

        Ian, I was brave for you. I got to flashing this build on my machine and successfully home X with endstop plugged into Y endstop and vice versa. So if homing is the only place you need it you are totally safe to go forward with this build.

        Ref M585: there is at least one user I know of with a 3D printer using it. A corresponding thread can be found here. But I can see that the wording in documentation leads to the impression it is for a separate probe tool as it is more common on CNC machines.

        But I also understand that you are angry that a feature you have been waiting for so long gets removed for to restore a feature that looks like it got nothing to do with 3D printing in the first place. I would probably feel the same if something similar happened to me.

        P.S.: Also I want to make you happy with this custom build because I might need you to run your new toys for me. 😂

        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

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

          The reason why I am very unlikely to do separate builds for CNC and FDM machines is that it would double the number of firmware binaries that I have to build, and more importantly test. I already build 5 binaries and test 3 of them on 5 or 6 different setups, and there is no way that I am going to double that. Excessive use of conditionals in source code also makes it a nightmare to develop and maintain because of the way that different conditionals interact.

          I'd like to point out that the M574 facility to remap endstops was introduced in a beta version of firmware. One of the purposes of doing a beta release is so that the firmware can be exercised on a wider range of machines than I have, so that issues with new and modified features can be discovered before they go mainstream. In this case the beta test phase exposed the interaction of the new feature with M585, and it rapidly became clear that adding the new parameter to M574 was the wrong solution to the original problem.

          RRF3 is already available in beta form, with support for remapping endstops and also support for M585 (with some associated configuration changes). It currently lacks support for M577/M581/M582 and for extruder stall detection, but I expect to complete that support within a week. I intend that RRF 2.03 will be the last release in the 2.x series, and to release official RRF 3 betas once RRF 2.03 has been released.

          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
          • deckingmanundefined
            deckingman @A Former User
            last edited by

            @bearer Well I'm not a writer of code so maybe my impression of what is possible is too simplistic. I thought it was a bit like having libraries of functions. So a CNC version would simply include any common G and M codes plus any CNC specific codes and/or parameters from the entire "library". Then a 3D printer version would have the same common G and M codes plus any that are specific to 3D printers. Rather than both versions including every function that is available in the "library". Obviously that's not how it works.

            Ian
            https://somei3deas.wordpress.com/
            https://www.youtube.com/@deckingman

            wilrikerundefined dc42undefined 2 Replies Last reply Reply Quote 0
            • wilrikerundefined
              wilriker @deckingman
              last edited by wilriker

              @deckingman It would have been best to be implemented how you proposed/assumed. Reality unfortunately looks different - as in most software projects. Currently GCode parsing and handling is spread over three different files (and this is only counting the ones where the filename starts with GCode...) that are totalling 11,600 lines (or 12,300 if also counting the header file) as of right now.

              Splitting something like that into a more modular architecture is possible but requires a lot of time and motivation. And also other development would be put on hold for this project - or it would take ages.

              Short: it's a huge project to do that.

              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
              • deckingmanundefined
                deckingman @wilriker
                last edited by

                @wilriker Well I waited over a year before pressure advance would work with multiple extruders, and it's getting close to a year that I2C errors have been a problem, but I've only been waiting since last August to get my 3rd Gantry homing so I guess I'm just too impatient.

                But I'm sure we can come to an arrangement. If you can fork the firmware or whatever it is you do, I'm more than happy to do any machining that you might want.

                Ian
                https://somei3deas.wordpress.com/
                https://www.youtube.com/@deckingman

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

                  @deckingman Ian, just in case you missed it: I tested the above linked build and it works. So you can you this to get your machine running again.

                  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

                  deckingmanundefined 1 Reply Last reply Reply Quote 0
                  • A Former User?
                    A Former User
                    last edited by

                    "Everything is possible"; but it can't be an easy task to balance new features, existing features, new products, etc, especially when you inherit a can of worms from all the decisions made by the early advances in open source 3d-printing trying to fit printing into the well defined g-codes used for cnc, and subsequently trying to support both.

                    I can see that its frustrating to seeing the finish line and being told to advance to Start and do not collect $200, and getting sent to jail on the next roll; but thats just par for the course for both beta software and monopoly.

                    I'll probably be testing the beta and release candidates for RRF3 in CNC mode on one of my printers when I finish the 3d touch probe for it, but I won't buy a new Duet and set up the CNC router before the second minor release or something like that.

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

                      @deckingman said in Wouldn't it be easier if we had separate CNC and FDM firmware?:

                      @bearer Well I'm not a writer of code so maybe my impression of what is possible is too simplistic. I thought it was a bit like having libraries of functions. So a CNC version would simply include any common G and M codes plus any CNC specific codes and/or parameters from the entire "library". Then a 3D printer version would have the same common G and M codes plus any that are specific to 3D printers. Rather than both versions including every function that is available in the "library". Obviously that's not how it works.

                      A lot of it could work that way. If we were short of flash memory on the Duets, then I would probably do exactly that - leave out support for CNC-specific GCodes in the build for 3D printers, and leave out 3D printing-specific GCodes for the CNC build. However we're not short of flash memory even on the Duet 06, so I don't need to do separate firmware builds.

                      The specific issue in this case was that the temporary solution I implemented to support remapping endstop inputs broke M585, and there wasn't an easy workaround. We have CNC users who need fixes and features not present in 2.02, so I had to get M585 working again. Even if there had been an easy way to disable endstop remapping when the mode is CNC, I expect CNC users to need endstop remapping too before long. So I decided to spend the time on implementing endstop remapping properly in RRF 3 rather than spending time on a workaround which would have been thrown away after a few weeks. I'm sorry this inconvenienced you. In retrospect, I should have deferred endstop remapping until RRF3 in the first place.

                      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
                      • deckingmanundefined
                        deckingman @wilriker
                        last edited by

                        @wilriker said in Wouldn't it be easier if we had separate CNC and FDM firmware?:

                        @deckingman Ian, just in case you missed it: I tested the above linked build and it works. So you can you this to get your machine running again.

                        Brilliant! I have a fully functioning 3D printer again!. Thank you so much.

                        Just out of curiosity, was that difficult to do?

                        Ian
                        https://somei3deas.wordpress.com/
                        https://www.youtube.com/@deckingman

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

                          @deckingman said in Wouldn't it be easier if we had separate CNC and FDM firmware?:

                          Just out of curiosity, was that difficult to do?

                          The difficulty here was that David usually combines a lot of changes in one code revision (no offense, just stating here) and the challenge in that is finding the relevant bits that make up this specific behavior. And this was the case on both introduction as well as removal of the feature.

                          Now that it's sorted out it can be very easily reapplied on all future revisions.

                          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
                          • deckingmanundefined
                            deckingman
                            last edited by

                            @wilriker Thanks again - I owe you. 👍

                            Ian
                            https://somei3deas.wordpress.com/
                            https://www.youtube.com/@deckingman

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

                              @deckingman You're welcome! 🙂

                              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
                              • First post
                                Last post
                              Unless otherwise noted, all forum content is licensed under CC-BY-SA