How to insert a pause in gcode?
I've switched over from Marlin: There, I could insert something like this into my gcode to trigger a pause:
G91 ; Put in relative mode
G1 Z10 ; Lower bed by 10mm
G90 ; Put back in absolute mode
G1 X0 Y0 ; Zero (home) the X & Y
M0 Click To Restart ; Pause and wait for the user
G91 ; Put in relative mode
G1 Z-10 ; Raise the bed back up 10mm
G90 ; Put back in absolute mode
On restart is shoots back to the last spot it was at an keeps printing.
During that pause I'd reload my filament. I know that Repeteir has a reload filament option via the LCD, but it's not currently working for me:http://forum.repetier.com/discussion/2052/lcd-change-filament-doesn-t-return-to-correct-position#latest
Plus, pausing via the LCD isn't accurate: I do prints where I need absolute layer height control over the pause location.
I saw that M0 doesn't seem to be supported by Repetier: Is there something similar available? I have been searching, but haven't found anything.
Again, I don't wan to pause via the LCD or via a front end (S3D or Repetier Host) : I need to insert these surgically into my gcode as needed.
thanks!
Comments
I've tested solution with M226 and encoder click.
It works!
I have ArduinoDue board and encoder click is on Pin 48 so code is:
M226 P48 S0
I'm testing and it looks like:
do not work with g-code pause so it is good with M226 put some commands directly in g-code to move nozzle somewhere to prevent melting. It would be also good to home X/Y before resume.