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

    Way to have mesh scanning create numbered files?

    Scheduled Pinned Locked Moved
    Firmware wishlist
    4
    9
    307
    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.
    • Reineundefined
      Reine
      last edited by

      Is there a way to have the G29 output an additional file in a separate folder, for logging purposes?

      I would like to have a folder called "heatmaps" and store each scan with a timestamp as filename, so I can go back and see how it have changed over time.

      Is that or something similar already available or do I need to write my own macro for it?

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

        @Reine there's no built-in facility to do that, but you can write your own mesh.g file to do it. Simplest would be to use G29 S0 to do the probing, then G29 S3 P{"heightmap-"^state.time^".csv} to save it to a unique name. [I have not tested this.] This assumes that you have connected DWC to the Duet before probing, so that the Duet knows the date and time.

        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

        Reineundefined 2 Replies Last reply Reply Quote 0
        • Reineundefined
          Reine @dc42
          last edited by

          @dc42 ahh oki, so G29 keeps the current mech in memory, so I could in theory to multiple G29 S3 Pxxxx to save the current mesh in several files without doing file-copy operations?

          Where can I read more about what files are called, like the mesh.g, I didn't know the system looked for that file first and if not found falled back to something internal?

          1 Reply Last reply Reply Quote 0
          • Reineundefined
            Reine @dc42
            last edited by

            @dc42 just tried to save with a timestamp as you suggest and that works, but accessing the file fails.

            46285783-ec07-4d55-a428-156e5e3bcfb2-image.png

            Guess the ":" are the issue, can't even rename or delete it. Where in the SBC filesystem can I find the directory for those files?

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

              @Reine see https://docs.duet3d.com/en/User_manual/Machine_configuration/DSF. Yes, the ":" characters will be a problem.

              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

              Reineundefined 1 Reply Last reply Reply Quote 0
              • Reineundefined
                Reine @dc42
                last edited by

                @dc42 perfect, thank you. I did some Googling about string functions and found it had been discussed before but never implemented? Which I can understand.

                I also had a quick look in the object model and found the state.time property.

                Have I just missed it or is there no build in functions to either format the date or manipulate the string?

                dc42undefined T3P3Tonyundefined 2 Replies Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators @Reine
                  last edited by

                  @Reine there are no string handling functions yet.

                  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
                  • mikeabuilderundefined
                    mikeabuilder
                    last edited by

                    You can always use the "Seconds since time started" as your timestamp in your filename. Putting a "+" in front of state.time gives you this number.

                    G29 S3 P{"heightmap-"^+state.time^".csv"}

                    This will keep your files in order.
                    Then you can append the human readable timestring into the heightmap file so you'll have it.

                    1 Reply Last reply Reply Quote 0
                    • T3P3Tonyundefined T3P3Tony moved this topic from Tuning and tweaking
                    • T3P3Tonyundefined
                      T3P3Tony administrators @Reine
                      last edited by

                      @Reine see my update here:
                      https://forum.duet3d.com/topic/35166/converting-datetime-to-string/10

                      www.duet3d.com

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