Welcome! Log In Create A New Profile

Advanced

Pausing a print through gcode in Pronterface

Posted by Ralf 
Pausing a print through gcode in Pronterface
June 28, 2014 01:57AM
I'm experimenting a bit with embedding things inside printed parts, and to do that I need to pause the print, at a speficic layer height.

Hitting the bause button in Pronterface does pause the print, but it is difficult to predict, when exactly the printer pauses, since the printer is buffering up commands, and needs to empty this buffer before it stops printing.

M226 is silently ignored by Pronterface, it would probably work, if I printed from the SD card.

Currently I am splitting the gcode in 2 files, this works, but it's a pain.

Any other options which I have overlooked?
Re: Pausing a print through gcode in Pronterface
June 28, 2014 02:28AM
The Issue is not pronterface. It does absolutely nothing with an M226 command except pass it off to the firmware. The firmware is what us ignoring the command. What firmware are you running? Marlin? If so check out the g code reference here for the M0 and M1 commands.

Incidentally, your firmware is always a bit ahead of the host program because it needs to be able to see the upcoming commands for its planning. It has a buffer to slow it to do so. This is why whenever you hit pause it takes a while to actually pause. The printer needs to execute the commands in its buffer that were send ahead of the pause.
Re: Pausing a print through gcode in Pronterface
June 28, 2014 04:41AM
I am running Marlin latest and gratest.

Problem with M1 is that Pronterface continues to send gcode, thus it will immediately wake up the printer again.

From reading the wiki on gcodes, Pronterface should imho be aware of M226, and stop sending commands to the printer, until the operator pressed the resume button:
Initiates a pause in the same way as if the pause button is pressed. That is, program execution is stopped and the printer waits for user interaction.
This matches the behaviour of M1 in the NIST RS274NGC G-code standard and M0 in Marlin firmware.
Ofcourse if the printer actually paused when M226 was received, the buffer would just fill up and the printer would stop sending acknowledgements to the host program, until the printer resumed, but how would the host program be able to wake up the printer again, if the gcode buffer was full..?!

But reading the source I can see that Marlin actually wants a pin and a state, so maybe I could just use one of the endstops as a trigger.
Re: Pausing a print through gcode in Pronterface
June 28, 2014 10:07AM
Quote
Ralf
I'm experimenting a bit with embedding things inside printed parts, and to do that I need to pause the print, at a speficic layer height.
.
.
.
Any other options which I have overlooked?

If you do your slicing with Cura, there is a plugin that inserts a pause at a certain layer height into the G-code.....
Re: Pausing a print through gcode in Pronterface
June 28, 2014 12:44PM
Do you have an LCD control panel? I believe M0 pauses until you push the encoder on the LCD panel. So the subsequent commands firm pronterface will buffer, but they won't wake it up.
Re: Pausing a print through gcode in Pronterface
June 28, 2014 04:42PM
I don't have a LCD, and M0 seem to have no effect when printing via the serial port.
I normally use Slic3r, but tested the Pause at height plugin in Cura, but this also uses M0 so this wouldn't work either.

I made it work with M226 Pxx, using one of my endstops as trigger to continue the print. But per default Marlin doesn't allow you to use a endstop for M226, so I had to hack the firmware a bit.

Thanks for the input.
Re: Pausing a print through gcode in Pronterface
February 19, 2015 12:46AM
SOLVED !! for CURA !!!


SOLUTION !!!:


This (the attached file) is a verrsion I made modifing the original plug-in. I use it with CURA.
Modify the content of your PauseAtZ plug-in in the folder ...\Cura_6.2\plugins

This version Instead of waiting on a parking spot forever, it goes to the parking spot and then moves to a secondary point as many times as specified in the field "Move from pointA to pointB (times)"
Once it has moved all the times specified from the parking spot to the secondary point it goes on with the object printing.

Good Luck !!


Derli at derliferreira@gmail.com
Attachments:
open | download - PauseAtZ.py (2.5 KB)
Sorry, only registered users may post in this forum.

Click here to login