If you have a 3D printer, like an Ender 3, and use PrusaSlicer to generate the G-code, you may have noticed strange behavior when changing filament with the M600 command. After making the change, you might see an extra layer being printed that shouldn't be there, known as a ghost layer. This happens because, before executing the M600 command, the slicer generates an extra movement that doesn't align well with the current layer's Z position.
Why does this happen?
What happens is that PrusaSlicer, before executing the filament change, moves the printer's printhead to a safe position. During this process, it performs a filament retraction and ensures everything is in place for the new filament. The problem is that this extra movement can cause the printer to skip an already completed layer, resulting in it printing a ghost layer when it resumes.
How can you fix it?
Check the retraction settings in PrusaSlicer:
Go to the retraction settings and disable the "Retract before layer change" option. This should prevent the unnecessary movement before executing M600.
Adjust the M600 parameters in PrusaSlicer:
In PrusaSlicer's advanced settings, review how it handles filament changes. Make sure it doesn't perform additional movements before executing M600, to prevent the printer from printing a ghost layer.
Edit the G-code manually:
If you don't want to modify the configuration every time, you can edit the generated G-code to remove those extra movements and avoid the ghost layer. Although it's a manual solution, it can be useful for avoiding short-term problems.
Keep Marlin and PrusaSlicer updated:
Make sure you are using the latest versions of PrusaSlicer and Marlin, as updates often include improvements and fixes for this type of issue.
In summary:
The ghost layer problem is common when using the M600 command in PrusaSlicer, but it has a solution. By adjusting some parameters in the slicer or editing the G-code, you can prevent the printer from printing unnecessary layers. If you have more questions or find other solutions, feel free to share them here so we can all learn.