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

    Possible mistake in ConfigTool resume.g

    Scheduled Pinned Locked Moved
    Config Tool
    3
    4
    203
    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.
    • oliofundefined
      oliof
      last edited by

      Hi,
      due to a question on the LPCSTM RRF discord, I did some source code spelunking, and found a discrepancy.

      Regarding pause and resume, the documentation tells us in https://duet3d.dozuki.com/Wiki/G1

      Rn Return to the coordinates stored in restore point #n (see G60). Any X, Y, Z and other axis parameters in the command are used as offsets from the stored position. Axes not mentioned are not moved, so use offset 0 for axes you want to restore to the stored value. For example, G1 R0 X0 Y0 Z2 will move to 2mm above the position stored in restore point 0.

      1. the documentation should mention that triggering a pause also stores coordinates at restore point 1 and M60 is not needed in pause.g / filament-change.g -- I seem to remember this is mentioned somewhere around restore points but I can't quickly search through the whole corpus of GCodes anymore due to the splitting up of the dictionary. Splitting up neccessitates some redundancy it seems.

      2. documentation agrees with source code since commit hash 73461819be81e0f8294a3810e644a9d88adf27d2, so that's good.

      3. ConfigTool seems to generate a resume.g that's not restoring Z position (see https://github.com/Duet3D/ConfigTool/blame/e563ba7a060ae684b48be20d6d4b44c35ba887d2/public/templates/resume.ejs). ConfigTool creates a resume.g that looks like this:

      ; resume.g
      ; called before a print from SD card is resumed
      ;
      ; generated by RepRapFirmware Configuration Tool v<%- version %> on <%- (new Date()).toString() %>
      G1 R1 X0 Y0 Z5 F6000 ; go to 5mm above position of the last print move
      G1 R1 X0 Y0 ; go back to the last print move
      M83 ; relative extruder moves
      G1 E10 F3600 ; extrude 10mm of filament
      

      it should be

      ; resume.g
      ; called before a print from SD card is resumed
      ;
      ; generated by RepRapFirmware Configuration Tool v<%- version %> on <%- (new Date()).toString() %>
      G1 R1 X0 Y0 Z5 F6000 ; go to 5mm above position of the last print move
      G1 R1 X0 Y0 Z0 ; go back to the last print move
      M83 ; relative extruder moves
      G1 E10 F3600 ; extrude 10mm of filament
      

      otherwise the nozzle ends up 5mm above the original print position.

      YET

      some people report the ConfigTool resume.g works for them without any changes. I admit the source code around this is a bit hairy with a lot of conditionals and I may have missed a magic restore Z position piece. Either way, this requires a documentation update if Z is implicitly restored on resume, or an update of the config tool to generate a working resume.g ... which one is it?

      <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

      oliofundefined fcwiltundefined 2 Replies Last reply Reply Quote 0
      • oliofundefined
        oliof @oliof
        last edited by

        @chrishamm WDYT?

        <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

        chrishammundefined 1 Reply Last reply Reply Quote 0
        • chrishammundefined
          chrishamm administrators @oliof
          last edited by

          @oliof Well spotted, thank you. I'm going to update the resume.g template shortly.

          Duet software engineer

          1 Reply Last reply Reply Quote 1
          • fcwiltundefined
            fcwilt @oliof
            last edited by

            @oliof

            I don't know where the code in my resume came from but it has this:

            G1 R1 Z5
            G1 R1 X0 Y0
            G1 R1 Z0
            

            which would seem to have the same result as

            G1 R1 X0 Y0 Z5
            G1 R1 X0 Y0 Z0
            

            Frederick

            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

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