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

Way to have mesh scanning create numbered files?

Scheduled Pinned Locked Moved
Firmware wishlist
4
9
306
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
    Reine
    last edited by 3 Apr 2023, 15:47

    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?

    undefined 1 Reply Last reply 3 Apr 2023, 15:54 Reply Quote 0
    • undefined
      dc42 administrators @Reine
      last edited by dc42 4 Mar 2023, 15:55 3 Apr 2023, 15:54

      @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

      undefined 2 Replies Last reply 3 Apr 2023, 16:09 Reply Quote 0
      • undefined
        Reine @dc42
        last edited by 3 Apr 2023, 16:09

        @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
        • undefined
          Reine @dc42
          last edited by 3 Apr 2023, 16:21

          @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?

          undefined 1 Reply Last reply 3 Apr 2023, 16:28 Reply Quote 0
          • undefined
            dc42 administrators @Reine
            last edited by 3 Apr 2023, 16:28

            @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

            undefined 1 Reply Last reply 3 Apr 2023, 16:35 Reply Quote 0
            • undefined
              Reine @dc42
              last edited by 3 Apr 2023, 16:35

              @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?

              undefined undefined 2 Replies Last reply 3 Apr 2023, 16:43 Reply Quote 0
              • undefined
                dc42 administrators @Reine
                last edited by 3 Apr 2023, 16:43

                @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
                • undefined
                  mikeabuilder
                  last edited by 3 Apr 2023, 17:18

                  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
                  • undefined T3P3Tony moved this topic from Tuning and tweaking 5 Apr 2023, 13:47
                  • undefined
                    T3P3Tony administrators @Reine
                    last edited by 14 Feb 2025, 10:02

                    @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
                    5 out of 9
                    • First post
                      5/9
                      Last post
                    Unless otherwise noted, all forum content is licensed under CC-BY-SA