1HCL: steppers not moving
-
@tylersuard when using the 1HCL the procedure is typically to home the axis in open loop mode (which has the side effect of enabling the driver, hence no need to run M17 separately), then switch to closed loop mode using M560 Pxx.0 S4.
Of course you need to connect them to the axes in M584 first.
When testing the EXP1HCL firmware I use the following macros. These are for a motor using a quadrature shaft encoder, so you will need to make changes if you are using a magnetic encoder.
; Configure EXP1HCL as the X motor and pretend to home the axis M584 X123.0 M569.7 P123.0 C"brake" V24 M569.1 P123.0 T2 S200 C1000 ; configure quadrature shaft encoder M906 X3000 ; set motor current M569 P123.0 D2 ; set open loop mode M17 X G92 X0 Y0 Z0 ; pretend that all axes have been homed M203 X30000 M201 X5000 ; Switch to closed loop and calibrate G4 P300 M569 P123.0 D4 G4 P300 M569.6 P123.0 V1
-
Thank you for your help @dc42 . I am using the Duet magnetic encoder.
I am getting this error when trying to run the commands:
M569.7 P50.0 C"brake" V24
Error: M569.7: Unknown pin name 'brake' -
@dc42 Also, How do I find out what values to set for M569.1 S? What current should I use for M906?
-
@dc42 I did not find these instructions anywhere in the documentation. Would you mind giving me the exact commands to type in to get my 1HCLs, encoders, and steppers all working?
-
@tylersuard said in 1HCL: steppers not moving:
M569.1 S? What current should I use for M906?
hello, you can find documentation in the G-Code page:
M569.1: https://docs.duet3d.com/User_manual/Reference/Gcodes#m5691-stepper-driver-closed-loop-configuration optional parameter for steps/mm of the stepper
M906 the current of the stepper. This is stepper specific, so you need to look up your stepper documentation: https://docs.duet3d.com/User_manual/Reference/Gcodes#m906-set-motor-currents
and https://docs.duet3d.com/User_manual/Connecting_hardware/Motors_configuring#setting-motor-currents -
@tylersuard said in 1HCL: steppers not moving:
Thank you for your help @dc42 . I am using the Duet magnetic encoder.
I am getting this error when trying to run the commands:
M569.7 P50.0 C"brake" V24
Error: M569.7: Unknown pin name 'brake'Does your motor actually have a brake? if it doesn't, leave that line out.
-
@JoergS5 Thank you. The documentation says:
Tn Encoder type: 0=none (default), 1=linear quadrature encoder plus Duet3D magnetic shaft encoder (RRF 3.5 only), 2=quadrature motor shaft encoder, 3=Duet3D magnetic motor shaft encoder using AS5047D (RRF 3.5 only)I am only using the Duet magnetic motor shaft encoder. I do not know what the AS5047D means. Should I set this parameter as T3?
-
This post is deleted! -
@dc42 @JoergS5 thank you for your help. For anyone finding this later, the commands to set up a Duet3Mini 5+ with magnetic Duet encoders are:
; Configure EXP1HCL as the X motor and pretend to home the axis
M584 X50.0
M569.1 P50.0 T3 S200 ; configure magnetic encoder (try T1?)
M906 X2500 ; set motor current
M569 P50.0 D2 ; set open loop mode
M17 X
G92 X0 Y0 Z0 ; pretend that all axes have been homed
M203 X10800.00
M201 X3000.00; Switch to closed loop and calibrate
G4 P300
M569 P50.0 D4
G4 P300
M569.6 P50.0 V2; Configure EXP1HCL as the Y motor and pretend to home the axis
M584 Y51.0
M569.1 P51.0 T3 S200 ; configure magnetic encoder (try T1?)
M906 Y2500 ; set motor current
M569 P51.0 D2 ; set open loop mode
M17 Y
G92 X0 Y0 Z0 ; pretend that all axes have been homed
M203 Y10800.00
M201 Y3000.00; Switch to closed loop and calibrate
G4 P300
M569 P51.0 D4
G4 P300
M569.6 P51.0 V2 -
@tylersuard said in 1HCL: steppers not moving:
AS5047D
this is a chip name. Every time you see such a name with some letters and numbers, it's probably a special chip which you can search for, in this example https://ams.com/as5047d . You can check the documentation of your encoder which chip it uses or you look onto the encoder board whether one of the chips has a name. If your encoder is accessible and the board visible, you can also make a snapshot and post it to get help. If there is a version number on the board, this is also valuable information.
This page is probably interesting also: https://github.com/Duet3D/Duet3-Magnetic-Encoder
together with the links mentioned in the starting readme page. -
@tylersuard said in 1HCL: steppers not moving:
I am only using the Duet magnetic motor shaft encoder. I do not know what the AS5047D means. Should I set this parameter as T3?
Yes, T3 is correct for the Duet3D magnetic encoder, unless you also have a linear encoder on the axis.
-
@JoergS5 Thank you, this is very helpful
-
@dc42 Thank you for your help! I could not have done it without you.
-
@tylersuard is it working now?
-
@dc42 Yes, the steppers are working now, much quieter than before too.
-
-
-
@tylersuard thanks, I'll mark this as solved.
I have written a draft closed loop motor tuning guide for RRF 3.5 at https://docs.duet3d.com/User_manual/Tuning/Duet_3_1HCL_tuning#manual-tuning-when-using-reprapfirmware-35x.