Heere is the pause implementation in dev version which I hope you are using as it is the only one we make fixes for.
void SDCard::pausePrint(bool intern) {
if (!sdactive)
return;
sdmode = 2; // finish running line
Printer::setMenuMode(MENU_MODE_PAUSED, true);
#if !defined(DISABLE_PRINTMODE_ON_PAUSE) || DISABLE_PRINTMODE_ON_PAUSE == 1
Printer::setPrinting(false);
#endif
#if NEW_COMMUNICATION
GCodeSource::removeSource(&sdSource);
#endif
if (EVENT_SD_PAUSE_START(intern)) {
if (intern) {
Commands::waitUntilEndOfAllBuffers();
// sdmode = 0; // why ?
Printer::MemoryPosition();
Printer::moveToReal(IGNORE_COORDINATE, IGNORE_COORDINATE,
IGNORE_COORDINATE,
Printer::memoryE - RETRACT_ON_PAUSE,
Printer::maxFeedrate[E_AXIS] / 2);
Printer::moveToParkPosition();
Printer::lastCmdPos[X_AXIS] = Printer::currentPosition[X_AXIS];
Printer::lastCmdPos[Y_AXIS] = Printer::currentPosition[Y_AXIS];
Printer::lastCmdPos[Z_AXIS] = Printer::currentPosition[Z_AXIS];
GCode::executeFString(PSTR(PAUSE_START_COMMANDS));
}
}
EVENT_SD_PAUSE_END(intern);
}
void SDCard::continuePrint(bool intern) {
if (!sd.sdactive)
return;
if (EVENT_SD_CONTINUE_START(intern)) {
if (intern) {
GCode::executeFString(PSTR(PAUSE_END_COMMANDS));
Printer::GoToMemoryPosition(true, true, false, false,
Printer::maxFeedrate[X_AXIS]);
Printer::GoToMemoryPosition(false, false, true, false,
Printer::maxFeedrate[Z_AXIS] / 2.0f);
Printer::GoToMemoryPosition(false, false, false, true,
Printer::maxFeedrate[E_AXIS] / 2.0f);
}
}
EVENT_SD_CONTINUE_END(intern);
#if NEW_COMMUNICATION
GCodeSource::registerSource(&sdSource);
#endif
Printer::setPrinting(true);
Printer::setMenuMode(MENU_MODE_PAUSED, false);
sdmode = 1;
}
You see we
- store position
- retract extruder
- move to park position
- Then execute your gcode from configuration
When continuing we
- run your end command
- go to memorized position
- continue printing
All assuming you are using sd print.
So it will move to the side and if you have a rise command it will raise after park position is reached which I assume is your 0,0. You can instruct also to rise z with park position.
If you need to rise first to prevent drawing on paper you can modify
moveToParkPosition
to rise first and then move to park position. Or set XY park position to IGNORE_COORDINATE which has value 999999 then you do not have the move from going to park position.