MANUAL_STEPPER problems

Hello:

So I am having a few problems with my MANUAL_STEPPERs. This is for a clone MMU2. I am using a SKR Mini 2.0 as my MMU2 board. The hardware kit I am using is a FYSETC clone kit and the parts were printed by me.

I am unable to issue a command like this:
MANUAL_STEPPER STEPPER=selector_stepper MOVE=10 SPEED=50 ACCEL=500
Followed by the same/similar command. Nothing seems to happen at all after the second command. The only way I found to make it work was to issue this command:
MANUAL_STEPPER STEPPER=selector_stepper SET_POSITION=0
before every move. I made a macro and custom control that is basically set position to 0 and then move. I can move the stepper motors with no issues like this, although it seems like it shouldn’t be like this. Is it just some limitation in the firmware where we have to set the position to 0 before every move? Or perhaps it is a bug.

To summerize…
In order to move the stepper, I do this (via terminal, macro, or custom control):
MANUAL_STEPPER STEPPER=selector_stepper SET_POSITION=0
MANUAL_STEPPER STEPPER=selector_stepper MOVE=10 SPEED=50 ACCEL=500

MOVE, SPEED, and ACCEL are all variables so I can change those in the custom control.

In order to home the stepper, I do this:
MANUAL_STEPPER STEPPER=selector_stepper SET_POSITION=0
MANUAL_STEPPER STEPPER=selector_stepper MOVE=5 SPEED=50 ACCEL=500
MANUAL_STEPPER STEPPER=selector_stepper SET_POSITION=0
G4 P2000
MANUAL_STEPPER STEPPER=selector_stepper MOVE=-100 STOP_ON_ENDSTOP=1 SPEED=75 ACCEL=500

I’m not sure why the G4 is in there, the homing move is something that kakoa_fr came up with. It isn’t necessary for the terminal command movements for some reason, I can just move the stepper with no pauses.

I have noticed that sometimes if I use the custom control in OctoPrint to move one of the the MANUAL_STEPPERs with STOP_ON_ENDSTOP=1 option, ssometimes it will throw the error:
Failed to home manual_stepper idler_stepper: Timeout during homing

I also get that error if I try to home the stepper just using the command from the terminal, but only if I issue the command without setting the position to 0. The custom control has the position to 0 in the control. Another thing I have noticed is that I can only move in a direction once if the position isn’t set to 0.

One question I did have was is there a way to check the position of a MANUAL_STEPPERA? Like if I tell one of the steppers to move -10, can I check that it actually moved -10? I couldn’t figure out a way to do it, I tried with a macro with “gcode_position:manual_stepper_selector_stepper” but maybe it doesn’t work like that.
M117 Selector Position: { % gcode_position:manual_stepper_selector_stepper% }
That just shows everything within and including the {} on the LCD. It would be nice to see it either on the LCD or even better in the terminal.

Here is a link to my klippy.log file. Hopefully it helps.
https://ghostbin.com/paste/f31sI

1 Like

That’s certainly strange. Be aware that the MOVE parameter is an absolute position, not a relative movement amount. So, if you MOVE=10 then if you want to move another 10mm in the same direction you’d issue MOVE=20.

-Kevin

1 Like

Hello, I’m also having some problems configuring MANUAL_STEPPER, can I ask for your help?

My problem is as follows: I am unable to issue a command like this:
MANUAL_STEPPER STEPPER=selector_stepper MOVE=10 SPEED=5
Nothing seems to happen at all after the first command.
And nothing seems to happen at all after the second command either.
MANUAL_STEPPER STEPPER=selector_stepper SET_POSITION=0

The code I added in the config file to make the stepper motor work is as follows:

[manual_stepper stepper_toolchanger]
step_pin: PD13
dir_pin: !PD12
enable_pin: !PD7
microsteps: 16
rotation_distance: 1

[tmc2208 manual_stepper stepper_toolchanger]
uart_pin: PD11
run_current: 0.800
stealthchop_threshold: 0.5

I’m confused where the bug is?

Try this ?


[gcode_macro MMU_MANUAL_STEPPER]
gcode: 
    {%set p=[] %}
    {% for key in params %}
        {% set p = p.append(key + '=' + params[key])  %}
    {% endfor %}
    {% if printer["gcode_macro VAR_MMU2S"].btt_mmu == 1 %}
#	M400
        MMU_MOVE_STEPPER { p|join(" ") }
#	M400
   {% else %}
        MANUAL_STEPPER { p|join(" ") }
   {% endif %}