knutwurst / Marlin-2-0-x-Anycubic-i3-MEGA-S

Marlin 2.0.x Version for Anycubic i3 MEGA M/S/P/X/CHIRON and 4MAX with Anycubic TFT or the "new" DGUS Clone TFT - Now also with BLTouch!
GNU General Public License v3.0
782 stars 183 forks source link

Control of motor direction #546

Open elwaspezo opened 4 weeks ago

elwaspezo commented 4 weeks ago

Description

Changing the motor direction from the user interface would be simplest, yet powerfull feature. To be precise: I've switched to dual drive extruder, so I have to change the E motor direction. It's no use.

Feature Workflow

Additional fetures on UI level would do the job...

  1. [First Action]
  2. [Second Action]
  3. [and so on...]

Additional Information

stklcode commented 4 weeks ago

It’s not really the “simplest“ feature. Okay, there’s a common hack to set negative number of steps per unit which should work for the extruder when using units/mm (never tried it). Not for other axis though as it does not cover homing, min/max, etc. Talking about the M92 command that is also used for extruder calibration M92 E-... plus M500 for persistence.

It’s a thing you typically will use exactly once per printer (or once per EEPROM reset), so axis direction in Marlin is a build-time config for good reasons. I guess build your own firmware once or use M92 via console is an acceptable effort for such one-time action and an additional menu not worth the effort.

elwaspezo commented 4 weeks ago

A really quick answer. Thanks!

To be perfectly honest, I thought about negative values, but ... with great concern ("will it 'budge'? Most likely no..."). Now it appears, that it's definetly worth of try. Thanks a lot. As the problem has a common nature, and If the solution is usefull, maybe it's a good idea to place a note in the "FAQ"? (Although it's usefull, reversing the motor plug should be considered as a brute-force practice :) )

elwaspezo commented 4 weeks ago

So far, it's no use (negative values are unacceptable)...

stklcode commented 4 weeks ago

Is it really only the direction you need to change, no other parameter (federate, retracts, etc.)?

You can either enable #define KNUTWURST_BMG which inverts the direction and sets some parameters for BMC (clone) extruders or modify only this section so specify INVERT_E0_DIR https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/blob/c41a85354ac5d83071fe3262d72af7d5c3209b99/Marlin/Configuration.h#L2029-L2033

No idea about your hardware, but my point still holds: an inversion toggle is neither simple (if negative values don’t work here, it’s actually quite a huge task) nor useful for more than one or two people modifying their hardware. So you’re better off learning how to build the firmware (Wiki) and make the changes as required yourself, once in the code.

elwaspezo commented 4 weeks ago

I'm not asking anymore for extra features, just have mentioned, that interesting hack does not work.

I'm skilled enought, to build/compile/recompile AVR software (skilled enough to reimplement AVR in Programable Logic Device, to be honest), but I don't like to modify someone's code without asking the author about possibilities that at specific point of time are unknown and worth of question - and that's what i did.

Thanks a lot, I know what to do.