Write M114 Output to file/variable
-
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 !
-
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?
-
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 !