Resuming a print
Hi all,
So I made a resume.g file that looks like this:
When I execute all these commands manually by using the Arduino serial monitor it works fine and it does actually resume the correct way. When I let the printer execute the resume.g file by itself, it fails miserably. I think it has something to do with starting a file while already running a file. I'm not with the printer now but the next thing I'm going to change the M24 command to:
So I made a resume.g file that looks like this:
M104 T1 S190.00 M190 S70.00 M140 T1 S190.00 G28 XY T1 M106 S0 G92 E0 G1 E13.5 F F150 G92 E24.81 G1 X319.449 Y176.961 F4000 G92 Z0.400 M23 Tube-Flanged-PLA-R-0,8-ITOMEC.gcode M26 S32396 M24
case 24: //M24 - Start SD print sd.stopPrint(); sd.startPrint(); break;Maybe the sd.stopPrint will help. If not, then I'm open for suggestions
Comments
is not possible if PSTR has a meaning to read from flash.
Otherwise the solution is good for your use case.
However I run into some problem now. All seems to works fine and dandy. After stopping a print, the resume.g file gets created and can be started through the newly introduced menu entry. However the printer freezes after that. It prints to the UI display that is it homing itself and then just stops. On the serial monitor it says busy:processing. At first I thought it had something to do with the heaters since I use M109 and M190 and that the printer can't do anything until temperatures are reached and for testing/time purposes I am not going to wait 5 minutes before stopping a print. I found that it cannot be the temperatures since this even goes on after the printer reached its desired temperatures. I started isolating the error by putting Serial.println("Alive."); in different locations and found that the culprit was setHoming(true); in printer.cpp at line 1153. This function is properly executed but the code after that isn't executed, not even a serial.println:
https://github.com/Anteino/Repetier-Firmware/blob/500XL-Minimal/src/ArduinoDUE/Repetier/Printer.cpp
Note that the Serial.println("Alive.") after setHoming(true) has already been removed.
[EDIT]
After waiting for forever, the printer actually finishes its stopping procedure. Could it be that since it wasn't printing yet the printing speed is still (close to) zero and that it moves so slow that you couldn't notice it? I'd assume that homing should always work since there is a fixed speed for that. Also, this wouldn't explain why the code fails at setHoming(true);