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

    Conditional gcode help required - New Problem

    Scheduled Pinned Locked Moved
    Gcode meta commands
    6
    45
    2.1k
    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.
    • deckingmanundefined
      deckingman
      last edited by

      OK. So by a process of elimination, I have found the reason (but not the cause) for the errors and a work around. I created a gcode file with simply the start part and the end part of a print file which provokes the problem. That is to say, with all the G1 moves removed. Running that did provoke the problem. Then I progressively removed various commands until I ended with simply this:

      M98 P"0:/macros/PrePrintPETG.g"
      
      ;G21 ; set units to millimeters
      ;G90 ; use absolute coordinates
      ;M83 ; use relative distances for e
      M107
      
      M98 P"0:/macros/PostPrint.g"
      

      ..........and that will provoke the problem when run as a print file. Yet running those commands "stand alone" via the console does not provoke the problem - it has to be done as a print from the sd card.

      The work around is to put M400 before that second "post print" macro (or indeed at the start of that macro before the call to the second "tool temps" macro).

      If that's how it has to be, that's fine by me, but I suggest it be documented somewhere so as to help others in the future.

      HTH

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

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

        Thanks, that will make it easier for me to track down.

        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

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

          @dc42 said in Conditional gcode help required - New Problem:

          Thanks, that will make it easier for me to track down.

          No worries. I have those macros in a folder on my google drive so I can send you a shareable link if you want to replicate things exactly.

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

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

            Thanks, I've reproduced the fault using those files, and I'm looking into 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
            • dc42undefined
              dc42 administrators
              last edited by

              I've worked out what's going on. The G10 command would normally be synchronised to the movement queue. If there are movements not yet complete, it is put in the deferred execution queue. When it is retrieved from that queue, the "iterations" context has been lost.

              I think the solution will be to substitute for all { } parameters when copying the GCode command to the deferred execution queue.

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