Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Write M114 Output to file/variable

    General Discussion
    2
    3
    424
    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.
    • Algadz
      Algadz last edited by

      Hello everyone 🙂

      I have developped some automated SW to control a 3D printer and I use prontercore library to stream Gcode to my printer.

      What I would like to do is send a M114 command and be able to store the answer in a variable to make some computation on the axis position.

      I know that prontercore/pronterface can read this value but I cannot access it or use it in any other context.

      Would it be possible to have a second SW reading the same COM port and log the Duet answers or will the port be considered as busy when prontercore is connected ?

      Do you see any other option to access this value ?

      Thank you !

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

        If you send additionals commands to the same serial port then you will probably confuse Pronterface because it doesn't expect to receive responses to commands that it hasn't sent.

        Why not send M408 commands over HTTP instead?

        1 Reply Last reply Reply Quote 0
        • Algadz
          Algadz last edited by

          Thank you for your answer,

          Initially, I was hopping to only connect the Duet through USB because the Ethernet port of the device hosting pronterface is already taken. But if I can't find any other solution I will probably search this way.

          I do agree, my initial idea was to have Pronterface reading the port and writing M114 command (+other gcode) and an other SW only reading the port and extrating M114 answers.
          But I think this boils down to the question of exclusivity on the COM port, once connected, does Pronterface allows other SW to use the same COM port.

          I realise now that my question is not really on the Duet side but mostly on pronterface and the host computer so it may not be the right forum to post. Anyway, if you have an idea on this I'll take it 🙂

          Thank you !

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