-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Random loss of MESH settings #3750
Comments
I have seen a couple comments about mesh leveling turning off after a G28 when not all axis are homing. Which is by design, maybe not good but when I was implementing that part it's an open issue what the machine can be expecting the user want. Is doing homing for easy movement or am I homing because the axis is really unknown? Well, that part can definitely be improved. Personally I'd say homing to max endstops and allow homing individual axis would be good to do. I could look into that but... |
Interesting. This is part of why I was also investigating save/restore the mesh with M503 and M421 in #3745 (I'm sure there is some history I'm not aware of the overlap between G29 and M421). In any case, I've been experiencing this loss of the mesh and printing in mid-air. If it's related to non-G28 homing, that makes some sense as the XY and Z home buttons are in OctoPrint, but I don't think there is one to do all axis in one click, so I have been doing both occassionally.. ;) It makes sense if this is due to not knowing where true home is relative to the mesh, but the UI/Pronterface should really show the mesh is magically no longer in effect. |
Hmm, I can't say if this is a homing issue or not. What I can say is that if it isn't homing in all axis with a simple G28, then there is other issues involved. I do not home axes singly. They are always done as a set with a single G28 command, but I will keep an eye out for odd behaviour. What I do find is that if you issue a G29 and MESH isn't in memory it does correctly say mesh is not active. I have never had the MESH settings not restore when issuing an M501 command. |
My problem may be related. It is homing all axis fine and never prints in the air but after a random number of prints the offset moves by itself and prints to close to the bed to extrude filament. Happens even with M501 in start code. After this happens iv even tried a G29 S4 Zx.xx to adjust the offset but it doesnt move the offset at all. Only fix is to rerun bed leveling where it works for a few more prints then reverts to the same issue. |
Hmmm. Sounds really weird. Not sure I'd contribute that to MBL, as it is just an offset that is added to the position the printer think it is at. Doing a
But a sidenote, 2 yrs ago I was testing "raise when travel" or similar feature in Slic3r. Doing this on an old Sells Mendel w/o MBL (not implemented back then). When enabled raised Z/the Nozzle and then lowered it again. This had a weird effect I did not expect because it drifted, so I stopped using that. What My reasoning or expectation back then was that the floating point number calculations in the Z axis wasn't good, and probably really bad for relative movements. I always do a |
I can see that This https://github.com/MarlinFirmware/Marlin/blob/1.1.0-RC6/Marlin/Marlin_main.cpp#L2562 |
Hi epatel, just installed RC6 (previously used RC3) and found with my start config:- I have a RAMBO v1.2 board in a MendelMax-3 printer Regards - Bruce https://forum.e3d-online.com/index.php?threads/marlin-fw-1-1-0-rc6-and-mesh-losing-its-mind.1330/ |
WADZoQUADZ and I are in the same group using RC6 on a Robo3D R1 series. It is basically a Mendel90 clone. Mesh is working perfectly when it works. When I first started using it I removed the G29 command from my startup, because I saw no need to display the MESH values on every print. But then experienced the same issues that he has, either printing too high or not high enough. I got fed up, on one such print and cancelled it during layer 1, then decided to investigate by issuing individual command from OctoPrint terminal, first a G28 which seemed to work perfectly then a G29 which told me MESH was inactive. At that time I didn't think that MESH setting might still be in EEPROM and I redid the MESH procedure. This happened multiple times during the next week and became very tiring redoing a procedure that essentially should not need to be redone if all we are doing is printing. That is at the same time seeing others complain about losing MESH on their printers. We came up with the M501 work around but have found that it too is inconsistent. So that is why I opened a ticket here. We must be close to seeing RC6 either become RC7 or a gold release and this is a real annoyance that needs diagnosis and a solution before that time. As a result of my involvement in the Robo forums we have a willing but small group of dedicated users that are using RC6 properly configured for our printers and using MESH. Any changes made can be tested with us and we will quickly be able to tell the team if they are successful. We also have a very active thread about Marlin 1.1.0 on our forums. If we can get this into RCBugFix I am sure our group can test it there. It only takes me a couple of hours to generate the multiple sets of configuration files for the various revisions of printers that Robo3D all call the R1. |
@WheresWaldo I think i was the only one using 503. That was my initial attempt at viewing and wanting to do save/restore from CLI due to the headaches I was experiencing with mesh not seeming to work consistently. I thought 503 output could be replayed, but then found M421 not working. I had also spent the time to do a very precise mesh level and restored eprom just to do a compare to what it was and then wanted to input the last one back. I ended up doing so by mapping to M29 S3 index based commands. @bruce356 - Is your separate Z and XY homing done there because your z probe is out of bounds at 0,0 or just because you don't want to coast across the print bed to center? That separated homing action is what is triggering the disablement of mesh... |
Hi bdowling, I use an IR sensor and yes when X & Y are at 0,0 the sensor is out of bounds and has nothing to sense but air. I therefore then move X & Y so that the IR sensor is over the center of my bed and then initiate homing of Z. |
@epatel at the end of G28 should you be checking for axis_homed across all three rather than home_all_axis was done in one shot? Would seem to support the cases in the wild where folks do their homing independently for various reasons. https://github.com/MarlinFirmware/Marlin/blob/RC/Marlin/Marlin_main.cpp#L2863 Edit: of course you'd need to also keep track of mbl wa_ active in the MBL object across calls to G28 in that case. |
@bdowling It might or it might not be that simple. Is it really safe turning MBL on and off at any point? Maybe it is, but I haven't thought through all those special cases. i.e. only homing a single axis independent of the others. By homing all axis we (I) am sure that we are at a "known" position. In this case I wanted to be on the safe side first. When I added MBL the first time I was hoping to get it in and then be able to improve it after people started to use it. But the process just to get it in the repo the first time I had to have long discussions about the ins and outs and people not seeing its worth or believe it was good for Marlin. Even questioning the code size (though it obviously is very short). I did try to improve it a couple if times later but those times also required long discussion so those improvements never got in. They did get in recently now in RC when I created a PR again (MBL being more interesting these days I guess) #3232 I see this and another thing that could definitely be looked into for MBL
Why I not just do it, is that I'd like to think through its effects, to be sure it will behave as expected. Well, for title topic I have no answers. MBL is in its implementation very simple and there are so few places that turns it on/off so either there is another (i.e severe pointer bug) or something thats makes the printer take a path that turns MBL off. The places to look for is |
I would so like to see @Roxy-3DPrintBoard's changes working and integrated. That's the one thing holding me back from trying this feature and continuing to use ABL instead. |
@bdowling If I don't misinterpret you, this line https://github.com/MarlinFirmware/Marlin/blob/RC/Marlin/Marlin_main.cpp#L3975 actually require all axis to be homed for ABL, and the comment above also says so, see https://github.com/MarlinFirmware/Marlin/blob/RC/Marlin/Marlin_main.cpp#L3968
|
@epatel -- Yes exactly, I understand why you want to insure that all axis have been recently homed for MBL to be enabled, it's a good safety check. Using the axis_homed[] array test establishes that for you. People have reason to do independent G28 as has been shown by the bug reports. !(X && Y && Z) reads cleaner in my view. There are also a number of places that this test occurs in the code -- perhaps there should be a ALL_AXIS_HOMED MACRO or simple function applied and used in those cases? I think part of the problem that is not clear to me yet -- haven't dug into it -- is what is the behavior when MBL is disabled? With MBL compiled in, there's really no z_offset setting? so I'm not clear I understand where the heads end up on Z in relation to the bed. e.g. is it Safer? or is this why some are seeing head crashes? |
@bdowling No offset setting? No not really, MBL is basically an adaptive offset over the whole bed. So it all depends of the probed points what the "offset" is in each probed point and then MBL interpolates between those points. MBL has the |
Yes, but when mbl.active == false. What does it fallback to using as an offset? |
@bdowling Offset when MBL is disabled? Nothing = 0, so it depends on where the nozzle happen to be (or we can call this the hw coordinate system) |
Something is amiss here with this as well.. M501 G28 Z ; force mbl to disable ; Nozzle is further (~1.5mm) from bed than when MBL is enabled. Also Note: Even when MBL is active, I can set G0 Z-4 to crash the heads into the deck (unless I dock them first). |
@bdowling I am trying to make sense of the code. Lets break it down. These lines https://github.com/MarlinFirmware/Marlin/blob/RC/Marlin/Marlin_main.cpp#L2862-L2876 will only take effect if MBL is enabled (compiled in) and will be enabled (active) after these lines has been executed, homing-all-axis. So, But, it is used on line 2628 https://github.com/MarlinFirmware/Marlin/blob/RC/Marlin/Marlin_main.cpp#L2628 and set on line 2646 Well, just a theory. To validate you could for a test hard code two different values at those lines and see what value |
Maybe the better condition is to ask if all axes are homed now, instead of which axes we ordered to home in this
|
@Blue-Marlin Not sure that will work, say you didn't home |
??? |
Hi, I've also noticed that the mesh is lost after homing not all axes in RC6. |
@winxi01 why do we need special handling of short-term mesh settings? If they are good, save them to eeprom. You can reactivate mesh from eeprom with: G28 ; home I'm going to be testing some of the other suggestions for not disabling mesh provided the global homing states are good, add this seems like a crux cause to some issues being seen in the wild. |
Unfortunately, |
@WheresWaldo Could you perhaps have some "End G-code" (i.e. Slic3r) that might do a |
@epatel Yes that was it, my end gcode had a G28 X0 which seems to turn it off and remove the mesh from memory. I will switch this to a G1 X0 instead. Still, why would there be a need to turn the MESH off? Especially since every job usually starts with a G28 to home all axes. |
@WheresWaldo It's one of those safety precautions. I haven't thought through the ins and outs of a single axis homing case and my gut feeling is that it can be edge cases that could cause it all to get shifted. Maybe it is simple maybe it's not. I haven't had time to think that though (and I haven't had my dev system setup for Marlin in a long time) Will try to do that now. Would you like to be my tester for this? Rationale for turning MBL off is because a |
@epatel As I mentioned earlier, I have a willing group of about four or five people that are convinced MESH is the best leveling method for our machines. I would be happy to test code to make MESH more robust. |
Sorry, I did not mean to close this as it is still in need of resolving. I hit the wrong button. |
@WheresWaldo OK, I'll start to look into making this. Make it possible to home axis separately. Did some thinking about it today and it might be special cases are only homing Z or not Z. Need to get the logic right. And right now I think home Z is basically what we have and I hope not homing Z do not require any math/offsets. |
@epatel I already have a few people interested in testing this. |
@WheresWaldo Yesterday I started chisel out a path to do this. Looks like I will need to run a couple tests on my own machine first just to figure out a couple things. So hopefully I can get to it this weekend. |
@WheresWaldo Finally got around setting up my printer for testing this. So the code I have for you to test right now is here https://github.com/epatel/Marlin/commits/marlin/g28_single_axises It is a clean config so you need to apply all your own configs. I added the I also added a I also tried to fix so the display will show the correct Z just after a |
@epatel I downloaded your code this morning and created some easy to follow instructions on the Robo3D forum for the few of us there to test. It includes instructions on replacing the default configuration files with ones appropriate for all flavors of the Robo3D R1 printers that exist. We should have a few testing it by this evening. The particular post is located here: http://community.robo3d.com/index.php?threads/marlin-firmware-upgrade-1-1-0-release-candidate-6-for-r1-r1-plus.5806/page-25#post-76965 |
@epatel I have been testing all evening with your patch and cannot make MESH fail in any normal usage scenarios. I also really like the true position after homing display. It actually works the way I always expected my printer to work. I will see if there is more feedback on the Robo forums tomorrow. |
@WheresWaldo Great to hear, I'll look into making a PR into RCBugFix |
@WheresWaldo Created PR here #3835 a couple of commits between previous test and this + minor tweaks to fix the conflicts that appeared. Would be great if you could test this too. |
MBL: Keep active when homing single axes (#3750)
My symptoms have gone away and no longer manifest themselves with RCBugFix from a few days ago. As far as my portion of this discussion, it can be closed. Short: Tested and working. |
@WheresWaldo Yes, It seems to have been merged now. So you may close it I think. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
There are a bunch of us using RC6 on the Robo3D forums and they have all gradually been moving to MESH bed leveling. All of us have seen strange behaviour that we cannot duplicate on a consistent basis. We do not even know how to make it happen. The issue is:
After performing the MESH routine, either on LCD screens or in terminal mode and then saving memory locations to EEPROM, we can all get a handful of prints that work perfectly. After a period of time a subsequent print will not print properly and upon investigation it is discovered that MESH is no longer enabled.
It can usually be restored by adding M501 to the start up gcode. Typical start up code will contain G28 followed by G29 (very useful to see if MESH is enabled). Most of us have made an adjustment to add M501 between the G28 and G29 commands. It does not appear to be 100% reliable. This is spread across several users, some with printers that stay on 24/7 (like mine) and others that are completely shut off between printing sessions.
We are at a loss to figure out why MESH leveling exhibits this behaviour and thought opening a ticket, despite having little details as to the circumstances might be the best approach to resolving this issue.
The text was updated successfully, but these errors were encountered: