Printer randomly moves to home during printing, then resumes as normal
During printing, my printer occasionally makes some mystery moves: it will very slowly move either the X or Y axis all the way to the left/front, before very slowly moving back to its original position and resuming the print as normal. I've checked my G-code files, and the moves are definitely not part of the G-code. What could be causing this?
I'm printing from an SD card on a Cartesian printer.
Which Firmware(Marlin,..)? Which printer(Cartesian, delta,..)? Extensions(Out of Filament sensor,..) ? Source of G-Codes (Printing from SD Card or from Serial interface)? Sounds like the printer is pausing the print. Causes might be no G-Codes (Slow serial connection) or some other signal(Out of filament sensor triggering)
The question is tagged marlin. I've edited the question to include where I'm printing from. I don't have a filament sensor.
The issue was due to a corrupt SD-card, which was occasionally having some garbage read from it. It turns out that Marlin will try interpret a corrupt move command like
G0 X1q3.54and still read as many numbers as it can. In this example, it would be interpreted as
G0 X1rather than (as might have been intended)
This explains my symptoms perfectly:
X and Y always moved to (approximately) their home positions, but it was always only one of them (it's quite unlikely that both moves are corrupted).
Z was not affected because Z moves are much rarer in the G-code (only on layer change) and thus it was very unlikely that a Z move would be affected.
E was not affected since a request to move E to near 0 would be prevented by Marlin's long extrusion prevention.
Eurgh! I don't like that Marlin does that. Interesting find, though. Would love to know how you figured that out.