M23CL Setup Issue
-
I am facing an issue getting a new M23CL motor to calibrate/move. I have attached pictures with the sequential commands I ran on this motor.
Following these same commands, I successfully set up two other motors using the same cables/connectors/setup, just swapping out the motor.
I've powered things up/down a few times, I updated the firmware of the mainboard (3.5.2) and of the motor (3.5.2), and tried resetting CAN on the motor; none to any avail.
-
I just realized that the other two motors I setup were 2407B00010 but this one that is not working is 2402B00021. I can't find on Google how this makes a difference (they look identical).
-
@ash100 Please post the config.g so we can see how the motors are set up. Please also post the responses from the console as text (you can copy the text from DWC and past it in your reply); taking pictures of the screen and hosting them on an external site doesn't make it easy to follow what commands were sent.
As it's crashing when asked to conduct polarity detection, it would be my guess that the M569 or M569.1 command in config.g is incorrectly set up. The M122 report says:
Closed loop driver 0 mode: open loop, pre-error threshold: 2.00, error threshold: 4.00, encoder type none
So it looks like the encoder type is not defined with M569.1. In the console you seem to mistakenly use CAN address 74 rather than 71 for a number of commands, so maybe there is no
M569.1 P71 ...
command in config.g.Ian
-
@droftarts Apologies for that, I am fairly new to this. Below is an updated output from the diagnostic command, and attached is the config.g file.
M122 B71.0 Diagnostics for board 71: Duet M23CL firmware version 3.5.2 (2024-06-10 13:23:16) Bootloader ID: SAME5x bootloader version 2.8 (2023-07-25) All averaging filters OK Never used RAM 45108, free system stack 202 words Tasks: EncCal(1,nWait 6,0.0%,469) Move(3,nWait 7,0.0%,174) CLSend(3,nWait 6,0.0%,147) HEAT(2,nWait 6,0.0%,117) CanAsync(5,nWait 4,0.0%,66) CanRecv(3,nWait 1,0.0%,79) CanClock(5,nWait 1,0.0%,64) TMC(4,nWait 6,0.0%,397) MAIN(1,running,97.5%,303) IDLE(0,ready,0.0%,29) AIN(2,nWait 2,2.5%,255), total 100.0% Owned mutexes: Last reset 00:05:30 ago, cause: software Last software reset data not available Driver 0: pos 0, 80.0 steps/mm, not tuned/calibrated, SG min n/a, mspos 0, reads 0, writes 0 timeouts 0, steps req 0 done 0 Moves scheduled 0, completed 0, in progress 0, hiccups 0, segs 0, step errors 0, maxLate 0 maxPrep 0, maxOverdue 0, maxInc 0, mcErrs 0, gcmErrs 0, ebfmin 0.00 max 0.00 Peak sync jitter -15/4, peak Rx sync delay 185, resyncs 0/0, no timer interrupt scheduled VIN voltage: min 11.9, current 11.9, max 11.9 V12 voltage: min 10.4, current 10.4, max 10.5 MCU temperature: min 26.3C, current 26.5C, max 26.7C Last sensors broadcast 0x00000000 found 0 8 ticks ago, 0 ordering errs, loop time 0 CAN messages queued 2674, send timeouts 0, received 1670, lost 0, errs 0, boc 0, free buffers 38, min 38, error reg 0 dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0 Closed loop driver 0 mode: closed loop, pre-error threshold: 2.00, error threshold: 4.00, encoder type rotaryAS5047, position -5801 Encoder reverse polarity: no, full rotations -1, last angle 10583, minCorrection=0.0, maxCorrection=0.0, agc 66, mag 4695, no error Tuning mode: 0, tuning error: 0x2, collecting data: no Control loop runtime (us): min=5726621, max=1, frequency (Hz): min=750000, max=0
; Default config.g template for DuetPi ; Replace this with a proper configuration file (e.g from https://configtool.reprapfirmware.org) ; Display initial welcome message ; M291 P"Please go to <a href=""https://www.duet3d.com/StartHere"" target=""_blank"">this</a> page for further instructions on how to set it up." R"Welcome to your new Duet 3!" S1 T0 G4 S2 ; Wait for expansion boards to start ; Setup X axis motor M569.1 P70.0 T3 ; Assign magnetic encoder M569 P70.0 D4 S1 ; Assign closed loop control and forward movement M584 X70.0 ; Set motor to X axis control M906 X1000 ; Set current limit ; Setup Y axis motor M569.1 P71.0 T3 ; Assign magnetic encoder M569 P71.0 D4 S1 ; Assign closed loop control and forward movement M584 Y71.0 ; Set motor to Y axis control M906 Y1000 ; Set current limit ; Setup V axis motor M569.1 P74.0 T3 ; Assign magnetic encoder M569 P74.0 D4 S1 ; Assign closed loop control and forward movement M584 V74.0 ; Set motor to X axis control M906 V1000 ; Set current limit M17 ; Allow motors to move
-
@ash100 I've added your current config.g to your post, to make it easier to refer to.
Your config.g is missing M350 (sets microstepping for open loop mode) and M92 (sets steps per mm for the axis) for each axis. I think these are required. See the configuration examples here https://docs.duet3d.com/Duet3D_hardware/Duet_3_family/Duet_3_Motor_23CL#sample-configuration-examples
I think the calibration moves need the axes to be homed first, or for the axes to be able to move without homing. M17 doesn't do this, it just enables the motors. If you're running the motors on a test bench, and there is no limit to the axis (usually set with M208), you can either:
- Use G92 to set the user position, eg
G92 X0 Y0 Z0 V0
. This marks the axis as homed. Or - Use M564 to allow the axes to move beyond the limits of the axes, and without homing. eg send
M564 H0 S0
As you don't have M208 commands to set axis lengths, it will be using the default for each axis, which is 0 to 250mm.
From your M122:
Closed loop driver 0 mode: closed loop, pre-error threshold: 2.00, error threshold: 4.00, encoder type rotaryAS5047, position -5801 Encoder reverse polarity: no, full rotations -1, last angle 10583, minCorrection=0.0, maxCorrection=0.0, agc 66, mag 4695, no error Tuning mode: 0, tuning error: 0x2, collecting data: no
It looks like the encoder has been set up, but there is a 'tuning error: 0x2', but I'm not sure what that means. Otherwise it looks okay. With the above in mind, try the tuning moves. Does it still disconnect?
Another thing I notice is that you are running the motor on 12V. While this should work, we recommend at least 24V.
Ian
- Use G92 to set the user position, eg
-
This worked! It was the homing issue G92. Thank you!