Notifications
Clear all

Slicer G Code  

  RSS
Retired
(@retired)
Eminent Member
Slicer G Code

What is the Slicer G code for PAUSE? I want to stop the print at a specified Z height to insert something.

Posted : 23/01/2020 11:01 pm
Area51
(@area51)
Member
RE: Slicer G Code

M601 - Pause print

G-codes for Prusa Marlin can be found here: https://prusa3d.github.io/Prusa-Firmware-Doc/group__GCodes.html

Have a look at my models on Printables.com 😉

Posted : 24/01/2020 12:50 am
Retired
(@retired)
Eminent Member
Topic starter answered:
RE: Slicer G Code

Thanks for your help.

 

Harley

Posted : 24/01/2020 5:35 pm
Sembazuru
(@sembazuru)
Prominent Member
RE: Slicer G Code

The code that I use is a little more complex than the simple M601. I haven't used an M601 yet so I don't know how the Prusa firmware responds to that command. (For all I know, it is just as good as my code snippet... I haven't taken the time to experiment yet.)

Here is the code snippet that I put into the custom "Before layer change G-code":

{if layer_z==4.20}; Change this to the intended height of the pause
M400 ; wait for movement buffer to empty
M300 ; beep
M104 S0; Turn off extruder heater to avoid too much oozing
; code snippet originally Prusa forums joantabb here: https://forum.prusa3d.com/forum/original-prusa-i3-mk2-s-others-archive/pause-print-in-gcode/#post-125758
G1 X10.000 Y200.000 E0; parking position GET THE PRUSA TO STICK IT'S TONGUE OUT! (edited to revise Y coordinate)
M400; wait for bed to stop moving
M300; beep again
M84; disable motors (may not be necessary)
M0; user stop, execution will continue with the next line once the user presses the select button on the printer
M104 S[temperature]; Start re-heating the extruder but don't pause code execution.
G28 X Y; Home X and Y (only) to correct for accidentally moved bed or extruder (it is assumed Z didn't move because that is a harder axis to manually move).
M109; wait for the nozzle to return to printing temperature
{endif}

I disable the motors in my code so if I don't get to the printer right away then the motors aren't using energy to hold position both saving a little electricity and allowing the motors to cool down.

I haven't played with the 2.2.0 alpha releases yet to see if my multi-line block of g-code will work in the new "insert g-code at specified layer" feature. I probably should try so if it doesn't I have a chance to submit a bug report/feature request before 2.2.0 becomes finalized...

See my (limited) designs on:
Printables - https://www.printables.com/@Sembazuru
Thingiverse - https://www.thingiverse.com/Sembazuru/designs

Posted : 24/01/2020 6:15 pm
Retired
(@retired)
Eminent Member
Topic starter answered:
RE: Slicer G Code

Thanks for your help I forgot about the beep which would be good. If you shut off the motors you would be able to move the extruder and bed around?

Harley

Posted : 24/01/2020 11:31 pm
Sembazuru
(@sembazuru)
Prominent Member
RE: Slicer G Code
Posted by: @kelsey-harley

Thanks for your help I forgot about the beep which would be good. If you shut off the motors you would be able to move the extruder and bed around?

Harley

Yes the extruder and bed are moveable. That is why I home the x and y after the print resumes. I don't home on the z axis because I'm fairly confident that moving the z is difficult enough to do by hand and I didn't want to risk hitting a tall print with the x axis gantry. My experience using this is the y does get moved easily when inserting objects, especially if there is a tight fit.

See my (limited) designs on:
Printables - https://www.printables.com/@Sembazuru
Thingiverse - https://www.thingiverse.com/Sembazuru/designs

Posted : 25/01/2020 1:28 am
Share: