TMC Reset / G1 Error

Replace Y step motor solve Your problem?

I have a similar problem. After turning on Preasure Advance printer stopped directly after the purge line during the move to the first line of the print. Print crashe with “Internal error on command G1”

In klippy.log i found these errors:

TMC ‘extruder’ reports GSTAT: 00000001 reset=1(Reset)
TMC ‘extruder’ reports GSTAT: 00000000

Moved to a new thread since most likely unrelated.

These are no errors but either the power up sequence or something that “healed” itself immediately.

Post your klippy.log

klippy.log (338.7 KB)

Interesting.
Stepcompress errors without any preceding errors are quite rare.

Can you reproduce it? If yes, run a M112 immediately after the error and post the resulting log, please.

I can reproduce it in every print whit Preasure Advance is set. Without PA everything is ok.

Attached log include M112 immediately after firmware restart. Error shutdown firmware

klippy_with_M112.log (602.7 KB)

@Sineos I do some tests and now I know what causes the G1 error, I think.

The problem is the combination of the PA and the pause at the end of my purge line at the end of the start script. If I set the PA, Klipper waits 2000ms after the purge line and raises an error G1. If I remove the “pause” line from the startup script, everythink is ok.

I have been using this startup script for about half a year and the printer is failing only now.

That’s odd. Can you attach the g-code file that causes the failure here?

-Kevin

Attached…

# My startup sckript
> [gcode_macro START_PRINT]
gcode:
  RESPOND TYPE=echo MSG='Startujeme!' 
  {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
  {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(210)|float %}
  {% if not printer['output_pin mainpower'].value|int %}
    SET_PIN PIN=mainpower VALUE=1
    RESPOND TYPE=echo MSG='Zapinam tiskarnu!' 
  {% else %}
    RESPOND TYPE=echo MSG='Tiskarna je zapnuta!' 
  {% endif %}
  RESPOND TYPE=echo MSG='Aktualni teplota hot bedu: {printer.heater_bed.temperature}' 
  RESPOND TYPE=echo MSG='Aktualni teplota hot endu: {printer.extruder.temperature}'
  {% if printer.extruder.temperature < 150 %}
    RESPOND TYPE=echo MSG='Nastavuji extruder na 150 stupnu'
    M104 S150
  {% else %}
    RESPOND TYPE=echo MSG='Teplota hot endu je vyssi jak 150 stupnu, pokracuji dal ve spousteni tisku'
    M104 S{printer.extruder.temperature}
  {% endif %}
  M190 S{BED_TEMP}
  G90
  M83
  G28
  G29
  G1 X3 Y6 Z5 F5000
  G1 Z5 F3000
  M109 S{EXTRUDER_TEMP}
  G1 Z0.3 F300
  G92 E0
  G1 E2 F3000
  G1 X120 E30 F600
  G1 X140 F5000
  G92 E0
  G1 E-0.2 F600
  G92 E0
> G4 P2000  # After this line, Klipper crashed if PA is set

sample_gcode_with_PA.gcode (20.5 KB)

Have you tried a M400 just before the G4 P2000 ?

https://reprap.org/wiki/G-code#M400:_Wait_for_current_moves_to_finish

I haven’t tried it. I don’t need it…
If I need it, I’ll try the M400.

Thx for help

Thanks. I am able to reproduce this problem locally. This appears to be a regression introduced in the recent toolhead flush rework (for pwm_tool). The regression is introduced in commit c491ea66.

I will try to track down the root cause and a fix.

-Kevin

3 Likes

This should hopefully be fixed now (commit fe56bf36).

-Kevin

2 Likes

Everything works - problem solved :slight_smile:

Thank You Kevin

1 Like

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