Skip to content
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

Allow each Z axis stepper to move a different direction, if needed #20678

Merged

Conversation

wilbur4321
Copy link
Contributor

Requirements

This resolves #20677, #10477 and #13470 by adding configuration and code to allow secondary and greater Z steppers to step in a different direction from the primary.

Description

This was implemented in the same was as support for secondary X and Y steppers was implemented, by having configuration settings for "should this stepper be opposite from the first Z stepper?" rather than per-motor like extruders are. This makes the change more localized and means that no existing configurations should be broken.

Benefits

This lets you use polarized wires without moving their pins around, making the wiring easier and look neater.

Configurations

Attached is for four motors and default_envs = BIGTREE_SKR_PRO.
configs.zip

Related Issues

This was built and tested for an Ender 3 Pro / BTT Skr Pro v1.1 / TMC 2208 dual-z configuration. Building was also checked for 1, 3 and 4 stepper motor configurations, but these were of course not tested.

Fix incorrect INVERT_Z3_VS_Z_DIR to be INVERT_Z4_VS_Z_DIR
@thinkyhead
Copy link
Member

But why?? You can simply flip the plug and let the code remain simple.

@sjasonsmith
Copy link
Contributor

With that logic why allow inverting any motor? And please don’t remove the ability to invert motors.

It makes sense to me to treat every motor the same as far as inverting goes.

@wilbur4321
Copy link
Contributor Author

@thinkyhead my pre-purchased motor cables are (a) colored and (b) polarized. I actually had a cable that was modified with a reversible cable for quite a while, and just replaced it because they don't fit quite as well and work loose easier. I could switch the pins around in the JST-PH connector well enough, but -- having the colors in the same order on every single motor makes visually checking wiring a lot easier and is rather important to lots of us with OCD/OCPD/autism.

thinkyhead added a commit to MarlinFirmware/Configurations that referenced this pull request Jan 5, 2021
@thinkyhead
Copy link
Member

Thanks for your explanation. If the plug can't be flipped then it can't be flipped!

@thinkyhead thinkyhead merged commit e3831c1 into MarlinFirmware:bugfix-2.0.x Jan 5, 2021
tharts pushed a commit to tharts/Marlin that referenced this pull request Jan 6, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
susisstrolch pushed a commit to susisstrolch/Marlin that referenced this pull request Jan 8, 2021
… into bugfix-2.0.x

* 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin: (105 commits)
  [cron] Bump distribution date (2021-01-08)
  Fix M48 output (MarlinFirmware#20713)
  Improved MKS Robin support (MarlinFirmware#19333)
  Preheat before Power Loss Recovery homing (MarlinFirmware#20697)
  [cron] Bump distribution date (2021-01-07)
  Custom build_flags by feature (MarlinFirmware#20692)
  [cron] Bump distribution date (2021-01-06)
  Multi-Z stepper inverting (MarlinFirmware#20678)
  Fix Azteeg X3 macro typo (MarlinFirmware#20681)
  Define SANGUINOLOLU 1.1 enable pins (MarlinFirmware#20682)
  No BTN_ENC_EN on Anet 10 (MarlinFirmware#20684)
  Temperature report followup (MarlinFirmware#20687)
  Adjustable precision in M105 temperature report (MarlinFirmware#20602)
  Don't apply hotend_offset.z to Z soft endstops (MarlinFirmware#20675)
  Indent tool_change_prime
  Clarify solenoid active / magnet-on state
  Defer "quiet probing" till the last Z bump (MarlinFirmware#20610)
  Solenoid cleanups
  [cron] Bump distribution date (2021-01-05)
  Remove untranslated strings
  ...
dpreed pushed a commit to dpreed/Marlin_2.0.x that referenced this pull request Feb 5, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
zillarob pushed a commit to zillarob/Marlin that referenced this pull request Feb 25, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
thinkyhead added a commit to thinkyhead/Marlin that referenced this pull request Apr 29, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
thinkyhead added a commit that referenced this pull request Apr 30, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants