Octoprint communication error at the end of Gcode

Hello all,

I have a Gcode I want to keep, the part is perfect.

I'm using Cura 4.6.1 to make it, and other parts with this version are no problems.

With this Gcode, the nozle doesn't move @home after the finishing print. It stays at the last point of the part, and Octoprint is disconnected of the machine (Anycubic Chiron).
Another problem, the machine retracts a lot of filament before disconnect.

Can you tell me what's wrong with this Gcode ? I have compared with others but I didn't found any difference.
Here is my end Gcode in cura:

G1 E-10 F300 ;retract filament
G91 ;relative positioning
G1 F1000 E3 ;retract
G1 F3000 Z5 ;lift nozzle 5mm
G90 ;change to absolute
G1 X0 Y400 ;prepare for part rermovel
M104 S0 ; turn off extruder
M106 S0 ; turn off cooling fan
M140 S0 ; turn off bed
M84 ; disable motors

serial.log :

2020-07-13 09:33:17,987 - Send: N344130 M105*22
2020-07-13 09:33:17,993 - Recv: ok T:230.8 /230.0 B:79.9 /0.0 @:53 B@:0
2020-07-13 09:33:17,999 - Send: N344131 G90*32
2020-07-13 09:33:18,005 - Recv: ok
2020-07-13 09:33:18,008 - Send: N344132 G1 X0 Y400*30
2020-07-13 09:33:18,370 - Recv: ok
2020-07-13 09:33:18,374 - Send: N344133 M104 S0*87
2020-07-13 09:33:18,379 - Recv: ok
2020-07-13 09:33:18,384 - Send: N344134 M106 S0*82
2020-07-13 09:33:18,389 - Recv: ok
2020-07-13 09:33:18,393 - Send: N344135 M140 S0*81
2020-07-13 09:33:18,398 - Recv: ok
2020-07-13 09:33:18,401 - Send: N344136 M84*40
2020-07-13 09:33:48,414 - Communication timeout while printing, trying to trigger response from printer. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves.
2020-07-13 09:33:48,417 - Send: N344137 M105*17
2020-07-13 09:34:18,457 - Communication timeout while printing, trying to trigger response from printer. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves.
2020-07-13 09:34:18,466 - Send: N344138 M105*30
2020-07-13 09:34:48,483 - Communication timeout while printing, trying to trigger response from printer. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves.
2020-07-13 09:34:48,486 - Send: N344139 M105*31
2020-07-13 09:35:18,527 - Communication timeout while printing, trying to trigger response from printer. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves.
2020-07-13 09:35:18,533 - Send: N344140 M105*17
2020-07-13 09:35:48,569 - Communication timeout while printing, trying to trigger response from printer. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves.
2020-07-13 09:35:48,578 - Send: N344141 M105*16
2020-07-13 09:36:18,609 - No response from printer after 6 consecutive communication timeouts, considering it dead. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves.
2020-07-13 09:36:18,654 - Changing monitoring state from "Printing" to "Offline (Error: Too many consecutive timeouts, printer still connected and alive?)"
2020-07-13 09:36:18,697 - Connection closed, closing down monitor
2020-07-13 09:46:34,391 - Connecting to: /dev/ttyUSB0
2020-07-13 09:46:34,419 - Changing monitoring state from "Offline" to "Opening serial port"
2020-07-13 09:46:34,430 - Connected to: Serial<id=0x676b00b0, open=True>(port='/dev/ttyUSB0', baudrate=250000, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2020-07-13 09:46:34,432 - Changing monitoring state from "Opening serial port" to "Connecting"
2020-07-13 09:46:34,452 - Send: N0 M110 N0*125
2020-07-13 09:46:35,328 - Recv: start

The full log : https://www.diskiopi.com/downloads/octoprint_logs/serial.log (34 mo)
The full gcode: https://www.diskiopi.com/downloads/octoprint_logs/frame.gcode (10 Mo)
Octoprint version: 1.4.0
Raspberry Pi 3

Thanks !

Your end code assumes that extrusion is in relative mode. The sliced gcode contains only M82 commands, set E absolute.

The last command with an E position in the portion of the gcode generated by the slicer is G1 X197.773 Y246.705 E404.44818 and the first command of your end code
G1 E-10 F300 ;retract filament causes a retraction of 414mm of filament.

Your end code should probably contain an M83 command to change to E relative extrusion. I'm not sure why the comment on G1 F1000 E3 ;retract says retract when the command is extruding 3mm of filament, but that's for you to figure out.

2 Likes

Hello,
Thank you for your answer.
I have tried to add M83 in my gcode. Answer tomorrow ! :wink:

G1 F3000 E398.44818
M140 S0
M83 ;E Relative
G1 E-10 F10 ;retract filament
G91 ;relative positioning

The gcode is just perfect now ! :smile:
thanks a lot !!