-
-
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
LIN_ADVANCE freeze #5699
Comments
Can you lower your print speed, say to 35mm/s…? |
I think the print/move speed may cause it, I am experiencing the same issue. Not sure what's going on. It's not happening with RC8BugFix branch |
@mottihoresh there is no branch "RC8BugFix" - do you mean the code base tagged with "1.1.0-RC8"? @nzinov can you post the gcode section +- some lines around the start point where it freezes? A test with a low speed as the noted 35mm/s can't hurt also, maybe it helps to find the reason for it. If somebody knows other issues mentioning such a behaviour, please give me a hint on them. |
@Sebastianv650 Meant to write RCBugFix (https://github.com/MarlinFirmware/Marlin/tree/RCBugFix) I actually spend couple of hours yesterday reading through the issue log. my best guest of what is going on is that the ATMega MCU just chokes since it's trying to process data too fast. I got non print moves at 160mm/s, and 32 steps per minute, using the new bilinear bed leveling, print speed are at 60 or 80mm/s. When reducing the global feedrate to 50% i noticed no issues, however as soon as I switched it back to 100% the MCU entered panic mode and restarted. I think this issue may be related: My configuration file: https://gist.github.com/mottihoresh/5f51c1d6c07d75c918992125b4e952ea |
@Sebastianv650 here is the begining of my g-code
I am going to test lowering print speed a bit later. At this moment my issue is not quite like @mottihoresh. He says the MCU is restarted while in my case it apparently is doing a good job of maintaining temperature even after freeze. |
I'm also thinking we have two independent problems here. So your printer is freezing after this line: Then I don't think it's the print speed, F1440 is 24mm/s which is already really low. I have two problems: No knowledge about Marlin code related to bed leveling (as far as I know, your G29 means you are using it) and no knowledge about delta code handling. What happens if you try a print without bed leveling, is this possible? If yes, it would be interesting to know if it works without bed leveling and if yes, does it also work with |
@Sebastianv650 I've tried printing with bed-leveling turned off. Now it makes two circles of skirt with extruder producing strange noise (can't tell for sure but maybe step skip) and then stops in the same manner. Freezes outputting "busy: processing" not responding to commands from host (unfortunately I don't own an LCD) |
@nzinov If you turn off LIN_ADVANCE, I guess you don't have the issue? right? If lowering the step resolution resolves this issue, then I think it certainly has to do with draining the CPU, and thus failure at some point.... |
@psavva Yes, without LIN_ADVANCE I have no issues (multi-hour prints went OK). I use Polulu drivers, so 1/16 steps max. Here lies my configuration: https://gist.github.com/nzinov/ea6544ce3df78a9438c81bf9b1a435a3. Besides, I really doubt that CPU would fail to calculate moves but still happily chat to console and handle temperature |
I will try to provide you a modified stepper or planner file in the next 1-2 days that outputs some debug data for each move. That should help to find the error. |
@Sebastianv650 OK, looking forward to it.) |
I'm having a very similar problem. Sending I don't have a LCD, so I'm not quite sure what is happening with the firmware. Help debugging would be appreciated. Additionally, my extruder motor gets very hot during the resulting fugue state, and sending M112 doesn't seem to have an effect. |
I've been playing around with various things, and the problem seems to be VERY weird. Some general printer information: And here is the start G-Code that caused the problem:
No amount of manually entering commands allowed me to recreate the problem. However, if I started the print with
It seems like the culprit could be one of the following:
Disabling retraction in Slic3r also removes the problem code. However, I don't think that's the root cause. |
@Sebastianv650 I've been poking through planner.cpp getting an idea how LIN_ADVANCE works. The method Planner::_set_position_mm seems to reset the position[] array. However, position_float is only updated after a move has taken place, using
There may also be other gaps similar to this. Looking through the file, there's a lot of places where |
I don't think that's a problem, but I can't say that for 100% because I don't know where all that set_position things are called. According to some comments, they are used for homing, probing and such things. That would mean they will not be active during the main print. I'm still having no idea where this problem comes from. Even with a gcode from another TAZ 5 that produces this issue, I can't reproduce it on my TAZ 5. It seems to be a very specific problem that happens only with specific configs combined with specific numbers in the gcode. |
Sebastian, I have solved most of my issues with RCBUGFIX and it was mostly hardware related. I had a bad enclosure connector on my heated bed cable and the silicone heater was going bad as well. Crazy to have two problems so closely related. Anyway I have a new silicone heater and I am running the cables (power and thermistor for the bed) direct into the RAMBO with no breaks. This is actually amazingly good as I think I was getting some serious losses in power and accuracy with the two standard breaks (Enclosure connector and at the bed) that the Taz 5 has in this line. My bed has never heated so fast or been this stable. So I may have had a balky enclosure connector from day1 Anyway long story short I still get a freeze in printing from time to time (pretty rare though). Other than that lin advance and Rcbugfix are working great and producing the best prints I've ever gotten. The freeze is bizarre though, the printer just sits there, heat still going to the extruder and bed, lcd screen reading normally, just zero movement. Just happened again last night for the first time in weeks, printing in PLA. It seems to happen on large complex models. Maybe just because they take so long. Never have any trouble with small prints. |
Glad to hear that at least some problems were hardware dependent! When it freezes, is the LCD menu also functional, meaning it's possible to enter and navigate through it? If yes I will continue searching around the stepper ISR handler. |
I had to cycle power to get the extruder off the part (to use the prepare menu move z axis) so the LCD screen was not responsive to the dial control. The extruder and heat bed were still at temperature though, and the LCD screen looked normal in every respect and it was still reading the thermistor temps as well as x y and z coordinates which lined up with where the extruder was approximately (I didn't actually measure just by eye). |
I still have no real answer, but you might try the following with a code that usualy crashes: Inside void Stepper::ISRhandler(), comment out the lines containing sei() and cli(). This will undo some ISR handling changes I did to Marlin. You might see a lot of serial communication errors this way, so you might print at a lower serial baud rate for this test. Second option: Undo the changes from above, but add a cli(); just above SBI(TIMSK0, OCIE0B); at the end of void Temperature::isr(). Both changes are "a shot in the dark" if my translator was able to translate what I mean ;-) But at least it's better than nothing.. |
I only print from SD card never from USB. |
Sebastian I believe I have isolated the freeze problem. If I stop a print prematurely from the LCD panel and restart the job without cycling power to the RAMBO, the printer will ultimately freeze mid print at some point. It also cause odd sudden drops in the extruder temp and bed temp readings. None of this behavior occurs if I simply start the printer and print a job. Stopping the print from the LCD panel seems to cause a whole host of problems with RCBUGFIX. All of this is just what I have observed in using the firmware, I can't prove any of it since I can't code. I hope this puts you on the right path to find out why lin_adv freezes a print job sometimes. |
Thanks, i will try to reproduce that! |
I started a print from SD card, let it run for a minute or so and then aborted it. How long should it take until the freeze? As there is nothing "counting up" within the stepper or advance code, I have no idea why it should behave different when I let it run longer.. |
I think there's probably some merit to the point that |
I thought I only doubled the position array by the position_float thing. It looks like I have to dig into the code again and compare what both of them are doing once more. |
@billyd60 Can you try this branch and see if it solves for example your print from SD -> abort & restart problem? It's RCBugFix + a commit that should cleanup all position <> position_float things. If it works better now, I would create a PR. |
Hi Sebastian been away from my computer for awhile. Yes I will try it tonight or tomorrow. Regarding the sudden drops in the measured thermistor temps (after an lcd panel stop print command and restart) it appears as though the code is "losing track" of the actual readings from the thermistors (Bed and extruder) periodically. Ultimately I believe the temperature drops so low that it may trigger cold extrusion protection. This is just a guess though. Btw this behavior sometimes takes a few hours to show up (both the odd temperature drops and print freeze). So it is quite difficult to reproduce. This suggests a very slow build up of the problem. Perhaps some kind of additive floating point problem that takes tens of thousands of iterations to show up? Again this behavior never happens on my printer without an LCD stop print command and then restart without cycling power. As long as I turn on the printer, and execute a print job without cancelling it, I have never had a print fail. I just completed a 9.5 hour print job with Rcbugfix and it was flawless. |
Do I need to use your config and adv.h files and change them for the Taz 5 or can I just use my current config and _adv.h files I am currently using for Rcbugfix? I really don't feel like doing all that editing again... |
My two PR are not changing the config files. Depending on how old your current ones are, you might be able to copy and paste them. I would open your current one and the maybe newer RCBugFix one in notepad++ and use the compare function to see if there are structural changes. If not, just use the old ones. |
I have gone ahead and re-tested it. No Luck... :( I have inputted the factor directly in the firmware, and did not use the GCODE. The first problem I noticed is that the very short moves did not extrude properly. After cranking up the FR to 200%, the Printer froze just like it did before... Serial Monitor Output is here: echo: Last Updated: 2016-12-06 12:00 | Author: (none, default config) X:340.00 Y:290.00 Z:11.86 E:0.00 Count X:54400 Y:46400 Z:8480 |
Can you copy&paste the line you entered in configuration_adv.h together with the values you used for calculation? |
#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) #define LIN_ADVANCE_E_D_RATIO 0.039912 // The calculated ratio (or 0) according to the formula W * H / ((D / 2) ^ 2 * PI) I had used the same Values as before, on the same model: GIT Revision Used: (Today 05 March @ 13:00 20addc6 ) Note: Just removed comments to unclog the post |
The ratio is OK. Whatever is causing your under extrusion in detail, this is usualy a symptom of a completely wrong pressure correction. If it's worse than without LIN_ADVANCE enabled at all, the corrections (K and / or the ratio) is much too high. If it's a bit better than without LIN_ADVANCE enabled at all, the corrections is too low. I guess you did all your K calibration with Cura, meaning K could be off now with the "fixed" workaround. |
I'll give it a go from start to end. |
I confirm the issue is resolved. |
@thinkyhead, Please close this issue, as it seems I cannot |
Thanks for your patience @psavva,this issue was a long one! |
Yes, much lower... I'm on 75 now, but am calibrating it further. |
When you found your new k value, it would be good to know if the fixed ratio option is still needed for crash free operation :-) |
Had what seems to be the same issue, even with a fixed E/D ratio set. Freezes, and busy:processing sent forever. Tried debugging, stepper::isr stops getting called at this point. That would explain why it's frozen, but I don't know why it's not being called. Not made much more progress than that as getting it to freeze involved doing a dry run of a print and waiting 15 minutes. |
Patch which fixes the freezing but increases the code size by quite a bit. Can probably be made better by someone more familiar with marlin. https://gist.github.com/nallar/d08bd86ec4210ea36d1e4ab824e0e4e5 Problem was that ADV_RATE could return extreme values. 0 would mean advance_isr would be ran every time, and isr would never get called. ADV_NEVER when it shouldn't be would cause advance_isr to not run when it should. Both of these would cause it to stop moving. |
I'm curious, what's your microstepping and step/mm settings? I don't think ADV_NEVER is a real world problem, but you are right about the 0 result. In fact I spent quite some time thinking about a good solution, without finding one as can be seen in the code. The problem is, as soon as we get a 0 or another nearly 0 value we are over-utilizing the system. Basicaly we can't do LIN_ADVANCE at this point. Real solutions might be to reduce acceleration or jerk, maybe lower the microstepping. Or find ways to live with lower K values. Stopping the print or shutting down LIN_ADVANCE by setting K=0 might ruin the non-finished print and is therefore also no good solution. The only real solution I'm aware of is something I can't do with my knowledge at the moment. It would require a rewrite of the planner. Instead of determining a leading axis (axis with most steps to do) and forcing all other axis to follow, we would need to check if the extruder is able to follow with pressure adoption in mind. This would mean to estimate the maximum extruder speed that will occure due to the pressure correction and if it's too high, reduce acceleration until the maximum speed is inside the limits. In the end, if you can test you changes for some time and you are not seeing other problems, it might be the best option we have at the moment. If other people have this issue, please test it too. |
That makes sense. I'm using quite a high steps/mm for the extruder of 912. I should drop it to 16x microstepping. This issue only occurred occasionally on one part of a print where my slicer made very tight zigzags with lots of small segments. It didn't happen with most prints. I think for now changing it to return 1 instead of 0 is the least bad option as it prevents a confusing freeze and a ruined print. |
If it's working, you could create a PR for this. There are only some small things that should be changed:
The code size is only +84 bytes, I think that's no problem! |
Don't be afraid to drop the microstepping. It doesn't buy you anything as to positional accuracy but it does quiet down the system. |
Fix #5699 - LIN_ADVANCE freeze when ADV_RATE returns 0
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. |
I am running d3cb1a8 on delta. When I try to print with
LIN_ADVANCE
uncommented, printer moves to the start point, then extruder produces some noise for ~1sec and then printing completely stops. Hotend led is blinking at changing rate as usual - so firmware is not crashed at that moment. However, it only outputsbusy: processing
into console and is not responding to any commands. Any tips on debugging that?The text was updated successfully, but these errors were encountered: