Slicer G Code  

  RSS
kelsey.harley
(@kelsey-harley)
Active Member

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)
Reputable Member

M601 - Pause print

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

Take a look at my designs on Thingiverse or on PrusaPrinters ;)...
Posted : 24/01/2020 12:50 am
kelsey.harley
(@kelsey-harley)
Active Member

Thanks for your help.

 

Harley

Posted : 24/01/2020 5:35 pm
Sembazuru
(@sembazuru)
Honorable Member

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.prusaprinters.org/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...

This post was modified 2 months ago by Sembazuru
See my (limited) designs on:
PrusaPrinters - https://www.prusaprinters.org/social/1448-sembazuru/prints
Thingiverse - https://www.thingiverse.com/Sembazuru/designs...
Posted : 24/01/2020 6:15 pm
kelsey.harley
(@kelsey-harley)
Active Member

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)
Honorable Member
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.

This post was modified 2 months ago by Sembazuru
See my (limited) designs on:
PrusaPrinters - https://www.prusaprinters.org/social/1448-sembazuru/prints
Thingiverse - https://www.thingiverse.com/Sembazuru/designs...
Posted : 25/01/2020 1:28 am
Share:

Please Login or Register