MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.26k stars 19.23k forks source link

[FR] TMC_HOME_PHASE adjustable values from the menu #20391

Open yodor opened 3 years ago

yodor commented 3 years ago

Description

Hello, thanks for making the 'TMC Homing stepper phase' feature available. I started to use it recently but from time to time it triggers the warning like "Selected home phase too close to endstop trigger phase. Pick a different phase for". And this means edit values in source and re-upload the firmware again. As there is already a submenu for TMC Drivers, (Configuration->Advanced Settings->TMC Drivers) would it be possible for an additional submenu "Phase Adjust/Home Phase" where user can pick up the values for each axis by using the LCD and the rotary switch.

Feature Workflow

  1. Go to Configuration->Advanced Settings->TMC Drivers
  2. Select 'Home Phase' submenu
  3. Select one of (X.Y.Z axis) and then adjust the current homing phase value using the LCD rotary switch. (as it is for selecting the power for the drivers)
qwewer0 commented 3 years ago

While it is a good idea to have on the fly (gcode and/or menu item) way to modify the TMC Homing stepper phase values, but I'm not sure if the increased (I assume) firmware size would worth it, as for 2-3 axes it isn't too hard to get the right phase with a few firmware flashes.

yodor commented 3 years ago

Well, for deltas are for sure 3 :). But also some of the newer 32-bit boards need sd-card to update the fw. Also for new builders / new machines this might need more than few times. On the other side 2.0 branch already can not fit into some of the 8 bit boards so I'm not sure how much size of fw is issue anymore. I would not mind to assist in preping a pull-request, just thought some more experienced with marling code would do it faster.

Portzal commented 3 years ago

I have been meaning to ask a question on this option. I have it enabled on 2 printers, (cartesian and corexy) and I have noticed on occasion I get a warning, "selected home phase 640 to close to endstop trigger phase 584. pick a different phase for Y" but not every home. I have adjusted the numbers, but still get intermittent warnings. I have it disabled for Z.

qwewer0 commented 3 years ago

@Portzal I think that could mean a few things, like unreliable endstop switches, endstop noise, not properly tightened belts, maybe skipped steps, or more. But this is best to discus on the marlin discord.

Portzal commented 3 years ago

@qwewer0 I feel like my experience relates to the original request, could it be a bug as opposed to needing to be adjusted by g code? I have sensor less homing enabled on both printers, belts are tensioned correctly and I have no indication of missed steps on either printer.

qwewer0 commented 3 years ago

@Portzal Sensor less homing is the "unreliable endstop switch"

jaymemaurice commented 2 years ago

If not a menu, can we at least get an option to home to the nearest full stop? It seems like a gcode or menu here would be far better use of resources than RGB LED control