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

    Layer change detection job.layer

    Scheduled Pinned Locked Moved Solved
    Gcode meta commands
    3
    8
    289
    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.
    • amimafeundefined
      amimafe
      last edited by

      Hi,

      I have been editing daemon.g to save several values during printing in a .csv file.
      I have managed to get it to work correctly and it saves them according to the time I set with the G4 command.
      What I want to do now is to save the variables once per layer. I have been testing with the object "job.layer" but I have not been able to do it.
      Could you give me a solution?
      I have thought to create a macro that is executed in each layer change calling it from the laminator, but I would like more to execute it from daemon.g

      Thanks

      fcwiltundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • fcwiltundefined
        fcwilt @amimafe
        last edited by

        @amimafe

        All of the slicers I have used have a place to put user code to be called on layer changes.

        This is a screen shot from Prusa showing where the code can go:

        Frederick

        Prusa Layer Change Code.jpg

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

        amimafeundefined 1 Reply Last reply Reply Quote 2
        • dc42undefined
          dc42 administrators @amimafe
          last edited by

          @amimafe the job.layer value should work provided that the GCode file has layer number comments within it. This is a configurable option in some slicers. However, some slicers use variable layer height and in this case the concept of layer number rather breaks 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

          amimafeundefined 1 Reply Last reply Reply Quote 0
          • amimafeundefined
            amimafe @fcwilt
            last edited by

            Hi @fcwilt ,

            Yes, that's the other option I had thought of, but I preferred to do it by daemon.g and if a third party manages the machine, everything is integrated with the firmware.

            Thank you.

            fcwiltundefined 1 Reply Last reply Reply Quote 0
            • amimafeundefined
              amimafe @dc42
              last edited by

              Hi @dc42 ,

              I read the postRe: Job.Layer not working anymore with 3.3rc2 and wanted to do something similar. Execute a command at each layer change. Entering the layer change comment with the laminator would not be a problem.
              Is there still an option? I tried to do it with creating a variable and assigning it the job.layer value to compare with its current values but it doesn't work.
              The idea was to make everything more compact with the duet firmware.

              Thanks again

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

                @amimafe said in Layer change detection job.layer:

                Yes, that's the other option I had thought of, but I preferred to do it by daemon.g and if a third party manages the machine, everything is integrated with the firmware.

                Thank you.

                Understood - but the slicer knows what is going on. How would the firmware identify a layer change?

                Frederick

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

                amimafeundefined 1 Reply Last reply Reply Quote 0
                • amimafeundefined
                  amimafe @fcwilt
                  last edited by

                  @fcwilt

                  The slicers we use add a comment on the layer changes that DUET2 recognizes.

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

                    @amimafe

                    Thanks for the feedback.

                    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
                    • amimafeundefined amimafe marked this topic as a question
                    • amimafeundefined amimafe has marked this topic as solved
                    • First post
                      Last post
                    Unless otherwise noted, all forum content is licensed under CC-BY-SA