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

    Bug in Duet 0.8.5 firmware 1.23 with G10: Retract

    Scheduled Pinned Locked Moved
    Firmware installation
    4
    13
    1.3k
    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.
    • PDBealundefined
      PDBeal
      last edited by

      I've been experimenting with my E3D Cyclops and my Dual Direct Drive Titan design and things are working rather well. However, due to the Cyclops setup I've had to switch to firmware retraction. I've managed to make Cura 3.6 use Firmware Retraction and it enters G10 and G11 appropriately, except when it does a Tool switch it inserts a "G10 S1" . This G10 S1 command is setting the temperature of my heater to 1.

      Reading the G-code pages at the RepRap Wiki for G10, It says G10 S1 is for repetier only but signifies a long retract and a short retract. However, there is a note "RepRapFirmware recognizes G10 as a command to set tool offsets and/or temperatures if the P parameter is present, and as a retraction command if it is absent." Since the G10 S1 has no P parameter I figured it would be ok, but apparently that checking for a P parameter doesn't work.

      For the short term, I'm just search and replace G10 S1 to G10, but based on the Wiki, it shouldn't be setting temperature to 1 without the P parameter? I suspect this is an issue in the 2.x firmware although I have no way of checking as I only have 0.8.5 boards.

      I've attached my G-Code for the simple traffic code that has this G10 S1. I've not yet refined my start code and some lines are repetitive, but it works apart from the G10 S1.

      0_1546909708932_CFFFP_Traffic_Cone_Rings_Dual_Bad.gcode

      1 Reply Last reply Reply Quote 0
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by

        Here's the RepRapFirmware gcode wiki for reference. Use this one instead.
        https://duet3d.dozuki.com/Wiki/GCode#Section_G10_Tool_Offset

        You may still be right about the P parameter though.

        Z-Bot CoreXY Build | Thingiverse Profile

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

          The behaviour of G10 was changed several firmware versions ago because a user needed to be able to use G10 to set the temperatures for the current tool without knowing the tool number. So now G10 with a P or S or R parameter sets temperatures and/or offsets, and G10 with none of those parameters is a retraction command.

          I've not heard before of S1 being used to choose between 2 different retraction lengths. I think it must be a recent addition.

          Are you sure that the G10 S1 command isn't in a tool change script that can be edited?

          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
          • PDBealundefined
            PDBeal
            last edited by

            I don't have any tool change things defined in Cura. I had to stop Cura from trying to control the heaters too as it's dual extrusion expects two heaters from what I've seen. In my case, I don't even have anything in tfree0, tpre0, tpost0 either because I don't need it. And I just adjust my start code for my desired temperatures.

            From what I suspect, based on the RepRap Wiki for G10 S1, Repetier has something implemented for a long retract probably to support one of those promethius setups with 1 hotend and 2 filaments with the filament switch happening above the cold zone of the hotend. I'm also guessing Cura has implemented this G10 S1 for those types of cases also with it only using G10 S1 on Tool change locations.

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

              Perhaps @burtgoogle can change Cura so that it doesn't generate the S parameter when the GCode flavour is RepRapFirmware?

              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

              burtoogleundefined 1 Reply Last reply Reply Quote 0
              • burtoogleundefined
                burtoogle @dc42
                last edited by

                @dc42 said in Bug in Duet 0.8.5 firmware 1.23 with G10: Retract:

                Perhaps @burtgoogle can change Cura so that it doesn't generate the S parameter when the GCode flavour is RepRapFirmware?

                My ears are burning.

                Looking at the Cura code, it currently does this:

                        *output_stream << "G10";
                        if (extruder_switch)
                        {
                            *output_stream << " S1";
                        }
                

                And what you want is more like this: ?

                        *output_stream << "G10";
                        if (extruder_switch && flavor != EGCodeFlavor::REPRAP)
                        {
                            *output_stream << " S1";
                        }
                

                I understand why you want to remove the S1 but, surely, it's not ideal to have G10 so overloaded. How did that happen?

                dc42undefined 1 Reply Last reply Reply Quote 0
                • burtoogleundefined
                  burtoogle
                  last edited by

                  BTW, the Cura developers have pretty much stopped processing PRs on the Cura slicer. I have quite a backlog of PRs that they are simply ignoring. It's not personal (I think) because they don't appear to be processing any PRs unless they provide some kind of sexy feature (like gyroid infill) which they grabbed with (relatively) indecent haste.

                  1 Reply Last reply Reply Quote 0
                  • burtoogleundefined
                    burtoogle
                    last edited by

                    See https://github.com/Ultimaker/CuraEngine/pull/972

                    I will incorporate this into my next Cura release which you can find at https://www.dropbox.com/sh/s43vqzmi4d2bqe2/AAADdYdSu9iwcKa0Knqgurm4a?dl=0

                    smartavionics opened this pull request in Ultimaker/CuraEngine

                    closed Bug Fix - Only add S1 param to G10 when generating repetier flavour gcode. #972

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

                      @burtoogle said in Bug in Duet 0.8.5 firmware 1.23 with G10: Retract:

                      I understand why you want to remove the S1 but, surely, it's not ideal to have G10 so overloaded. How did that happen?

                      I think it started when someone developing some 3D printer firmware (Marlin?) appropriated G10 for firmware retraction, ignoring the fact that G10 had been used for many years by the CNC community for coordinate setting functions (it's in the NIST GCode standard). It didn't help that the early developers of RepRapFirmware independently added temperature-setting functions to G10, although that didn't clash with NIST.

                      I have been considering moving the temperature-setting functions (and possibly also the tool offset functions) away from G10 to a completely new M-code, perhaps maintaining a backwards-compatibility option for several firmware versions to give users a chance to update DWC and PanelDueFirmware. The M104/M109 temperature setting functions are not flexible enough to fully handle RepRapFirmware's versatile tool and heater management, but perhaps M104 could be extended.

                      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
                      • burtoogleundefined
                        burtoogle
                        last edited by

                        Understood, thanks @dc42.

                        1 Reply Last reply Reply Quote 0
                        • PDBealundefined
                          PDBeal
                          last edited by

                          Apparently, in Cura 4.0.0, for RepRapFirmware, it still generated G10 S1.

                          1 Reply Last reply Reply Quote 0
                          • PDBealundefined
                            PDBeal
                            last edited by

                            Submitted Bug Report to Cura.

                            https://github.com/Ultimaker/Cura/issues/5881

                            PDBeal created this issue in Ultimaker/Cura

                            closed [3.6-4.0] G10: Retract Issue with RepRap machine selection #5881

                            1 Reply Last reply Reply Quote 0
                            • burtoogleundefined
                              burtoogle
                              last edited by

                              See https://github.com/Ultimaker/CuraEngine/commit/00bc58391afd6b94b4112d3492d5bd8adba013a5

                              0 smartavionics committed to Ultimaker/CuraEngine
                              Only add S1 param to G10 when generating repetier flavour gcode.
                              
                              The other firmwares can interpret the S1 differently so don't let them see it.
                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post
                              Unless otherwise noted, all forum content is licensed under CC-BY-SA