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

    Getting the same state.time when doing echo>>"file" state.time

    Scheduled Pinned Locked Moved
    Gcode meta commands
    3
    3
    166
    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.
    • Schickfusundefined
      Schickfus
      last edited by

      Hi

      I am trying to logg some data. In my daemon.g I have a row like this.

      echo "Time, ", {state.time},{move.extruders[0].factor} 
      

      The result at the consol is. Did I Do something wrong?
      The factor is changing but the time is not. Should it be casted to an other type as (string) or?

      The consol gives this:

      2023-08-22 02:10:19 Time, 0.00017975105 0.94
      2023-08-22 02:10:17 Time, 0.00017975105 0.94
      2023-08-22 02:10:14 Time, 0.00017975105 0.94
      2023-08-22 02:10:12 Time, 0.00017975105 0.51
      2023-08-22 02:10:10 Time, 0.00017975105 0.51
      2023-08-22 02:10:07 Time, 0.00017975105 0.51
      2023-08-22 02:10:06 Time, 0.00017975105 0.51

      chrishammundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @Schickfus
        last edited by

        @Schickfus Putting state.time into curly braces does not seem to work in v3.4. These two commands work, though:

        echo "Time, ", state.time,{move.extruders[0].factor} 
        echo "Time: " ^ state.time ^ ": " ^ move.extruders[0].factor
        

        Duet software engineer

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

          This should work too:

          echo "Time, ", state.time, move.extruders[0].factor
          

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