Changing motor direction with 1XD board external driver stepper
-
@alankilian I will post an image shortly. I don't think the connection is wrong since the motor can turn in both direction. The problem is that reversing the motor direction using the S parameter doesn't work...
-
-
@omiclette I agree if the motor runs both way then its probably not a wiring issue.
What is reported when you send M569 P121.0 from the console (it should say if the driver runs forward or in reverse). then send M569 P121 S1 to reverse it (assuming you have it as in the config.g snippet above), then send M569 P121 again to report the new value. it should say its now in reverse. If that works see if the extrude and retract now work as expected.
-
@t3p3tony said in Changing motor direction with 1XD board external driver stepper:
M569 P121.0
So with the following line in config.g file :
M569 P121.0 S0 R0 T7:7:7:7 ; change enable polarity, active = disable driv
This is what is reported from M569 P121.0 :
I have just noticed that the step timing is somewhat wrong, I don't know why it doesn't stay 7:7:7:7 us.If I change for S1, I get this :
In both cases (S0 and S1), the "retract" jog command makes the actuator go in the direction to extrude and the "extrude" jog command makes the actuator go in the direction to retract.
Also, when I make changes in config.g, I need to shut down and turn back on the power of the Duet 3 6HC for the Stepservo to move. I don't understand why...
-
@omiclette post an output of M122 B121
-
@jay_s_uk said in Changing motor direction with 1XD board external driver stepper:
M122 B121
M122 B121
Diagnostics for board 121:
Duet EXP1XD firmware version 3.3 (2021-06-15 16:12:29)
Bootloader ID: SAMC21 bootloader version 2.0 (2020-10-15b1)
Never used RAM 5568, free system stack 2789 words
Tasks: Move(notifyWait,0.0%,153) HEAT(delaying,0.0%,117) CanAsync(notifyWait,0.0%,64) CanRecv(notifyWait,0.0%,77) CanClock(notifyWait,0.0%,64) MAIN(running,96.5%,443) IDLE(ready,0.0%,41) AIN(delaying,3.4%,142), total 100.0%
Last reset 00:03:42 ago, cause: power up
Last software reset data not available
Driver 0: position 0, 80.0 steps/mm, steps req 0 done 0
Moves scheduled 0, completed 0, in progress 0, hiccups 0, step errors 0, maxPrep 0, maxOverdue 0, maxInc 0, mcErrs 0, gcmErrs 0
Peak sync jitter 0/5, peak Rx sync delay 573, resyncs 0/0, no step interrupt scheduled
VIN: 23.1V
MCU temperature: min 24.2C, current 24.4C, max 24.7C
Ticks since heat task active 80, ADC conversions started 111411, completed 111411, timed out 0, errs 0
Last sensors broadcast 0x00000000 found 0 85 ticks ago, loop time 0
CAN messages queued 20, send timeouts 0, received 2016, lost 0, free buffers 37, min 37, error reg 0
dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0 -
@omiclette said in Changing motor direction with 1XD board external driver stepper:
I have just noticed that the step timing is somewhat wrong, I don't know why it doesn't stay 7:7:7:7 us.
These are the timing values that are actually used, they are the closest ones possible on the 1XD larger than the one specified. They don't match exactly due to the requirement of a multiple of clock cycles to be between step/dir outputs.
as an aside you can just send the command in the console (e.g. M569 P121.0 S1) to test the differences, no need to upload config.g each time.
Can you try using G1 E10 F300 (feel free to substitute different movement amount and feedrate speed to suit your setup) and see if the direction change in M569 still makes no difference when sending G1 instead of using the UI.
-
@t3p3tony Thanks for the tip! When sending a G1 E20 F1000, the motor does change direction when M569 P121.0 S1 or M569 P121.0 S0 is sent. It appears that it is the UI that does not follow the S parameter changes.
-
@chrishamm any ideas here? the extrude/ retract buttons appear to be compensating for the change in M569 S0/1 for the extruder motor so the direction can't be changed.
@Omiclette can you confirm the firmware version you are running on the main board and the 1XD:
M115
M115 B121Also see in DWC what version that is.
Also if you can upgrade to 3.4b7 on both, and upgrade DWC at the same time that would be good.
-
@t3p3tony said in Changing motor direction with 1XD board external driver stepper:
M115
Ok I will try updating to 3.4b7 at the end of the day. -
@t3p3tony Hello, I just did the firmware update to 3.4b7. Changing the S parameter from S0 to S1 now changes the rotation direction of the motor controlled by the 1XD board. Thank you for your help, the issue is solved.
-
-