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

Wrong layer count

Scheduled Pinned Locked Moved
Duet Web Control
5
11
523
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
    hmortensen
    last edited by 26 May 2020, 08:10

    Hi

    I see wrong layer count in DWC - 99 instead of 100.
    Guess it's a zero index bug or is it the slicer doing it wrong?

    Using FW 3.1.1 on Duet2.

    f394c6bd-7f5a-4500-b4b6-c271b07ef3e8-image.png

    1 Reply Last reply Reply Quote 0
    • undefined
      dc42 administrators
      last edited by 26 May 2020, 10:41

      Are you using a different height for the first layer? It's an option in the slicer.

      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
      • undefined
        hmortensen
        last edited by 26 May 2020, 10:45

        Nope, .2 all the way.

        Last layer is saying 100/99

        There is just one object and no support or anything else.

        1 Reply Last reply Reply Quote 0
        • undefined
          dc42 administrators
          last edited by 26 May 2020, 10:46

          Please provide the GCode file.

          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
          • undefined
            hmortensen
            last edited by 26 May 2020, 10:54

            Snip showing 100/99:
            27fe29f8-b819-4c61-a172-66deafb2013f-image.png

            G-code:
            wrong_layer_count.txt

            1 Reply Last reply Reply Quote 0
            • undefined
              hmortensen
              last edited by 3 Jun 2020, 10:55

              Seems to be my start code purge part:
              G1 X2 Y130.0 Z0.4 F800.0 E15 ; draw 1st line
              G1 X2.5 Y130.0 Z0.4 F5000.0 ; move to side a little
              G1 X2.5 Y50 Z0.4 F800.0 E20 ; draw 2nd line
              G1 X17 Y55 F5000.0 ; quick wipe

              As soon as it sees Z0.4 with a layer height of 0.2 it says layer 2/X

              Can I tell it to "reset" counting in the start script?
              I have not done test without purge part, to see if the total layer count is correct.

              1 Reply Last reply Reply Quote 0
              • undefined
                jay_s_uk
                last edited by 3 Jun 2020, 10:59

                if you always do it in the same place, you could move your start gcode out from the slicer and put it in start.g
                Or try putting an "E" at the beginning of the comment where each Z move occurs

                Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                undefined 1 Reply Last reply 3 Jun 2020, 15:17 Reply Quote 1
                • undefined
                  droftarts administrators @jay_s_uk
                  last edited by 3 Jun 2020, 15:17

                  @hmortensen @jay_s_uk said in Wrong layer count:

                  Or try putting an "E" at the beginning of the comment where each Z move occurs

                  FYI putting an 'E' at the beginning of the comment causes the gcode parser to ignore the line and any movements in it, eg:

                  G1 X2 Y130.0 Z0.4 F800.0 E15 ; E draw 1st line
                  G1 X2.5 Y130.0 Z0.4 F5000.0 ; E move to side a little
                  G1 X2.5 Y50 Z0.4 F800.0 E20 ; E draw 2nd line
                  

                  Ian

                  Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                  undefined 1 Reply Last reply 5 Jun 2020, 10:30 Reply Quote 1
                  • undefined
                    hmortensen
                    last edited by 5 Jun 2020, 08:07

                    Tried with the E infront of the comments, but no change. Still jumps directly to layer 2 when doing the purge, and total layer count is still one too low.

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      chrishamm administrators @droftarts
                      last edited by 5 Jun 2020, 10:30

                      @droftarts The ; End comment work-around can be used only for the object height detection. The first layer height is determined by looking for the first absolute G0/G1 ... Z code in the G-code file. @hmortensen if you need to print a line before the first layer, put the corresponding section into start.g and remove it from your start G-code. Or move it to a macro file and invoke it using M98.

                      Duet software engineer

                      undefined 1 Reply Last reply 5 Jun 2020, 11:17 Reply Quote 1
                      • undefined
                        hmortensen @chrishamm
                        last edited by 5 Jun 2020, 11:17

                        @chrishamm Thank you, that did fix both problems.
                        Didn't work in first try, as when I created a macro file it had no extension and I tried calling it with '.g'.
                        Is it possible to force it into error state instead of just yielding a warning if the macro doesn't exist?

                        I went with the custom macro approach, as I guess the start.g macro would be called before the actual print file and then I would miss the option of setting temperature in the slicer.

                        I made a new directory prefixed with a dot and it had the expected effect of hidding it from the dashboard 🙂

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