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

    layer change detection - ideamaker

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    11
    703
    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.
    • Danalundefined
      Danal
      last edited by

      DuetLapse depends on the firmware finding the layer tags.

      The firmware is looking for some specific strings prior to starting a print, and then calculates the "current" layer from Z, with appropriate handling for the fact that layer 0 is often different.

      The most common reason for all of that not working is having a G1 (or G0) in the end G-code that contains a Z value that throws off the scan & calculate. What do the last two dozen or so lines in the file look like? And/or what does DWC show for total height?

      Delta / Kossel printer fanatic

      zaptaundefined 1 Reply Last reply Reply Quote 0
      • zaptaundefined
        zapta @Danal
        last edited by zapta

        @Danal, does the layer detection of the duet relies the file preamble from the slicer? E.g. this

        https://github.com/Duet3D/RepRapFirmware/blob/dev/src/Storage/FileInfoParser.cpp#L538

        BTW, theoretically you can have in the timelapse program an additional trigger by z.

        Danalundefined 1 Reply Last reply Reply Quote 0
        • arhiundefined
          arhi
          last edited by

          total height is ok, but everything else is blank
          591ca127-8672-45c7-a6a4-e52ad5ba6879-image.png

          here's a sample g-code
          ideaMaker.gcode

          FileInfoParser.cpp does not know about ideaMaker but that data does not exist in the comment section of ideaMaker ...

          start is

          ;Sliced by ideaMaker 3.5.3.4250, 2020-05-24 01:44:49 UTC+0200
          ;Dimension: 236.000 225.000 300.000 0.600
          ;Plate Shape: 0
          ;Extruder Offset #1: 25.000 0.000
          ;Filament Diameter #1: 1.750
          ;Filament Diameter #2: 1.750
          ;Filament Compensation #1: 92.00
          ;Filament Compensation #2: 90.00
          ;Filament Density #1: 1270.00
          ;Filament Density #2: 1270.00
          ;Bounding Box: -31.745 45.744 -39.743 22.745 0.000 6.000
          ;Model Gap: 0.000
          

          end is

          ;Print Time: 1934
          ;Material#1 Used: 4296.9
          ;Material#2 Used: 0.0
          ;Material#1 Cost: 1.38
          ;Material#2 Cost: 0.00
          

          so not much useful data in the gcode itself 😞

          there is the

          ; LAYER #
          ; Z: ##.##
          

          comment for each layer, but looks like RRF is ignoring that one

          1 Reply Last reply Reply Quote 0
          • Danalundefined
            Danal @zapta
            last edited by

            @zapta said in layer change detection - ideamaker:

            @Danal, does the layer detection of the duet relies the file preamble from the slicer? E.g. this

            https://github.com/Duet3D/RepRapFirmware/blob/dev/src/Storage/FileInfoParser.cpp#L538

            BTW, theoretically you can have in the timelapse program an additional trigger by z.

            Yes, I read the whole thing as:

            1. It has to find a tag (a comment) that tells it the layer height.
            2. It scans the last few K of the G-Code for max Z
            3. It divides to derive total layers
            4. During the actual print, it also divides to decide what layer is current.

            The thing that gets thrown off the most seems to be (2).

            And... that's my reading, I could be off in detail. I've looked at it several times and I'm reasonable certain that is how it works... but we all know that code can do things we are looking right at... and not understanding.

            Delta / Kossel printer fanatic

            arhiundefined 1 Reply Last reply Reply Quote 0
            • arhiundefined
              arhi @Danal
              last edited by

              @Danal said in layer change detection - ideamaker:

              1. It has to find a tag (a comment) that tells it the layer height.

              Weird that most slicers I tried add this comment but idea maker does not. Would be cool that RRF defines some "standard" for comment info that it recommends that slicers that don't already have that can implement, or that a postprocessor can add to a file.

              zaptaundefined 1 Reply Last reply Reply Quote 0
              • zaptaundefined
                zapta @arhi
                last edited by

                @arhi, can you add the expected tags yourself? E.g. with slicer's gcode settings?

                arhiundefined 1 Reply Last reply Reply Quote 0
                • arhiundefined
                  arhi @zapta
                  last edited by

                  @zapta that's why I wrote " Would be cool that RRF defines some "standard" for comment" as I could add it to my postprocessing - upload script. I could try to put codes similar to s3d or slic3r .. we'll play with it more, did not even notice it before this timelapse thing 🙂

                  1 Reply Last reply Reply Quote 0
                  • arhiundefined
                    arhi
                    last edited by

                    Added to start script

                    ; layer_height={layer_height}
                    ; Layer height={layer_height}
                    ; layerHeight,{layer_height}
                    ; layer_thickness_mm={layer_height}
                    ; layerThickness={layer_height}
                    

                    and now RRF knows about the layer height
                    d1291832-837b-437b-b3d2-1d70d3321caf-image.png

                    hopefully that's enough 🙂

                    1 Reply Last reply Reply Quote 0
                    • arhiundefined
                      arhi
                      last edited by

                      works!!! 😄

                      zaptaundefined 1 Reply Last reply Reply Quote 1
                      • zaptaundefined
                        zapta @arhi
                        last edited by

                        @arhi, very nice!

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