Trouble homing U axis
-
Hi,
I've added a U axis with a limit switch at the low end. Everything works OK if I disable homing - I test the endstop triggers with M119 and I can see that it triggers when necessary.
However when I try to home, I can hear the U motor enabling but it doesn't move, and than it appears to be homed, regardless of whether the endstop was triggered or not.Config.g:
; Configuration file for Duet 3 MB 6HC (firmware version 3.3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.12 on Fri Aug 05 2022 12:05:46 GMT+0300 (Israel Daylight Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"K6" ; set printer name G4 S2 ; wait for expansion boards to start ; Network M552 P192.168.2.3 S1 ; enable network and acquire dynamic address via DHCP M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0.2 S0 ; physical drive 0.2 goes forwards M569 P0.0 S0 ; physical drive 0.0 goes forwards M569 P0.1 S1 M569 P0.3 S0 ; physical drive 0.3 goes forwards M569 P40.0 S0 R0 ; physical drive 0.4 goes forwards M569 P40.0 T20:20:20:20 M569 P0.4 S0 M584 X0.2 Y0.0:0.1 Z0.3 U0.4 E40.0 ; set drive mapping M350 X8 Y16 Z8 U1 I1 ; configure microstepping with interpolation M92 X320.00 Y132.84 Z320.00 U2500 E96 ; set steps per mm M566 X30 Y200 Z30 U1 E5 ; set maximum instantaneous speed changes (mm/min) M203 X450 Y6000 Z300 U10 E300 ; set maximum speeds (mm/min) M201 X20.00 Y100.00 Z20.00 U1 E5 ; set accelerations (mm/s^2) M906 X2500 Y4000 Z2500 U1500 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X20 Y0 Z0 U0 S1 ; set axis minima M208 X450 Y1000 Z180 U50 S0 ; set axis maxima ; Endstops M574 X1 S1 P"io3.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io0.in M574 Y1 S1 P"io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io2.in M574 Z1 S1 P"io4.in" ; configure switch-type (e.g. microswitch) endstop for low end on Z via pin io3.in M574 U1 S1 P"!io5.in" ; Z-Probe M950 S0 C"io7.out" ; M558 P9 C"io7.in" H5 F60 T120 ; G31 X20 Y0 Z3.3 P25 ; Heaters M308 S0 P"temp0" Y"thermistor" T100000 B4956 C1.587780e-7 A"Block" ; M950 H0 C"out7" T0 M307 H0 B0 S1.00 M143 H0 S240 M308 S1 P"temp1" Y"thermistor" T100000 B4725 C7.06e-8 A"PE-Upper"; M950 H1 C"out8" T1 M307 H1 B0 S1.00 M143 H1 S240 M308 S2 P"temp2" Y"thermistor" T100000 B4725 C7.06e-8 A"PE-Lower"; M950 H2 C"out9" T2 M307 H2 B0 S1.00 M143 H2 S240 M308 S3 P"temp3" Y"thermistor" T100000 B4725 C7.06e-8 A"Nozzle"; M950 H3 C"out6" T3 M307 H3 B1 S1.00 M143 H3 S240 M570 H0 P3600 T15 M570 H1 P3600 T15 M570 H2 P3600 T15 M570 H3 P3600 T15 ; Fans M950 F0 C"out4" ; create fan 0 on pin out4 and set its frequency M106 P0 S0.3 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"out5" ; create fan 1 on pin out5 and set its frequency M106 P1 S0.3 H-1 ; set fan 1 value. Thermostatic control is turned on ; Tools M563 P0 D0 H0:1:2:3 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C T0 M17 ; Custom settings are not defined
homeu.g:
G91 ; relative positioning G1 H1 U-70 F50 ; move Z down until the endstop is triggered G92 U0
I tried G1 H2 U-70, then it does move but doesn't stop when the endstop is triggered.
Thanks for your help
-
@dsela said in Trouble homing U axis:
M350 X8 Y16 Z8 U1 I1 ; configure microstepping with interpolation
M92 X320.00 Y132.84 Z320.00 U2500 E96 ; set steps per mm
M566 X30 Y200 Z30 U1 E5 ; set maximum instantaneous speed changes (mm/min)
M203 X450 Y6000 Z300 U10 E300 ; set maximum speeds (mm/min)
M201 X20.00 Y100.00 Z20.00 U1 E5 ; set accelerations (mm/s^2)
M906 X2500 Y4000 Z2500 U1500 I30 ; set motor currents (mA) and motor idle factor in per cent
M84 S30
maybe the code works, but very slow:
M350 U1 means 1 microsteps, so for M92 U2500 seems to be too high. M203 U10 is very slow (10 mm per minute => 7 minutes for the 70 distance of homeu). and M201 U1 is also very slow acceleration. I would change all those numbers.
Being in microstep 1 mode (= full step mode) and sending many signals could produce the effect you see: the motor doesn't rotate at all, only vibrates and heats up.
I would also recheck the
M574 U1 S1 P"!io5.in"
whether endstop type (! means invert) is correct. When the endstop is triggered, the endstop letter in DWC changes the color. If is is activated from the start, then the signal is incorrect.G1 H2 is a special command to move a single axis and ignoring endstops, so it cannot be used to test the endstops. There are kinematics where the drive letters are different from the cartesian coordinates, and the G1 H2 address the drive letters for those cases.
-
If it thinks it is homed immediately than you probably don't need with ! to invert the pin.
-
When I dont add "!" it seems like the endstop is activated when it's not (checking with M119). After I added the "!" behavior seems to correspond with the actual situation.
This is a linear actuator thus the slow values. It does move manually
-
@dsela if you need the ! in the pin name then you are using a normally-open switch. The wiring to normally-open switches easily picks up interference from adjacent cables, especially stepper motor cables. So my guess is that you have bundled the endstop cable with the stepper motor cable. If this is the case, then if the endstop switch is a simple microswitch with three contacts, change the wiring to use the normally-closed contacts instead. If that's not possible then use shielded cable to connect the endstop to the Duet.