Real Time Axis Position
-
Hello, I am new to duet with only a week of experience. I was playing with the web software and the state endpoint to get the tools positions, but this information is not realtime. Plus there is the network delay. Has someone some sugestion where to look, read or study to learn if there is a way of getting the tool position in realtime?
Thanks!!!
-
I was playing with the web software and the state endpoint to get the tools positions, but this information is not realtime.
Strictly spoken, there is no such thing as ”realtime”. An operating system - in case of the Duet: RTOS - can put up this claim if it guarantees to respond within a fixed time frame, but notably, not ”immediately” (however you define that). Then there’s the domain problem: some parts of the firmware (especially the motion system) must act in real time, other areas like networking are technically not able to fulfill this claim.
The process of moving the print head along a path while extruding the appropriate amount of filament is executed in realtime, but to provide the exact coordinates while doing this requires the firmware to re-calculate each and every single step - which, given limited resources of the micro controller, ruins the performance of the real time task.
Currently, the Duet reports the head’s position at the end of each move or segment, who tend to be very short. Long moves can be further segmented to improve the rresolution of the data reported to the object model, so that’s what you can expect from the firmware.
Reading values from the object model takes place in a separate process, if done via network, it won’t happen realtime. So the question is: What do you intend to achieve? What application do you have in mind which requires to know the exact position of the print head anytime? Please elaborate, maybe we can find a solution.
-
@mariano You can click on "Tool Position" in DWC and display the machine position instead. That's updated while moves are being done.
-
@chrishamm Thanks for the help.