Get motion history for generating a graph of extrusion rate over time

Basic Information:

Printer Model: cartesian printer (self developed)
MCU / Printerboard: RADDS with Arduino Due

klippy.log (2.6 MB)

Hello,

I would like to graph the extruder position, velocity and acceleration using following command from from https://www.klipper3d.org/Debugging.html:

~/klipper/scripts/motan/data_logger.py /tmp/klippy_uds mylog
Waiting for connect to /tmp/klippy_uds
Unable to connect socket /tmp/klippy_uds [2,ENOENT]

Why are there problems connecting to the socket /tmp/klippy_uds?

If you are using an installation with moonraker, which is now very common as it is the basis for the Klipper GUI frontends, then Klipper will already be started with the Klipper API server configured. You should use the normal Klipper start scripts and point the motan tool at the existing “uds” connection - typically it is ~/printer_data/comms/klippy.sock or /tmp/klippy_uds.

-Kevin

Hi Kevin,

thank you very much! I used

pi@octopi:~ $ ~/klipper/scripts/motan/data_logger.py ~/printer_data/comms/klippy.sock mylog

and got the mylog.index.gz and json.gz.

To get position, velocity and acceleration of the extruder i used

~/klipper/scripts/motan/motan_graph.py mylog -g '[["stepq(extruder)"], ["trapq(extruder,velocity)"], ["trapq(extruder,accel)"]]' -d 60

Figure_1___

Is there also a tool to write steps, velocity and acceleration in a textfile in different colums?

Best regards

Dirk

I don’t know of an existing tool that can generate csv files from the motan data.

If you are familiar with Python, then it should be possible to modify the scripts/motan/motan_graph.py code to report the raw data. If so, look at the plot_motion() code - the raw data is in the datasets variable (specifically, datasets["stepq(extruder)"] contains a list of values - the raw data for the “extruder position” chart).

-Kevin

Listing datasets with

~/klipper/scripts/motan/motan_graph.py -l

says that it is possible to graph a status(<field>). Is it possible to graph also the actual motor current of tmc2130 drivers? I can read tmc registers for actual motor coil current with following command in the mainsail console:

dump_tmc stepper=extruder register=MSCURACT
11:19 MSCURACT: 00f7000c cur_a=12 cur_b=247

It would be interesting to determine actual force necessary to push the filament into the melting zone. That way it might be possible to tune pressure advance automatically.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.