"A" endstop being stuck on.
-
I found another strange problem on my "delta+" printer. The A-axis endstop occasionally gets stuck pressed, seemingly in firmware only. I'm using a normally open switch, and the LED indicator on the Duex5 shows that the connection is working normally. When the switch is pressed the light is off. However, sometimes M119 indicates that the endstop is pressed even when the light correctly indicates that the switch is not pressed. U, V, A motors are plugged into the Duex5, but the U axis doesn't use an endstop and the V endstop is on the main board, so the only affected endstop is on the Duex5.
The fact that the LED indicates the correct switch position while the firmware reports the wrong position makes me think this may be a bug rather than a hardware problem. I've replaced the switch as well and the same behavior occurs.
I can't replicate this behavior every time, but it persists until I press the endstop. It affects homing, but the endstop isn't used outside of that, so it's workable for now, even if that means it takes 2 tries.
I'm using DWC 1.22.2 and 2.02rc1
Here's my homing file for A:
G91 ; relative positioning
G1 A-150 F8000 H1 ; move A to the low end stopping at the endstops (first pass)
G1 A10 F3000 H2 ; go back a few degrees
G1 A-12 F1500 H1 ; move once more but slowly (second pass)
G90
G1 A0 F5000 H2 ; move to center position
G90 ; absolute positioningAnd my config file:
; Configuration file for Duet Ethernet (firmware version 1.20 or newer)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool on Mon Feb 26 2018 12:03:14 GMT-0600 (Central Standard Time); General preferences
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves
M555 P1 ; Set firmware compatibility to look like RepRapFirmare
;M665 R105.6 L215 B85 H250 ; Set delta radius, diagonal rod length, printable radius and homed height backup
;M665 R115 L291.2 B85 H170.8
M669 K11 ; Kinematics type 0 = cartesian, 3=linearDelta,
M665 R115 L291.2 B85 H172.0 K ; Set delta radius, diagonal rod length, printable radius and homed height backup
M668 A-42; ; Set offsets for rotational axes; Network
M550 PJohn's Duet ; Set machine name
M540 Pbe:63:40:4c:53:52 ; Set MAC address
M552 P0.0.0.0 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 S0 ; Drive 0 goes backwards X
M569 P1 S1 ; Drive 1 goes forwards Y
M569 P2 S0 ; Drive 2 goes backwards Z
M569 P3 S0 ; Drive 3 goes backwards E
M569 P4 S1 ; Drive 4 goes forward Nothing
M569 P5 S1 ; Drive 5 goes backwards U
M569 P6 S0 ; Drive 6 goes forwards V
M569 P7 S1 ; Drive 7 goes forwards Nothing
M569 P8 S1 ; Drive 8 goes forwards A
M569 P9 S1 ; Drive 8 goes forwards A
M269 P10 S1 ; Drive 10 goes forwards WM584 X0 Y1 Z2 E3 U5 V6 W10 A8 ; set up extra axes? U5 V6 A7
M350 X16 Y16 Z16 U16 V8 W1 A8 E16:16 I1 ; Configure microstepping with interpolation
M92 X80 Y80 Z80 U44.4444 V226.24 W2 A24.2963 E92.5 ;E663 ; Set steps per mm (or degree) V226.24
M566 X1200 Y1200 Z1200 U1200 V1200 W1200 A1200 E1200 ; Set maximum instantaneous speed changes (mm/min)
M203 X18000 Y18000 Z18000 U4000 V5000 W4000 A8000 E1000 ; Set maximum speeds (mm/min)
M201 X1000 Y1000 Z1000 U1000 V400 W1000 A1000 E500 ; Set accelerations (mm/s^2)
M906 X1000 Y1000 Z1000 U1200 V1000 W75 A800 E1000 I65 ; Set motor currents (mA) and motor idle factor in per cent
M564 S0 H0; Allow moves S0 outside of build area, H0 while not homed.
;M84 S30 ; Set idle timeout; Servos
M307 H3 A-1 C-1 D-1 ; Disable heater 3-7. Set parameters to -1. Servos 3-7 are controlled with heaters 3-7 (There are no servos 1-2).
M307 H4 A-1 C-1 D-1
M307 H5 A-1 C-1 D-1
M307 H6 A-1 C-1 D-1
M307 H7 A-1 C-1 D-1; Axis Limits
M208 X-100 Y-100 Z0 U-100000 V-94.50 W-1000 A-58 S1 ; Set minimum (for low endstops this sets the endstop location)
M208 X100 Y100 Z300 U100000 V93.34 W1000 A58 S0 ; Set maximum (for high endstops this sets the endstop location, but not XYZ); Endstops
M574 X2 Y2 Z2 U0 V1 W0 A1 S1 ; Set active high endstops
M666 X0 Y0 Z0 U0 V0 W0 A0 ; Put your endstop adjustments here, or let auto calibration find them; Z-Probe
M558 P0 H5 F120 T6000 ; Disable Z probe but set dive height, probe speed and travel speed
M557 R85 S20 ; Define mesh grid; Heaters
M140 H0 S0 ; Disable heated bed with M140 H-1
M305 P0 T100000 B4725 C7.060000e-8 R4700; Set thermistor + ADC parameters for heater 0 Bed Heater
M305 P1 T100000 B4725 C7.060000e-8 R4700; Set thermistor + ADC parameters for heater 1 Extruder
M143 H1 S280 ; Set temperature limit for heater 1 to 280C
M143 H0 S120 ; Set temperature limit for heater 0 to 120C; Fans
M106 P0 S0.80 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S0.0 I0 F250 H-1 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off
;M106 P2 S1 I0 F500 H T45 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on; Tools
M563 P0 S"Extruder" D0 H1 ; Define tool 0
G10 P0 X0 Y0 Z0 U0 V0 W0 A0 ; Set tool 0 axis offsets
G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C; Automatic saving after power loss is not enabled
; Custom settings are not configured
; Miscellaneous
T0 ; Select first tool
M302 P0 ; Allow cold extrudes for testing -
When the problem next occurs, please send M122 and extract the I2C error count from the report.
-
I followed your advice from my previous thread and replaced the ground wire. I no longer get any I2C errors, but this homing problem still occurs maybe 5% of the time.
Here is the M122 output a few seconds after the homing fails.
M122
=== Diagnostics ===
RepRapFirmware for Duet 2 WiFi/Ethernet version 2.02RC1(RTOS) running on Duet Ethernet 1.02 or later + DueX5
Board ID: 08DDM-9FAM2-LW4SD-6J9F2-3S46R-K2XBW
Used output buffers: 3 of 20 (17 max)
=== RTOS ===
Static ram: 28460
Dynamic ram: 98040 of which 0 recycled
Exception stack ram used: 356
Never used ram: 4216
Tasks: NETWORK(ready,400) HEAT(blocked,1232) MAIN(running,3484)
Owned mutexes:
=== Platform ===
Last reset 00:48:40 ago, cause: power up
Last software reset at 2018-10-29 13:38, reason: User, spinning module GCodes, available RAM 4200 bytes (slot 0)
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0xffffffff Task 0x4e49414d
Error status: 0
Free file entries: 10
SD card 0 detected, interface speed: 20.0MBytes/sec
SD card longest block write time: 0.0ms, max retries 0
MCU temperature: min 31.3, current 31.4, max 31.6
Supply voltage: min 11.9, current 12.1, max 12.2, under voltage events: 0, over voltage events: 0
Driver 0: standstill, SG min/max not available
Driver 1: standstill, SG min/max not available
Driver 2: standstill, SG min/max not available
Driver 3: standstill, SG min/max not available
Driver 4: standstill, SG min/max not available
Driver 5: standstill, SG min/max not available
Driver 6: standstill, SG min/max not available
Driver 7: standstill, SG min/max not available
Driver 8: standstill, SG min/max not available
Driver 9: standstill, SG min/max not available
Expansion motor(s) stall indication: yes
Date/time: 2018-11-01 09:58:54
Slowest loop: 0.30ms; fastest: 0.08ms
=== Move ===
Hiccups: 0, StepErrors: 0, LaErrors: 0, FreeDm: 240, MinFreeDm: 240, MaxWait: 0ms, Underruns: 0, 0
Scheduled moves: 82, completed moves: 82
Bed compensation in use: none
Bed probe heights: 0.000 0.000 0.000 0.000 0.000
=== Heat ===
Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1
Heater 0 is on, I-accum = 0.0
Heater 1 is on, I-accum = 0.0
=== GCodes ===
Segments left: 0
Stack records: 1 allocated, 0 in use
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
serial is idle in state(s) 0
aux is idle in state(s) 0
daemon is idle in state(s) 0
queue is idle in state(s) 0
autopause is idle in state(s) 0
Code queue is empty.
=== Network ===
Slowest loop: 4.07ms; fastest: 0.03ms
Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
HTTP sessions: 1 of 8
Interface state 5, link 100Mbps full duplex
=== Expansion ===
DueX I2C errors 0 -
The latency of endstops on the DueX is higher than on the Duet, so it's better to avoid using them if you can.
Can you create the axes in the order A, V, U instead? That way the A axis will use the E0 endstop, V will use E1, and U would use the one on the DueX but you say you don't need it.
When the problem occurs, is it because the A endstop has genuinely been pressed in the past, but when it was released the state reported by M119 or Duet Web Control didn't change? That would be helpful to know.
-
@dc42 Interesting. I'll have to try that. That would get around the problem I think. I thought the axes have to be created in order, but that might be old info.
This problem occurs typically during homing, where I have the axis double tap the end stop. The first press typically works, but then DWC and M119 report that the switch is still pressed, so the second tap never happens. Rarely this problem has happened on startup as well though, so even the first press would not function correctly. For a few days I thought I had my axis backwards because the switch was constantly pressed when I powered on, which made the motor move the axis away from the endstop immediately during homing.
I have never seen the M119 status fluctuate randomly though. It is either incorrect at boot, or gets stuck in the incorrect state after the endstop is released. Pressing and releasing the endstop will typically fix it.
-
It sounds like there may be a race condition between the I2C transaction and the interrupt from the DueX to the Duet. I've added this to my list of things to investigate.
-
@dc42 Thanks for looking into it! I'm happy to help test.