prusa3d / Prusa-Firmware

Firmware for Original Prusa i3 3D printer by PrusaResearch
GNU General Public License v3.0
1.99k stars 1.05k forks source link

[QUESTION] Mesh leveling (G81) status after G28 W #4688

Closed scmanjarrez closed 1 month ago

scmanjarrez commented 1 month ago

Hi, I'm the developer of the octoprint plugin SmartABL. I have some users reporting that the mesh status isn't reported anymore after running G28 W. Can you help me understanding how exactly the G28-G80-G81 triplet works?

Thanks to the user @jmickelin I kind of understand it, but I'm still missing some nuances. In simple words, my plugin reads the gcode of a print, if ABL code is detected, my plugin analyzes based on a heuristic if the gcode should be forwarded or discarded. The way to detect that is using G81, but after running G28 W, subsequents G81 return the message Mesh bed leveling not active.. Why G28 W disables the mesh status? Isn't W parameter something along the line "not use mesh leveling so I can send G80 later to run that"? Shouldn't it return the current state of the mesh before sending G80?

3d-gussner commented 1 month ago

@scmanjarrez On the MK2/s, MK2.5/S and MK3/S/+ the G28 W will perform homing Without MBL, See Note 2 of G28

After homing X and/or Y only the MBL is still active, as soon you home Z the MBL has to be performed again.

In my personal opinion the time the printer needs to run the MBL is so short compared to the total print time that it should not be removed.

In upcoming FW 3.14.0 we introduce a "smart" MBL like we have on the 32-bit printers. A small print will not probe 7x7 (49) points but only the needed points around the print. Which can reduce the MBL time quite a bit, of course only when the print is smaller than the total bed area. This may then also be an issue with your SmartABL plugin as the bed won't be scanned completely anymore.

Hope that answers your question.

scmanjarrez commented 1 month ago

Thank you very much for your thorough explanation, this sheds light into my understanding of G28.

From my side, I provide the users a way to disable the plugin logic so they are always in control of the MBL, it was thought for the use case of fast prints where MBL would take more time that the print itself (and the difference in mesh wouldn't be noticeable). Ps: Your comment about smart MBL would certainly be a case to be taken into account.

3d-gussner commented 1 month ago

@scmanjarrez Glad to answer your question and make it bit more clear.