I'm reusing the z endstop of my Ender 3 as a filament runout sensor, I already configured the plugin and the sensor is connected to the Pi, and everything works fine, but I want to setup some after-pause and before-resume scripts and I need some help.
These are my current scripts:
M117 Print Paused ; Comment
G91 ; Set to relative positioning mode
G1 F300 Z15 ; Move hotend away from part by 15mm
G1 F9000 X20 Y20 ; Move away from the print
M104 S0 ; standby temperature
G90 ; Set to absolute positioning mode
M117 Print Resumed ; Comment
G91 ; Set to relative positioning mode
M109 S195 ; resume temperature
G1 F9000 X-20 Y-20 ; Move to the print
G1 F300 Z-15 ; Move hotend back down by 15mm
G90 ; Set to absolute positioning mode
What is the problem?
I don't know how to dynamically set the temperature back to where it was without hardcoding a magic number, because I don't always print at 195ºC.
I also like to move the hotend to the 0,0 coord (that's easy G90 G1 X0 Z0
) but then I don't know how to return to the previous position.
What did you already try to solve it?
So I tried using these snippets, and I copypasted afterPrintPaused
and beforePrintResumed
as is to the GCODE Scripts of my OctoPrint settings, but with these scripts, the hotend returns to the proper position in the X and Y but not in the Z, and the hotend doesn't heats before resuming the print.
I believe the problem is that I don't undertand where pause_position
gets the data and where disable_hotends
. disable_bed
and resume_heaters
come from.
Have you tried running in safe mode and if so did it solve the issue?
No.
Complete Logs
I don't think you need logs but here they are anyway.
octoprint (1).log (369.9 KB)
serial (1).log (660.6 KB)
Additional information about your setup
- OctoPrint 1.4.2
- Python 2.7.16
- OctoPi 0.17.0