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

Layer change detection job.layer

Scheduled Pinned Locked Moved Solved
Gcode meta commands
3
8
282
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.
  • undefined
    amimafe
    last edited by 19 Feb 2024, 15:46

    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

    undefined undefined 2 Replies Last reply 19 Feb 2024, 17:26 Reply Quote 0
    • undefined
      fcwilt @amimafe
      last edited by 19 Feb 2024, 17:26

      @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 small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

      undefined 1 Reply Last reply 20 Feb 2024, 14:30 Reply Quote 2
      • undefined
        dc42 administrators @amimafe
        last edited by 19 Feb 2024, 21:08

        @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

        undefined 1 Reply Last reply 20 Feb 2024, 14:37 Reply Quote 0
        • undefined
          amimafe @fcwilt
          last edited by 20 Feb 2024, 14:30

          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.

          undefined 1 Reply Last reply 21 Feb 2024, 02:56 Reply Quote 0
          • undefined
            amimafe @dc42
            last edited by 20 Feb 2024, 14:37

            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
            • undefined
              fcwilt @amimafe
              last edited by 21 Feb 2024, 02:56

              @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 small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

              undefined 1 Reply Last reply 21 Feb 2024, 09:10 Reply Quote 0
              • undefined
                amimafe @fcwilt
                last edited by 21 Feb 2024, 09:10

                @fcwilt

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

                undefined 1 Reply Last reply 21 Feb 2024, 12:42 Reply Quote 0
                • undefined
                  fcwilt @amimafe
                  last edited by 21 Feb 2024, 12:42

                  @amimafe

                  Thanks for the feedback.

                  Frederick

                  Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                  1 Reply Last reply Reply Quote 0
                  • undefined amimafe marked this topic as a question 27 Feb 2024, 07:49
                  • undefined amimafe has marked this topic as solved 27 Feb 2024, 07:49
                  5 out of 8
                  • First post
                    5/8
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA