Need a bit of advice about pause g code

What is the problem?

at the moment i am using the (after print paused script )

{% if pause_position.x is not none %}
; relative XYZE
G91
M83

; retract filament, move Z slightly upwards
G1 Z+5 E-5 F4500

; absolute XYZE
M82
G90

; move to a safe rest position, adjust as necessary
G1 X0 Y0
{% endif %}

but i would like the bed to come forward , instead of going backwards ,
i cant wrap my head around how to achieve it so any help would be greatly appreciated
thanks
martin

Here you set the max Y value of the bed for Y

; move to a safe rest position, adjust as necessary
G1 X0 Ymax
1 Like

hi thanks for that ive changed it to G1 X0 Y180
and it moves to where i want it on pause ,
unfortunately when it is resumed it moves to the right spot but does not drop back down and prints in mid air , any suggestions would be great .
thanks
martin

in you resume script you need to move back down 5mm in z.

G91
G1 Z-5
G90

hi where abouts in the script, does it matter where i put it ,

; relative extruder
M83

; prime nozzle
G1 E-5 F4500
G1 E5 F4500
G1 E5 F4500

; absolute E
M82

; absolute XYZ
G90

; reset E
G92 E{{ pause_position.e }}

; move back to pause position XYZ
G1 X{{ pause_position.x }} Y{{ pause_position.y }} Z{{ pause_position.z }} F4500

; reset to feed rate before pause if available
{% if pause_position.f is not none %}G1 F{{ pause_position.f }}{% endif %}
{% endif %}

Actually this line should be putting it back to original position when paused.

any ideas why it wouldn't,

octoprint-systeminfo-20240430140242.zip (94.0 KB)

thanks
martin

I've tried using creality slicer and pause is working great so i guess its my new best friend , lol
martin

If you figure out what command it sends to the printer you can probably do the same command in other slicers for pause.

hi i wouldn't know how to figure that out ,
thanks
martin

I thought octoprint would send the same message to the printer when i click the pause button no matter what the slicer is .

no, pause is handled differently from firmware vs OctoPrint pause. Pause in gcode added by your slicer would give a specific pause command to the printer to handle everything. You can open your gcode file in a text editor and go to the layer where you added a pause and see if you see anything. A common command would be M600 for filament change.

hi i didn't add anything in the slicer to pause at all,
i just hit pause in octoprint in my browser

That's even more confusing then. There should be no difference then based on the slicer.

join the club I'm permanently confused lol.
for the last week or so when i press pause in the browser on octoprint it paused lifted up and moved out of the way, but when it came to pressing resume in the browser on octoprint it moved back to where it left off did not not drop down and started printing mid air ,
if i used prusaslicer it would do a similar thing but as well as not dropping down it would have retracted about 30mm on pause for some reason , its been driving me crazy (well more than usual ) but yesterday it started working great with gcode from creality slicer so i assumed there must be something different in the creality slicer script?.
martin
martin