Welcome! Log In Create A New Profile

Advanced

TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"

Posted by Dyllan Garcia 
TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 09, 2019 02:32AM
Hi everyone. I just started to setup the tmc2130 drivers in my 3d printer. I use a Mks gen 1.4 motherboard. I have configured Marlin 2.0 and everything needed. The problem is that they don't move any of the axis (motors don't even turn on) and also when I send M122 command, it shows "unknown command". I have to mention I moved by pronterface the axis before configuring them. I'm worried I blowed up the drivers or something. Any Ideas?
Re: TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 09, 2019 02:50AM
Did you enable tmc_debugging in config_adv and did you set the correct stepper driver types in the config?

Edited 1 time(s). Last edit at 12/09/2019 02:50AM by Ohmarinus.


http://www.marinusdebeer.nl/
Re: TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 09, 2019 03:06AM
Hi. Yes the TMC_DEBUG is enabled and also the MONITOR_DRIVER_STATUS. SOFTWARE_DRIVER_ENABLE is disabled. In configuration.h on the driver section I have for both axis X and Y set to TMC2130 too, so I don't know where the problem is. Should pronterface console display something other than "Unknown message" if the spi pins are not configured properly? I'm currently using the pins on AUX3, same as RAMPS 1.4 as I'm not using any LCD controller.
Re: TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 09, 2019 05:07AM
I'm not that experienced with the MKS gen 1.4 boards but could this help you any further?
[adrian.siemieniak.net]

And is "#if HAS_TRINAMIC" enabled in your advanced config?

[www.reddit.com]


http://www.marinusdebeer.nl/
Re: TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 09, 2019 05:08AM
The code is setup so it only activates g-codes you can use

The code says

#if HAS_TRINAMIC
case 122: M122(); break; // M122: Report driver configuration and status
case 906: M906(); break;


otherwise M112 doesn't not exists

The test is
// Test for supported TMC drivers that require advanced configuration
// Does not match standalone configurations
#define HAS_TRINAMIC ( HAS_DRIVER(TMC2130) \
|| HAS_DRIVER(TMC2160) \
|| HAS_DRIVER(TMC2208) \
|| HAS_DRIVER(TMC2209) \
|| HAS_DRIVER(TMC2660) \
|| HAS_DRIVER(TMC5130) \
|| HAS_DRIVER(TMC5160) )


So please cut and paste what your drivers lines say in your configuration.h and paste them here

It should say

#define X_DRIVER_TYPE TMC2130
#define Y_DRIVER_TYPE TMC2130

note the // before the #define have been removed, the TMC must be in upper case and there must be no spaces or any other characters after the TMC and before the number.

Edited 1 time(s). Last edit at 12/09/2019 05:41AM by Dust.
Re: TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 09, 2019 07:07AM
Yes, I have enabled the TMC 2130 type of driver. It is really weird to see the next stuff when I send the M122 command:

SENDING:M122
X Y
Enabled false false
Set current 900 800
RMS current 887 795
MAX current 1251 1121
Run current 28/31 25/31
Hold current 5/31 5/31
CS actual 5/31 5/31
PWM scale 0 0
vsense 1=.18 1=.18
stealthChop true true
msteps 16 16
tstep max max
pwm
threshold
[mm/s]
OT prewarn false false
off time 4 4
blank time 24 24
hysteresis
-end 2 2
-start 1 1
Stallguard thrs 8 8
DRVSTATUS X Y
stallguard
sg_result 0 0
fsactive
stst * *
olb
ola
s2gb
s2ga
otpw
ot
Driver registers:
X 0x80:05:00:00
Y 0x80:05:00:00
Testing X connection... OK
Testing Y connection... OK


And still have absolutely no movement on both X and Y motors, it is really weird I don't feel them tensioning like they were on. Probably a hardware Issue on my new watterrot drivers moody smiley.
Re: TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 09, 2019 09:13AM
check your ends stops with a M119 command. Any that say triggered that aren't is a problem.
Re: TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 09, 2019 01:09PM
Hi. I have verified that and the return Open on both on the axis. Could this be a motor wiring issue? I have been running my printer for some weeks with A4988 and LV8729 without any problems. Also found on watterrot that the motherboard shouldn't be powered by usb alone without the PSU, and doing that could damage the IC. I'm worried that is my case, I didn't connect it to the PSU when setting up the marlin. That is a shame if that is. sad smiley
Re: TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 10, 2019 03:56AM
TMC2130 definitely need 12/24v before they can move stepper motors..

I've never heard of any issues setting up with only usb. (apart from boards that wont take power from usb at all)

You do need to set the vref perhaps 900 and 800 are insufficient for your stepper motors [marlinfw.org]

Stepper motor wiring should be the same as A4988

How about posing some configuration files (in a zip or on pastebin)
And so pictures how how you have it all wired.
Re: TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 10, 2019 04:07AM
Ohhh, yeah, if you didn't connect to the PSU, they show 'false' while connection is 'ok'. Just connect the PSU and try to move them. All good. Just be careful with any operations, always power down the machine before unplugging things or plugging things in.


http://www.marinusdebeer.nl/
Re: TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 11, 2019 03:58PM
If you do power your board from USB, you can't just power up the power supply and have the drivers work correctly. You have to ensure that Marlin knows that the power supply has come online so it can reinitialize the drivers. The normal way to do this is by using the PS_ON pin and enabling PSU_CONTROL in the Marlin configuration. Then you can turn on the power supply with M80 and Marlin will reinitialize your TMC drivers.
Otherwise you will have to manually run M501 after turning on 12V power so that the drivers get the right initialization.
Re: TMC2130 Not Moving. Marlin 2.0. M122 "Unknown command"
December 15, 2019 01:18AM
Thanks for your help guys. Really appreciate it. They started to move when I used Cura monitor tab instead of pronterface (weird behavior) but once they started moving they do the job. They work well now except for sensorless homing, but I will try these days again. Watterott drivers seems to work fine.
Sorry, only registered users may post in this forum.

Click here to login