Solved Endstops not stopping motors
-
Hi all,
I am having a really strange issue with my endstops not working correctly. For some reason, when I attempt to home either Y or Z, they continue to move even though the endstops have been triggered. X was like this for a while but now seems to be working OK
So, to start with some basic information:
I am using a Duet 2 WiFi, firmware version 3.1.1. I have 3 standard microswitch endstops, all at low end, all active low. The board LEDs all switch off when the switches are triggered, and I can see the endstop states changing in Machine Specific settings when they are pressed.
Running M119 shows the correct endstop states, as well as 'Z-Probe: at min stop' (though I have no probe attached at the moment and I assumed it would be disabled by my M558 entry below).
I feel so close to actually starting to print now (first thing will be a mount for my probe), but so far away every time I experience an issue like this. I would really appreciate if someone could point me in the right direction please!
My config.g is below (I have attached homeall, homex, homey and homez):
; General preferences G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves ;Network M552 S1 ; enable network M550 P"#####" ; set printer name M551 P"#####" ; set password M552 P192.168.1.13 ; set IP address and enable network M554 P192.168.1.1 ; Gateway (not used yet) M553 P255.255.255.0 ; Netmask M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S0 ; disable Telnet ;PanelDue M575 P1 B57600 S1 ; Set auxiliary serial port baud rate and require checksum (for PanelDue) ; Drives M564 H0 ; allow axis movement without homing M569 P0 S1 ; physical drive 0 goes forwards M569 P1 S1 ; physical drive 1 goes forwards M569 P2 S0 ; physical drive 2 goes backwards M569 P3 S0 ; physical drive 3 goes backwards M584 X0 Y1 Z2 E3 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X160.00 Y160.00 Z800.00 E837.00 ; set steps per mm M566 X900.00 Y900.00 Z12.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X1000.00 Y1000.00 Z250.00 E1000 ; set maximum speeds (mm/min) M201 X1000.00 Y1000.00 Z240.00 E1000.00 ; set accelerations (mm/s^2) M906 X800 Y800 Z800 E800 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minimum M208 X200 Y200 Z180 S0 ; set axis maximum ; Endstops M574 X1 S1 P"xstop" ; configure active-low endstop for low end on X via pin xstop M574 Y1 S1 P"zstop" ; configure active-low endstop for low end on Y via pin ystop M574 Z1 S1 P"ystop" ; configure active-low endstop for low end on Z via pin zstop ; Z-Probe M558 P0 H3 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed ;M557 X0:200 Y0:200 S20 ; define mesh grid ; Heaters M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 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 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"e0temp" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin e0temp 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 ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S0 H1 T45 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on ; 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 ; Misc M501 ; read stored parameters
-
@Harrynice said in Endstops not stopping motors:
; Endstops M574 X1 S1 P"xstop" ; configure active-low endstop for low end on X via pin xstop M574 Y1 S1 P"zstop" ; configure active-low endstop for low end on Y via pin ystop M574 Z1 S1 P"ystop" ; configure active-low endstop for low end on Z via pin zstop
Is it a typo that you connect Y1 with zstop and Z1 with ystop, or is it a mistake?
-
@Harrynice you should also check the following chapter:
in https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_RepRapFirmware_Num_3
"Endstop type S0 (active low switch) is no longer supported in M574 commands. Instead, use type S1 and invert the input by prefixing the pin name with '!'. Ex: M574 X1 S1 P"!xstop". Invert the input when using an NPN output inductive or capacitive sensor, or using a NO switch (not recommended, use a NC switch instead)."
You said you have active low endstops, so you may need the ! parameter. -
@JoergS5 well spotted - I probably did this while troubleshooting today. Will correct it.
-
@JoergS5 I have actually tried this; as soon as I add '!' to any of the stops, WiFi stops working...
-
@Harrynice What do you mean by stopping: it says immediately that endstops activated, or do you mean something else?
-
@Harrynice do you have a sys/config-override.g file, because you call M501 at the end of config.g?
-
@JoergS5 I do - have attached it to this post
-
@JoergS5 said in Endstops not stopping motors:
@Harrynice What do you mean by stopping: it says immediately that endstops activated, or do you mean something else?
Sorry - not sure what you are referring to here...
-
@JoergS5 said in Endstops not stopping motors:
@Harrynice you should also check the following chapter:
in https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_RepRapFirmware_Num_3
"Endstop type S0 (active low switch) is no longer supported in M574 commands. Instead, use type S1 and invert the input by prefixing the pin name with '!'. Ex: M574 X1 S1 P"!xstop". Invert the input when using an NPN output inductive or capacitive sensor, or using a NO switch (not recommended, use a NC switch instead)."
You said you have active low endstops, so you may need the ! parameter.I tried this again just to double check; once the '!' was added and the board rebooted, when i pressed home for any of the axes, z moved up as expected and then the other axes moved about 5mm or so in the wrong direction.
So, I removed the '!', rebooted and tried again and now all of the axes are homing properly!
I am REALLY confused now - that is the only change I made other than correcting the stop naming mistake you spotted earlier. I dont know what happened here but it looks (for the moment at least) like it is fixed!
Thank you so much for your help!
-
@Harrynice in config-override is nothing special.
-
@Harrynice That's god news!!! Enjoy your first printing!
-
@JoergS5 Afraid not - both of my heaters are now giving me faults (heating more slowly than expected). This happened yesterday too, but seemed to be fixed after I ran M303.
I am destined never to print with this board!
-
@Harrynice don't give up!
There is a wiki about thermistors, you may use the wrong parameters. I would ignore the bed heating and concentrate on the hotend. To begin you can print pla without bed heating.
-
@JoergS5 I managed to fix it and am currently printing a calibration cube - will let you know how it goes but looking good so far...
Thanks so much for your help - it has been a long journey to get here!
-
What did you do to fix it?
-
@Phaedrux Embarrassingly, I didnt realise that my previous M303 hadn't been stored, so the heaters weren't actually configured!
Unfortunately, my cubes are printing with a backwards lean, so have raised another question to see if anyone can help.
The best thing is that this is all in preparation for transitioning from a prusa clone to a hypercube evolution, so I can imagine I will have a lot more questions to ask again once I start using the new build!