detect the jam
I use to detect the jam version 2. The printer gets paused well. However, the extruder remains on the model. Adding my code in the event the jam (#define EVENT_JAM_DETECTED {}) I forced him to come to my desired coordinate.
Code:
Extruder::markAllUnjammed();
Printer::setBlockingReceive(true);
Printer::moveToReal(FILAMENTCHANGE_X_POS, FILAMENTCHANGE_Y_POS, IGNORE_COORDINATE,IGNORE_COORDINATE, Printer::homingFeedrate[X_AXIS]);
Commands::waitUntilEndOfAllMoves();
However, the code Printer::setBlockingReceive(true) frieze printer. And withdraw from this state code Printer::setBlockingReceive(false), but if it is used in the event jam , printer comes in filamentchange coordinates, and then goes back to the model. I think in the buffer remain some lines of Gcode. And if you do not use Printer::setBlockingReceive(false), the printer cannot be put out of pause. The question is simple - how to make the printer not go back to the model, and when you pause to Repetier-host returned to the assignment? The screen is not use.
Code:
Extruder::markAllUnjammed();
Printer::setBlockingReceive(true);
Printer::moveToReal(FILAMENTCHANGE_X_POS, FILAMENTCHANGE_Y_POS, IGNORE_COORDINATE,IGNORE_COORDINATE, Printer::homingFeedrate[X_AXIS]);
Commands::waitUntilEndOfAllMoves();
However, the code Printer::setBlockingReceive(true) frieze printer. And withdraw from this state code Printer::setBlockingReceive(false), but if it is used in the event jam , printer comes in filamentchange coordinates, and then goes back to the model. I think in the buffer remain some lines of Gcode. And if you do not use Printer::setBlockingReceive(false), the printer cannot be put out of pause. The question is simple - how to make the printer not go back to the model, and when you pause to Repetier-host returned to the assignment? The screen is not use.
Comments
you see after EVENT_JAM_DETECTED it stores position to memory and goes to filamentchange position.
If you meant JAM_ACTION 2 and not JAM_METHOD then the blocking comes after your code, which might be a problem. Have added a #define EVENT_JAM_DETECTED_END {} which runs at the end of the detection.
Normally the host should in this case move to a save position. Therefore we have host pause gcode section.