-
Notifications
You must be signed in to change notification settings - Fork 311
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
Regression of #4631: support spiral lift with timelapse gcode and multi-color prints #4848
base: master
Are you sure you want to change the base?
Conversation
The existing implementation did only read the new Z position from the injected timelapse_gcode and flagged the position as unsafe because of this. This change reads X, Y and Z pos from the timelapgse_gcode and will keep the position state correct to enable safety checks required for using spiral Z hop. Because of this, spiral Z hop can be used everyhwere now. The same pattern is also applied for layer_change/toolhead gcode injection. The set_current_position_clear method is unused but will be kept in implementation for future scenarios.
@ziehmon Thank you very much for continuing to work on fixing this PR. I think we could discuss a more general approach to fix the issue
|
@ziehmon, I submitted a PR for OrcaSlicer to revert the modifications until the corrected modification has been tested. |
Thank you! I think SoftFever already reverted it |
@XunZhangBambu my pleasure, thank you for your support and review! I absolutely agree. There are better approaches. The question is, how to implement them? From my perspective, we should do it in three steps.
Step 3. requires Step 2. to work properly. I think I could implement all three of them. However, I might need some time. Do you think, Step 1. is safe enough to begin with, and we ensure 2. and 3. in a separate Pull Request? Or are you concerned we might not catch other cases where the position is unknown? |
@ziehmon I think we can start from the third step. What needs to be done in the third step is to add detection of the hotbed boundary in the travel_to_xyz function. This should be the safest and simplest modification. |
@ziehmon Finding a safe position in all circumstances for the timelapse G-code will be quite complex and requires careful consideration. |
I agree, but one challenge: the Implementing the detection after the Do you have any idea how to solve this? |
Does Prusa Slicer have the spiral glitch? How do they handle this? |
I don't think so. This is purely an implementation issue caused by user configurable gcode injections. I can think of different approaches to fix this, but of course we're looking for the easiest and most effective one. I am looking forward to the answer from @XunZhangBambu since I might be overlooking something. |
@XunZhangBambu may I ask you to review my comment? This is a fundamental problem from my understanding. |
@ziehmon Of course ! The injected G-code is provided internally by us, we will ensure that the movements do not exceed the physical limits of the machine. So we only need to check the movements generated by code. By the way, we are also internally exploring ways to ensure that even if the injected G-code is skipped, the correct nozzle position can still be obtained after executing the injected G-code and this will take some time. |
@XunZhangBambu thank you for your reply. I think we misunderstood each other, so let me summarize:
Please excuse me, but that does not make any sense to me.
The cause of the out of bounds move on #4631 is the unexpected and inconsistent filament change gcode position and validating it is very challenging since the layer processing is done when injections happen. |
@tsmith35 may I ask for your opinion on this? I think you had a close look at the code too. |
I am also willing to jump on a discord call or whatever you would prefer, myself and a lot of other people would like to see this fixed and are willing to contribute but we need to agree on an approach. /cc @lanewei120 |
@ziehmon could you send your discord account to our email ([email protected]) |
@ziehmon From my perspective, checking the inserted G-code still doesn't seem to solve this issue. Because in the slicing software, you are not certain whether the inserted G-code will definitely be executed, similar to timelapse G-code. I believe that by inserting a secure movement command (that cannot be skipped) at each unskippable part of such G-code, we can ensure that we obtain the correct position of the nozzle after executing the inserted G-code. |
Hi @XunZhangBambu! Please excuse my late reply, I was on vacation. 🌤️ I really like your proposed solution. It is simple to implement, safe and maintainable. I will implement it in next days. We don't need a discord call then. Testing the change will probably be a lot of work but we have a great solution then. Thanks for thinking about this again! :) |
@ziehmon I have both an A1 (with AMS lite) and A1 mini (also with AMS lite), so that may help! Did you ever get any testing machines? |
@tsmith35 you're faster than light. I will definitely come back to your offer for testing with AMS Lite. Unfortunately, I didn't receive an AMS Lite from Bambu, I assume it wasn't approved which is okay. It was a nice thought at least. Maybe they can test on their print farm though. |
@ziehmon I added a PR #5219 just a few minutes ago. It adds a "move to safe position" to each wipe instance during filament changes for each of the A1 and A1 mini 0.4 machine profiles. I don't see a downside to returning to X0 after each such wipe instance during filament changes, since not returning to X0 can have unexpected consequences. Will you take a look? Thanks. |
Simon is doing a world of good, so he is quite deserving of some test-bed
equipment. I applaud you for assisting. It's a win-win.
Tom
…On Wed, Nov 13, 2024 at 7:41 PM SaltWei ***@***.***> wrote:
I am also willing to jump on a discord call or whatever you would prefer,
myself and a lot of other people would like to see this fixed and are
willing to contribute but we need to agree on an approach.
Hello, @ziehmon <https://github.com/ziehmon> Do you remember when I
mentioned that I would help you with AMS Lite or a discount coupon? I sent
you an email separately to discuss this matter, but it seems that your
GitHub email is unable to receive emails.
—
Reply to this email directly, view it on GitHub
<#4848 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2UJVPKTS3R6HSKFYJ4AHL2AP5WDAVCNFSM6AAAAABOR4OQQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZVGE3TQNBZGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello @ziehmon . Is this your email ? [email protected]. |
Hi @SaltWei! I received the email and just answered it, forgot to put you in CC. Thank you very much for reaching out! 🫶 |
My pleasure! |
Context
This is a regression of the previous pull request #4631, which had to be reverted due to bugs when used with multi-color/AMS Lite prints.
Cause
At the print sequence, where the described bug was happening, there is a difference between printing multi-filament with AMS Lite and printing single-filament:
Without multi-filament (so, without AMS Lite), the position before the Z hop for the layer change is executed, is
X=0.00
. This is set in "Timelapse G-Code" and will be executed as last step after the picture is taken. Other movements in the "Timelapse G-Code" exist too, but they also use a safe position, even though notx=0.0000
(e.g. for nozzle clumping detection).But with multi-color (so, with AMS Lite), the position before the Z hop for the layer change is executed, is
X=-48.2
. This is set in "Change Filament G-Code" and is the last movement of the "wipe and shake" mechanism. That "wipe and shake" happens either after changing filament, and/or after extrusion calibration:Solution
The cause of the bug raises two questions:
Why was there no check if the printer is moving out ouf the physical boundaries?
Answer: there is no boundary check implemented when the spiral Z hop gets executed. This is where the check is supposed to be done:
How can we solve the problem?
Implementation
For a multi-filament/AMS Lite print, there are two scenarios where we need to set a safe position afterwards:
The change is the same for both scenarios - the safe position just needs to be set in different sections of "Change Filament G-Code":
Before, without a safe position (
X=-48.2
):Afterwards, with a safe position (
X=0.00
):Result after implementation of bugfix:
Summary
Additionally to the previous, included PR, this MR changes the
change_filament_gcode
(in GUI: "Change filament G-Code") for A1 and A1 Mini printers to set the postion safe (X=0.00
) after filament was changed in two different scenarios.This bugfix does not apply to anything else than A1 or A1 Mini. The original Z hop fix did not change behavior of other printers like P1S or X1C (non I3-Structure).
Test-cases
Lesson learned - the testing was not sufficient last time. I came up with the following test cases to make sure, we don't have another bug. Personally, I can only cover A1 test-cases without AMS Lite. Maybe Bambu Lab can test it at scale on their print farm.
Appendix