Step motor speed

Hello,

I am not using Klipper, I am using Marlin to control my system. I have nema17 step motor. I searched and discuss this on Marlin forums but no luck. If this problem about Marlin I will try Klipper but I am not sure is this issue about motor or Marlin ?

I am making autofocus operation it is like hill climb search. I am taking a frame after motor stop then i move motor then capture frame. My routine is like that. But every 1 micrometer takes 0.1 second (100ms) so if i do this operation 10 time then time will be 1 second.

My stepper drive is TMC2209, control card MKS Robin Nano v3.0

I tried with different feedrate, accelariton value but none of them worked, final result is 0.1 second

My question: Is this 0.1 sec time to move 1 micrometer normal ? Maybe motor fast but Marlin M400 command give me 0.1 second

Is step motor has this capabilties for example finishing 1 micrometer move in 10 miliseconds ?

Here is my simple timing script:

device.serial.write("G91\n".encode())
while 1:
    data = device.serial.readline()
    if data == b"ok\n":
        break

s=time.perf_counter()
for i in range(25):
    device.serial.write(b"G1 Z0.001\n") # move up 1 micrometer (0.001 mm)
    device.serial.write(b"M400\n")      # wait for current move finish
    c = 0
    while 1:
        data = device.serial.readline()
        print(data)
        if data== b'ok\n':
            c += 1
        if c == 2:  # "ok" message will return after "G1 Z0.001" and "M400" command
            break
print(time.perf_counter()-s)

Here is also M503 command

SENDING:M503
echo:; Linear Units:
echo:  G21 ; (mm)
echo:; Temperature Units:
echo:  M149 C ; Units in Celsius
echo:; Steps per unit:
echo:  M92 X12800.00 Y12800.00 Z12800.00
echo:; Max feedrates (units/s):
echo:  M203 X1200.00 Y1200.00 Z1200.00
echo:; Max Acceleration (units/s2):
echo:  M201 X60.00 Y60.00 Z60.00
echo:; Acceleration (units/s2) (P<print-accel> R<retract-accel> T<travel-accel>):
echo:  M204 P60.00 R60.00 T60.00
echo:; Advanced (B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> X<max_jerk> Y<max_jerk> Z<max_jerk>):
echo:  M205 B20000.00 S0.00 T0.00 X0.30 Y0.30 Z0.30
echo:; Home offset:
echo:  M206 X0.00 Y0.00 Z0.00
echo:; Stepper driver current:
echo:  M906 X1200 Y1200 Z1200
echo:  M906 I1 X1200 Y1200
echo:; Driver stepping mode:
echo:  M569 S1 X Y Z
echo:  M569 S1 I1 X Y
echo:; Backlash compensation:
echo:  M425 F1.00 X0.00 Y0.00 Z0.00

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.