• Tags
  • Documentation
  • Order
  • Register
  • Login
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
158
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
    Schickfus
    last edited by 22 Aug 2023, 00:37

    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

    undefined undefined 2 Replies Last reply 28 Aug 2023, 18:53 Reply Quote 0
    • undefined
      chrishamm administrators @Schickfus
      last edited by 28 Aug 2023, 18:53

      @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
      • undefined
        dc42 administrators @Schickfus
        last edited by 29 Aug 2023, 07:56

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