-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MBL print area #4183
MBL print area #4183
Conversation
In order to use the feature, change the G80 call in the slicer startup script to this:
MBL 7x7 must also be enabled on the printer. Otherwise, the entire bed will be probed with 3x3. |
ff558d2
to
75d5d56
Compare
I pushed a lot of changes to the PR. I fixed the point counter behavior. It now computes in advance how many points will be probed, so it no longer skips the counter on the status screen. Commands I use for testing:
Useful tool for visualizing the bed data. Dump the mesh with G81. Beware that the Y axis is flipped: |
Marked it as ready for review. Don't really have anything else I'd like to change besides maybe some optimizations here and there. Functionality wise, everything seems to be working fine. I still need to test how MBL performs with no Z calibration data. All other tests were performed on two printers: MK3S+_MMU3 and MK2.5_MMU2SR. |
Up to date video of a centered small 3x3 mesh. Counter works fine, first point is no longer measured. Still a bit disappointed that the superpinda needs to slow down on certain points due to the higher hysteresis. Pinda V2 would not have those slowdowns as is the case on the MK2.5 printer. IMG_1233.MOV |
Hello. Very nice work. It would be good to remove the return to Home, at the end of leveling. |
@ojrik Thank you. I need to keep the return to origin for backwards compatibility with old gcodes. But I understand it could be a useful setting to disable somehow if the purge line is printed next to the object. I'm thinking I could add an "O<0,1>" parameter to specify if return to origin is needed after G80, with a default of 1. Still need to think about the implications of this. |
Nice thought. |
@ojrik I added the
I'm surprised the PR can be rebased so easily onto 3.12. In any case this PR is for 3.14 at the earliest since the 3.13 release is already packed full of changes. Thank you also for testing the PR on your printers. Feedback is greatly appreciated. Do you mind if you also post the G81 output from both printers of the commands listed in this comment? #4183 (comment). I want to see how closely the mesh saved in eeprom matches the real hardware. Also, did you perform Z/XYZ calibration recently on any of those printers? |
Do you mean something like this? |
Yes, something like that. I'm also interested in |
Zadal som príkaz G80 N7 O0 W, potom G81 my vyšlo toto. Recv: 0.12000 0.11556 0.11222 0.11000 0.10889 0.10889 0.11000 |
Wow, your printer is considerably straighter than mine :). |
cold |
I use Prusa Leveling Guide in Octoprint to set BED. |
MK2.5S Test |
Oy. That's one bent bed 😅. Does this PR help with rechecks during MBL? Both 7x7 and 3x3. In my case on the MK2.5, the points on the last row always had to be rechecked. With this PR, those issues were gone for me. Is this also the case for you? |
I rarely use MK2.5S, I just tested your PR with FIRMWARE 3.12.2, FW 3.13.0, I don't have FW for MMU2S |
If all goes well, the new MMU firmware should be released at the end of this month. You can still use FW 3.13.0 on your printer, but you have to disable the MMU in settings |
I know that, I tried that too, I have it adjusted according to this PR. |
I use Visual Studio Code. With FW3.13.0 I have some problems compiling. MK2.5S date 1970-01-01, languages not applicable. MK3S also date, and some small things in FW. But that's a small point. |
The compile date is intentional. It's done like this so that the FW build is consistent, so if you build now and again later, the same compiled hex will be output. The build server should use the correct time and date, so those builds are not affected. |
Change in memory: Flash: -12 bytes SRAM: 0 bytes
Those constrains on t and s were useless. flash: -294
flash: -112
flash: -6 sram: 0? (somehow)
Flash: +80 SRAM: +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on MK404 and real printer
@@ -4957,29 +4858,26 @@ void process_commands() | |||
Default 3x3 grid can be changed on MK2.5/s and MK3/s to 7x7 grid. | |||
#### Usage | |||
|
|||
G80 [ N | R | V | L | R | F | B ] | |||
G80 [ N | R | L | R | F | B | X | Y | W | H ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed I forgot to add O
here
Clean up mesh definitions that where made obsolete by prusa3d#4183
Clean up mesh definitions that where made obsolete by prusa3d#4183
Clean up mesh definitions that where made obsolete by prusa3d#4183
@leptun Log with "G80 C0 N3":
Log with "G80 C1 N3":
|
C0 is not a valid parameter. Only C >= 1 is allowed. The first probing try is always discarded. That's why C1 probes twice. That initial probe is used for detecting deviations only afaik. In any case, this PR didn't touch that part of the code. |
👍 Thanks for the info! |
🚧 Add new MBL message for #4183 and translation
Fyi, PrusaSlicer 2.7.0-alpha1 now has the updated startup gcode for the MK3/S/+ and MK2.5/S variants to make use of the MBL print area feature. |
Similar implementation of the print area UBL from the Buddy firmware, but instead of using
M555
for defining the print area,G80
uses additional parameters. TheG80
print area is defined withX
,Y
,W
andH
, just like withM555
. If the print area is not specified, the whole bed is probed. Gcode future and backward compatibility is maintained since old firmware will ignore these extra parameters.With this PR, if a print area is provided, the 7x7 MBL will only probe those points. This results in a quicker, precise MBL where precision is needed. Besides the print area probed points, the rest of the 7x7 mesh uses interpolation of the data sorted in eeprom during Z calibration so that the toolhead can safely exit the print area and not cause a nozzle crash with a warped bed.
Tasks after merge
kill(PSTR("Mesh bed leveling failed. Please run Z calibration."));
)O
inG80 [ N | R | L | R | F | B | X | Y | W | H ]
listIMG_1223.MOV
IMG_1227.MOV
In case the 3x3 mesh in eeprom from Z calibration is missing/invalid, the 3x3 points are also probed besides the print area:
IMG_1221.MOV
Another interesting feature enabled by this PR is the ability to load and activate the mesh stored in eeprom without probing any point
(besides point 0). This can be achieved withG80 W
since it results in the print area being completely outside the bed.Closes #3224