Endscript starts before job is finished
Hey, i use a Gcode of the repetier server after a print.
the code activates a relais to shut down the printer.
It is only: @execute P1off
This works but it shuts down the printer before the gcode has been finished.
This is the end of my code:
G1 X167.505 Y111.331 E0.0504
G92 E0
G1 E-0.7500 F2500
M117 Layer end
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G91
G1 Z30 F4000
G90
G1 X0 Y295 F4000 ; move finished print out front
M84 ; disable motors
M106 S0 ; turn off cooling fan
G92 E0
G1 E-0.7500 F2500
M117 Layer end
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G91
G1 Z30 F4000
G90
G1 X0 Y295 F4000 ; move finished print out front
M84 ; disable motors
M106 S0 ; turn off cooling fan
@execute seem to start before the printer comes to this line:
G1 X0 Y295 F4000 ; move finished print out front
Is this a bug?
Comments
@syncMotion
before the @execute and server will add so many dummy wait for end of motion commands that all is executed before the command gets executed.
You should also add a M400 before M104 S0 so moves get finished first and then extruder gets disabled. Printer has a move buffer which is loosely independent of commands being executed in printer as well.