moonraker icon indicating copy to clipboard operation
moonraker copied to clipboard

Axes tracking

Open jordanruthe opened this issue 3 years ago • 2 comments

Initial commit for #124

jordanruthe avatar Mar 25 '21 20:03 jordanruthe

This is looking pretty good already :+1:

This is for tracking moves, so it won't be able to track things like movement due to tilt adjustment, and will be less real for Delta printers.

I still like the ability to track E, that would be more accurate than the "filament used" in history tracking. Could you make it work for multiple extruders as well please?

grigi avatar Mar 26 '21 14:03 grigi

I think its a good start, although I have a few early comments.

  • I don't think we should use gcode_move to derive the position. The toolhead position is the actual movement after transforms, so it should produce a more accurate result.
  • I think its worth exploring accumulating the position data in Klipper itself, which would make the above point moot. If we accumulate position data in Klipper we would just need to keep a running total across restarts. One nice thing about doing it in Klipper is that it would take care of homing for you (in fact homing movement would be included in the accumulated position).
  • I think we can put this in data_store.py. Its role is to track and store printer data, currently it tracks temperature data and gcode requests/responses. The data it stores isn't persistent, but there is no harm in tracking additional data that is.

FWIW, filament_used does track E. It excludes extrusion moves during a pause, which IMO makes it is the appropriate field to track print history.

The toolhead reports the extruder its using, so it is possible to track position per extruder. However if we move the accumulation to Klipper, E would be a total of all extruders. Accumulating position in Klipper would be far more accurate though. Moonraker receives updates ever 250 ms, which means that we will miss some data when a tool changes direction, so IMO it would be a good tradeoff.

Arksine avatar Mar 26 '21 15:03 Arksine