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.
Beides a corrupt SD card that stores worng bits, leading to absurd commands, it's also possible that ithers parts in the Creatin of the file are compromised:
This can for example happen if the card is removed during writing - but in this case it should be mostly an incomplete file on importing into an interpreter.
More a random distribution of bad commands would appear if the writing process in itself is faulty, for example if the SD Port is defect or the adapter hast a error. Another way that writing can fail is if the drivers for the SD card adapter/port are corrupted.
To detect a bad file or corrupted card is possible by re-importing the G-Code into a slicer (for example CURA allows this) and look at the tool paths. If any port does this with any card, software is to blame: See if it persists after a driver update (rare!) and a reinstall of the slicer. If it fails in one port but works in a different the port or adapter might bei at fault and might need replacement. If it is endemic to one card, this one is corrupt and to be thrown out. If it is endemic to a single file, overwrite it with a new one - sometimes writing fails for reasons that are almost impossible to understand.
If the file&card are fine but read wrongly at the printer, then the card reader in the printer or the board are to blame.