CoreXY sometimes homes correctly, sometimes does its own thing
-
I have a Duet 2 wifi controlled custom CoreXY machine that I built during the pandemic. I managed to get it set up and running okay, but there's a few oddities that I've been unable to figure out. The most important one keeping me from moving on to fine-tuning, is that occasionally I will try to home it and it not only doesn't utilize the sensorless homing right, it'll home X/Y to the middle of the bed, or try to home to the opposite corner (max X and max Y instead of 0:0).
Here's my homeall file text:
; Home X/Y first M564 H0 S0 ; disables soft endstops G91 ; relative positioning M915 X Y R0 F0 ; Set M915 for sensorless homing M400 ; make sure everything has stopped before we make changes M913 X100 Y100 ; drops motor current to 70% (currently 100%, trying to fix homing issue) M400 ; wait G91 ; relative positioning G1 H2 Z10 F6000 ; lower z relative to current position M400 ; wait ;X axis G1 H1 X-325 F5000 ; home x G1 H2 X10 F3600 ; move away a bit G1 H1 X-20 F3600 ; home again but slower G1 H1 X5 ; sit at 5mm M400 ; wait ;Y axis G1 H1 Y-325 F5000 ; home y G1 H2 Y10 F3600 ; move away a bit G1 H1 Y-20 F3600 ; home again but slower G1 H1 Y5 ; sit at 5mm M400 ; wait ; Move probe for Z homing G90 ; absolute positioning G1 X168.5 Y155 F10000 ; Move to the center of the bed M558 F500 ; Set the probing speed G30 ; Probe bed M558 F50 ; Set a slower probing speed G30 ; Do it again G30 P0 X0 Y195 Z-99999 ; Probe near left endscrew G30 P1 X330 Y195 Z-99999 S2 ; Probe near right endscrew, set compensation ;check center again for accurate zeroing G1 X167 Y155 F10000 ; Move to the center of the bed M558 F500 ; Set the probing speed G30 ; Probe bed M558 F50 ; Set a slower probing speed G30 ; Do it again G1 X1 Y1 F5500 ; Go back home M915 X Y S3 R1 F1 ; set M915 for stall detection
Apologies for the comments not aligning, they're right on my browser but not when pasted here.
What am I missing?
-
Post your full config.g please
Also the results of M122 and M98 P"config.g" -
@Rorgaard said in CoreXY sometimes homes correctly, sometimes does its own thing:
it'll home X/Y to the middle of the bed
Sounds like your stall detection isn't tuned very well and it's having false triggers?
Have you been through these guides?
https://docs.duet3d.com/en/User_manual/Machine_configuration/Configuration_coreXY
https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_stall_detection -
This sounds like an the same issue I ran into when setting up my corexy. There are two different files you need configured for homing the bed.
homeall.g and homez.g
Make sure they are both setup properly.
-
@Phaedrux said in CoreXY sometimes homes correctly, sometimes does its own thing:
Post your full config.g please
Also the results of M122 and M98 P"config.g"; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.1.4 on Fri Oct 09 2020 19:49:58 GMT-0500 (Central Daylight Time) ; Using LGX Lite direct drive extruder ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Beast" ; set printer name M669 K1 ; select CoreXY mode ; Network M551 P"Beast" ; set password M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S0 ; physical drive 0 goes forwards (X) M569 P1 S0 ; physical drive 1 goes forwards (Y) M569 P2 S1 ; physical drive 2 goes forwards (Z1) M569 P4 S1 ; physical drive 4 goes forwards (Z2) M569 P3 S1 ; physical drive 3 goes forwards (E) M584 X0 Y1 Z2:4 E3 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E562 ; set steps per mm (E562 for Bondtech LGX Lite) M203 X12000.00 Y12000.00 Z1000.00 E6000.00 ; set maximum velocity (mm/min) (Velocity) M201 X7500.00 Y7500.00 Z500.00 E5000.00 ; set maximum accelerations (mm/s^2) (Accel) (5000) M566 X750.00 Y750.00 Z60.00 E750.00 ; set maximum jerk (mm/min) (was 150xy 60z 120e) (500) M906 X1000 Y1000 Z800 E650 I30 ; set motor currents (mA) and motor idle factor in per cent (LGX Lite 650 start from E800) M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X330 Y320 Z350 S0 ; set axis maxima ; Dual Z stuff M671 X-45:375 Y0:0 S1.0 ; Says there's z screws 45mm left of x axis and 45mm right of end, max adjustment is 1mm ; Endstops M574 X1 S4 ; configure sensorless endstop for low end on X M574 Y1 S4 ; configure sensorless endstop for low end on Y M574 Z1 S2 ; Define Z to use Probe. Home to min. M915 X Y R0 F0 ; added 2/17/23 ; Z-Probe M950 S0 C"exp.heater3" ; Supposedly works, from duet gcode file M558 P9 C"zprobe.in" H1.5 F500 T6000 ; Enable Z probe, set dive height, probe speed and travel speed G31 P500 X0 Y50 Z2.3 ; Z probe trigger value, offset in relation to nozzle. Trigger height adjust. (40.75) (3.21)(2.57)(4.95) M557 X0:320 Y40:320 S20 ; define mesh grid ; Heaters M308 S0 P"bedtemp" Y"thermistor" A"Bed" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp (R4700) M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 q=10hz (Q10) M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S150 ; set temperature limit for heater 0 to 150C M308 S1 P"e0temp" Y"thermistor" A"Hotend" T100000 B4680 C6.427137e-8 ; configure sensor 1 as thermistor on pin e0temp (use RRF configurator for TBC values) M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S300 ; set temperature limit for heater 1 to 300c ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S0 H-1 T50 ; set fan 0 value. Thermostatic control is turned off, cuts at 50C M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S1 H1 T50 ; set fan 1 value. Thermostatic control is turned on, 50C M950 F2 C"fan2" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P2 S1 H1 T30 ; set fan 2 value. Thermostatic control is turned on, 30C ; Tools M563 P0 D0 H1 F0 ; 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 ; Custom settings are not defined ; Miscellaneous T0 ; selects tool0 at startup (extruder) ;M571 P1 57600 M575 P1 S1 B57600 ; PanelDue stuff M501 ; Use stored PID settings M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
M122:
M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.4.5 (2022-11-30 19:36:12) running on Duet WiFi 1.02 or later Board ID: 08DJM-9178L-L2MSD-6J1F4-3S06L-99FQP Used output buffers: 1 of 26 (18 max) === RTOS === Static ram: 23836 Dynamic ram: 75256 of which 12 recycled Never used RAM 12976, free system stack 184 words Tasks: NETWORK(notifyWait,14.7%,242) HEAT(notifyWait,0.0%,333) Move(notifyWait,0.0%,363) MAIN(running,84.6%,438) IDLE(ready,0.7%,30), total 100.0% Owned mutexes: WiFi(NETWORK) === Platform === Last reset 00:02:23 ago, cause: power up Last software reset at 2023-02-17 16:17, reason: User, GCodes spinning, available RAM 15024, slot 0 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Step timer max interval 0 MCU temperature: min 25.5, current 32.4, max 32.5 Supply voltage: min 24.1, current 24.2, max 24.3, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0 Events: 0 queued, 0 completed Driver 0: standstill, SG min n/a Driver 1: standstill, SG min n/a Driver 2: standstill, SG min n/a Driver 3: standstill, SG min n/a Driver 4: standstill, SG min n/a Driver 5: Driver 6: Driver 7: Driver 8: Driver 9: Driver 10: Driver 11: Date/time: 2023-02-27 16:49:39 Cache data hit count 4294967295 Slowest loop: 8.07ms; fastest: 0.18ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 10 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 3.8ms, write time 0.0ms, max retries 0 === Move === DMs created 83, segments created 0, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters 0 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 Heater 1 is on, I-accum = 0.0 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty === Network === Slowest loop: 16.09ms; fastest: 0.00ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) HTTP sessions: 1 of 8 = WiFi = Network state is active WiFi module is connected to access point Failed messages: pending 0, notready 0, noresp 0 WiFi firmware version 1.27 WiFi MAC address 84:0d:8e:b2:ef:82 WiFi Vcc 3.34, reset reason Turned on by main processor WiFi flash size 4194304, free heap 24600 WiFi IP address 10.0.0.12 WiFi signal strength -31dBm, mode 802.11n, reconnections 0, sleep mode modem Clock register 00002002 Socket states: 0 0 0 0 0 0 0 0
M98 P"config.g":
M98 P"config.g" HTTP is enabled on port 80 FTP is disabled TELNET is disabled Warning: Heater 1 predicted maximum temperature at full power is 492°C
-
@Phaedrux said in CoreXY sometimes homes correctly, sometimes does its own thing:
@Rorgaard said in CoreXY sometimes homes correctly, sometimes does its own thing:
it'll home X/Y to the middle of the bed
Sounds like your stall detection isn't tuned very well and it's having false triggers?
Have you been through these guides?
https://docs.duet3d.com/en/User_manual/Machine_configuration/Configuration_coreXY
https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_stall_detectionI have, and I thought about playing with the sensitivity but the fact that the motors occasionally run backward made me think the sensitivity might not be the root cause.
-
You're using sensorless homing, but your acceleration is very very high. Try reducing it during homing.
Have you gone through the corexy motor tests to confirm things are working as they should?
-
@Phaedrux oh geez it is very high. Huh. I can't believe I didn't catch that, that's from a test I did ages ago.
Motor testing has confirmed the motors move correctly. I also checked the wires to make sure they were pinned right, because I had an incident with a motor once that had two wires swapped. That's not the case here.
I'll spend today playing with things with the kinematics turned way down, see if that helps.
-
Update: I finally got around to playing with this to figure it out.
The changes I made:
-
I lowered the acceleration by a factor of 10. I may increase it again later but for now things are working.
-
I increased the x/y homing speed to F6000. at 3600 it kept grinding on the stop.
-
I got rid of the repeat of the home. Once is good enough anyway, no need to do it twice.
-
-
@Rorgaard I'm glad you got it working. I have a few comments:
@Rorgaard said in CoreXY sometimes homes correctly, sometimes does its own thing:
I lowered the acceleration by a factor of 10. I may increase it again later but for now things are working.
Recent versions of RRF have a command M201.1 which allows you to set a lower than normal acceleration for stall homing moves and Z prove moves. This helps to avoid getting a stall when the homing move starts, caused by extra load as the motor accelerates the mass of the print head.
@Rorgaard said in CoreXY sometimes homes correctly, sometimes does its own thing:
I increased the x/y homing speed to F6000. at 3600 it kept grinding on the stop.
There is a minimum speed at which stall detection is activated, set by the M915 H parameter, because stall detection at low speeds is not reliable. See https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m915-configure-motor-stall-detection. At F3600 you may have been below that speed.
@Rorgaard said in CoreXY sometimes homes correctly, sometimes does its own thing:
I got rid of the repeat of the home. Once is good enough anyway, no need to do it twice.
That's fine if it reliably detects a stall when the physical endstop is reached and not before. Bear in mind that when the motor is hot, stall detection sensitivity increases.
-
-