-
-
Notifications
You must be signed in to change notification settings - Fork 19.5k
FT_MOTION : updating last_direction_bits for Core printer solves homing failure #26720
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
FT_MOTION : updating last_direction_bits for Core printer solves homing failure #26720
Conversation
Regarding |
Homing depends on being able to distinguish that a move is occurring in a particular axis, not just with a particular stepper. For Marlin standard Core kinematics motion we set Meanwhile, The solution is to fill in the It should be possible to add more bit flags to There might be other features apart from endstop checking that depend on |
We could possibly set the move and direction flags for |
@thinkyhead , as the directions are valid until the end of block processing, we could probably set the corresponding fields in |
As long as there's no "pre-fetching" going on that should work. With standard Marlin motion the next block is always fetched after the previous one has completed its STEP pulses. It would be possible for FT Motion to fetch the next block and start adding STEP/DIR events to its own command queue as soon as there's space available in its buffer, even if the block hasn't completed processing yet —which could provide improved continuity— but I wasn't sure if it was already doing that. |
That being the case, do we really need to include DIR information in the FT Motion command buffer, or could the DIR pins also be set just once when the new block is fetched? I gather that including both the DIR and STEP in the same buffer potentially allows for less delay, but most stepper drivers require a delay in-between changing DIR and starting the next STEP anyway. |
9c65146
to
4f65466
Compare
After some testing, when homing, there are only 3 consecutive loaded blocks per axis :
|
57e2c77
to
f8eb712
Compare
I am currently running last bugfix with this PR plus all the new Marlincollaborative code (with very minor changes) and an adapted FT_MOTION menu. Motions are fine, sensorless homing is working, BLTouch HS mode too, printing is OK with or without shaping. |
Thanks narno. Was just passing through to see where this PR was up to. Got a CoreXY here that doesn't play nice with current input shaping. |
I have been doing some testing to resolve endstops [homing] issues and am going to propose the following as a solution. This is a timer based method that sets the axis movement end time when the block gets loaded by considering the movement time and time it takes the block to get converted and propagate through FTM's buffers. It requires some changes to endstops.cpp but is otherwise fairly clean. I also tried a method that watches the FTM stepper(), similar to how refreshAxisDidMove() used to work. However, it did not play nicely with endstop interrupts. In particular, for the case when a block is loaded with motion away from an endstop that is already activated, commands has not yet propagated to the buffer stepper() is using, and the initial endstop check fails as there is no indication the axis is moving. The endstop isn't checked again since it's invoked only on pin change interrupt, so the axis grinds. All this to say we ultimately need checks when the block is loaded, or need to force endstop polling (which is what an earlier version of FTM used to do). The timer based method doesn't impact stepper() runtime at all, and works with the endstop interrupts feature. I pushed it here since I'm working on top of some other changes/features to FTM, but the delta for this commit should be useful for your consideration. I have tested it working on a few printers:
*Tested HS_MODE as well. |
I update my fork and will test the changes. |
@ulendoalex , I have tested your changes and everything seems to work fine. I still believe that there's no need to use |
I just went ahead and cherry-picked e589e859d8de7da0ba8da01af2c188536625fd26 and adjusted the code. Do all the reversions and changes from that single commit apply? Let's retain the changes that make sense to get things stabilized and working and we can merge this for further optimization in additional PRs. |
9be947b
to
41f4419
Compare
I test it after adding the missing code, each axis move well in only in one direction, the opposite doesn't move at all. Previous code is working well for me as the code in #26848 |
Got this working on my sensorless CoreXY last night. Took a couple of "restore to defaults" to get everything behaving properly, and had to bump the buffer up ~2.5x to prevent misbehaviour on long, fast G0 moves.:
Still trying a few tweaks. |
@narno2202 — If you have a patch, please add it. I figured some of those reverted sections were inappropriate. We just need to decide which ones to keep and which to discard. Once we have that part sorted out, maybe this will be good to merge (?) for wider testing. |
A couple of queries. What are the ramifications to buffer size and printer behaviour if I change that number (and the corresponding FTM_TS)? And what do I need to consider when changing these. There is also an obvious maximum buffer size that on my machine (Octopus Pro 429) comes in at around: When I try those values I start seeing stuttering on moves. Is that simply running out of memory or something else? |
Due to some sad familial problem, i am not very focused on Marlin these past days and for some days in the future. I will continue to check the repository. @thinkyhead , i don't have any patch for the described issue. I think that the new buffer management system is better than the current one. PR #26848 is a mix between last @ulendoalex code and the last working code of this PR. I'm still thinking that if Temperature ISR polling is enough to check endstops in case of disaster once the printer has homed (motions are in theory constrained within the bed size), so we can use |
I want to go ahead and merge our current work for further refinement. We still mark this "experimental," but it is reaching the point of being good enough for common usage. We'll continue to tune those configuration defaults as well and provide good defaults for our existing example machines. Thank you to all contributors for your attention and I hope that things are going better for everyone! |
Co-authored-by: Scott Lahteine <[email protected]> Co-authored-by: Ulendo Alex <[email protected]>
Description
Some users report homing failure with
FT_MOTION
enabled and a CoreXY printer. This PR just disableFT_MOTION
in G28 when the printer is Core printer. Despite testing no reliable solution has been found, disabling FT_MOTION is just a workaround for now.Requirements
Benefits
Solve #26683
Configurations
Related Issues