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

    Include variable in heightmap.csv filename

    Scheduled Pinned Locked Moved Solved
    Gcode meta commands
    2
    3
    157
    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.
    • MaxGyverundefined
      MaxGyver
      last edited by MaxGyver

      I am working on a script that runs the mesh bed probing routine at increasing temperatures, but I have problems saving the heightmap.csv after each loop.

      I have a variable called "var.temp". It increases by 10° for each cycle until a set temperature is reached.
      I would like to save the hightmap.csv file at the end of each cycle with the value of "var.temp" included in the filename. So when var.temp = 100 the file should be named "heightmap_100°C.csv"

      But I can't get it to safe correctly using G29 S3.

      I know that the code below will not work like this. It is only meant to illustrate what I am tying to do.

      var temp = 100
      
      G29 S3 P"heightmap_{var.temp}.csv"
      

      Some help would be much appreciated 🙂

      fcwiltundefined 1 Reply Last reply Reply Quote 0
      • MaxGyverundefined MaxGyver marked this topic as a question
      • fcwiltundefined
        fcwilt @MaxGyver
        last edited by

        @maxgyver

        Here is from my code:

        G29 S3 P{var.name ^ ".csv"} ; save heightmap again with file name based on mesh settings
        

        This should work for you:

        G29 S3 P{"heightmap_" ^ var.temp ^ ".csv"} ; save heightmap again with file name based on mesh settings
        

        Frederick

        Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

        MaxGyverundefined 1 Reply Last reply Reply Quote 1
        • MaxGyverundefined
          MaxGyver @fcwilt
          last edited by

          @fcwilt said in Include variable in heightmap.csv filename:

          @fcwilt said in Include variable in heightmap.csv filename:

          This should work for you:
          G29 S3 P{"heightmap_" ^ var.temp ^ ".csv"} ; save heightmap again with file name based on mesh settings

          Yes it does!
          Thank you very much

          -Max

          1 Reply Last reply Reply Quote 0
          • MaxGyverundefined MaxGyver has marked this topic as solved
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA