-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
Handle steppers with shared enable pins #22784
Conversation
Some boards are designed to share enable pins, and there is nothing to be done about that. If the point is to inform users that It would be much better to give an alert as part of the output of Note that items defined in |
This PR is bringing some … inspiration … because there are some deficits in So, I'm looking at extending Basically, the idea is to allow axis-enable to always set the pin state, but setting flags to The first thing I ran into when starting down this path was Hopefully the final result will not add more complexity to an already challenging area of the codebase. |
This also needs to be tied in with these Config settings. Any that are set true that are shared are an issue... #define DISABLE_INACTIVE_X true
#define DISABLE_INACTIVE_Y true
#define DISABLE_INACTIVE_Z true
#define DISABLE_INACTIVE_I true
#define DISABLE_INACTIVE_J true
#define DISABLE_INACTIVE_K true
#define DISABLE_INACTIVE_E true |
874c693
to
183d831
Compare
497beaa
to
a04a17f
Compare
This seems to be almost a full circle, back to user issuing M17/M18/M84 and Marlin doesn't do it (because enable is shared) but no user feedback is given that it didn't happen. Or why. |
Ok, after much effort this is now producing a proper set of overlap bits and gives a reasonable amount of feedback about overlapping axes in
… gives these command responses…
|
22812a0
to
b88117d
Compare
Himm, testing on a BOARD_SANGUINOLOLU_12 as its really has shared pins
Test 1, looks good
Test 2, X,Y and E0 should be all enabled. from test1
no warnings given Edit: |
The |
…and now it's time for me to get some sleep. I seem to be living on NZ time. |
So your saying that in this example since Y has not been requested to be enabled, we can just ignore that the IO line is toggling. That is rather tricky. |
Done some more testing, seems to work well. |
The current approach does work well. I certainly considered whether it made sense to mark as 'enabled' the other axes that share the same enable pin, but that would have complicated things, especially for internal usage. At this point I'm interested in the question of whether CoreXY, switching extruders, MMU, etc. will behave reasonably when there is overlap. One particular case is #define ENABLE_AXIS_E0() do{ ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); }while(0)
#define DISABLE_AXIS_E0() do{ DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); }while(0) It's probably never going to be the case where this would be used in combination with a setup where E0 shares ENABLE with some other axis, while E1 overlaps with some other axis or has its own pin, so I'm not going to sweat it too much. But special extruders and custom kinematics are certainly something to watch out for. Even now, it's an open question whether Looking over the way I've associated |
The updated code does increase the basic build size a bit, likely due to calling static Sample sizes for a very minimal build:
|
1c9fb62
to
ea051e1
Compare
Moved to a new branch and PR… |
Description
A number of times I have seen issue raised that M17/M18/M84 does not work correctly.
This is due to the hardware physically sharing stepper enable pins.
Added a warning that you cannot individually enable or disable individual steppers when they are on the same enable pin
Requirements
A controller board with shared stepper enable pins such as the Creality v4 series
Benefits
Hopefully stops users submitting bug reports that M17/M18/M84 is broken when they have a controller with shared enabled lines.
Related Issues
#22768