Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix-2.0.x G28 with bump does NOT execute "Home 2 Slow" move #11056

Closed
lrpirlet opened this issue Jun 18, 2018 · 34 comments
Closed

bugfix-2.0.x G28 with bump does NOT execute "Home 2 Slow" move #11056

lrpirlet opened this issue Jun 18, 2018 · 34 comments

Comments

@lrpirlet
Copy link
Contributor

lrpirlet commented Jun 18, 2018

Description

I decided to switch to the bugfix-2.0.x, and to use the Visual Studio Code + PlatformIO…
I compiled the bugfix2.0.x with my config files (Mega 2560)…
I did reinitialize the EEPROM…

Seems that G28 does NOT execute the "Home 2 Slow" move

Steps to Reproduce

Compile using my config files (see https://github.com/lrpirlet/Marlin/blob/lrpv2/Marlin/Configuration.h and https://github.com/lrpirlet/Marlin/blob/lrpv2/Marlin/Configuration_adv.h)

Expected behavior: [What you expect to happen]
G28 does execute second bump...

Actual behavior: [What actually happens]
G28 does touch the switch once, retract and forget to bump again...

Additional Information

Please find here the debug session…
Note that the printer does NOT bump a second time after and that for X, Y and Z axis…

I may be doing something stupid, sorry if that is the case.

Log Output
20:52:14.995 : Printer reset detected - initalizing
20:52:14.995 : start
20:52:14.995 : echo: External Reset
20:52:14.999 : Marlin bugfix-2.0.x
20:52:15.003 : echo: Last Updated: 2018-01-20 | Author: LRP
20:52:15.003 : echo:Compiled: Jun 17 2018
20:52:15.007 : echo: Free Memory: 2571  PlannerBufferBytes: 1488
20:52:15.031 : echo:V55 stored settings retrieved (655 bytes; crc 23719)
20:52:15.035 : Unified Bed Leveling System v1.01 inactive.
20:52:15.084 : Unified Bed Leveling initialized.
20:52:15.089 : UBL System reset()
20:52:15.093 : echo:  G21    ; Units in mm (mm)
20:52:15.093 : echo:  M149 C ; Units in Celsius
20:52:15.097 : echo:Filament settings: Disabled
20:52:15.097 : echo:  M200 D3.00
20:52:15.101 : echo:  M200 D0
20:52:15.101 : echo:Steps per unit:
20:52:15.105 : echo:  M92 X80.00 Y80.00 Z4000.00 E402.00
20:52:15.109 : echo:Maximum feedrates (units/s):
20:52:15.113 : echo:  M203 X300.00 Y300.00 Z3.00 E45.00
20:52:15.113 : echo:Maximum Acceleration (units/s2):
20:52:15.117 : echo:  M201 X3000 Y3000 Z100 E10000
20:52:15.126 : echo:Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
20:52:15.126 : echo:  M204 P3000.00 R3000.00 T3000.00
20:52:15.134 : echo:Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>
20:52:15.138 : echo:  M205 B20000 S0.00 T0.00 J0.02
20:52:15.138 : echo:Home offset:
20:52:15.142 : echo:  M206 X0.00 Y0.00 Z0.00
20:52:15.146 : N1 M110*34
20:52:15.146 : echo:Unified Bed Leveling:
20:52:15.146 : echo:  M420 S0 Z10.00
20:52:15.150 : Unified Bed Leveling System v1.01 inactive.
20:52:15.204 : Active Mesh Slot: -1
20:52:15.204 : EEPROM can hold 9 meshes.
20:52:15.208 : echo:  G29 I99
20:52:15.208 : echo:  M421 I0 J0 Z0.00
20:52:15.286 : echo:  M421 I0 J1 Z0.00
20:52:15.364 : echo:  M421 I0 J2 Z0.00
20:52:15.437 : echo:  M421 I0 J3 Z0.00
20:52:15.515 : echo:  M421 I0 J4 Z0.00
20:52:15.593 : echo:  M421 I0 J5 Z0.00
20:52:15.671 : echo:  M421 I0 J6 Z0.00
20:52:15.749 : echo:  M421 I0 J7 Z0.00
20:52:15.822 : echo:  M421 I0 J8 Z0.00
20:52:15.900 : echo:  M421 I1 J0 Z0.00
20:52:15.978 : echo:  M421 I1 J1 Z0.00
20:52:16.056 : echo:  M421 I1 J2 Z0.00
20:52:16.134 : echo:  M421 I1 J3 Z0.00
20:52:16.207 : echo:  M421 I1 J4 Z0.00
20:52:16.285 : echo:  M421 I1 J5 Z0.00
20:52:16.363 : echo:  M421 I1 J6 Z0.00
20:52:16.441 : echo:  M421 I1 J7 Z0.00
20:52:16.515 : echo:  M421 I1 J8 Z0.00
20:52:16.592 : echo:  M421 I2 J0 Z0.00
20:52:16.670 : echo:  M421 I2 J1 Z0.00
20:52:16.748 : echo:  M421 I2 J2 Z0.00
20:52:16.826 : echo:  M421 I2 J3 Z0.00
20:52:16.899 : echo:  M421 I2 J4 Z0.00
20:52:16.977 : echo:  M421 I2 J5 Z0.00
20:52:17.055 : echo:  M421 I2 J6 Z0.00
20:52:17.133 : echo:  M421 I2 J7 Z0.00
20:52:17.211 : echo:  M421 I2 J8 Z0.00
20:52:17.284 : echo:  M421 I3 J0 Z0.00
20:52:17.362 : echo:  M421 I3 J1 Z0.00
20:52:17.440 : echo:  M421 I3 J2 Z0.00
20:52:17.518 : echo:  M421 I3 J3 Z0.00
20:52:17.592 : echo:  M421 I3 J4 Z0.00
20:52:17.669 : echo:  M421 I3 J5 Z0.00
20:52:17.747 : echo:  M421 I3 J6 Z0.00
20:52:17.825 : echo:  M421 I3 J7 Z0.00
20:52:17.903 : echo:  M421 I3 J8 Z0.00
20:52:17.977 : echo:  M421 I4 J0 Z0.00
20:52:18.054 : echo:  M421 I4 J1 Z0.00
20:52:18.132 : echo:  M421 I4 J2 Z0.00
20:52:18.210 : echo:  M421 I4 J3 Z0.00
20:52:18.288 : echo:  M421 I4 J4 Z0.00
20:52:18.362 : echo:  M421 I4 J5 Z0.00
20:52:18.439 : echo:  M421 I4 J6 Z0.00
20:52:18.517 : echo:  M421 I4 J7 Z0.00
20:52:18.595 : echo:  M421 I4 J8 Z0.00
20:52:18.669 : echo:  M421 I5 J0 Z0.00
20:52:18.747 : echo:  M421 I5 J1 Z0.00
20:52:18.824 : echo:  M421 I5 J2 Z0.00
20:52:18.902 : echo:  M421 I5 J3 Z0.00
20:52:18.980 : echo:  M421 I5 J4 Z0.00
20:52:19.054 : echo:  M421 I5 J5 Z0.00
20:52:19.132 : echo:  M421 I5 J6 Z0.00
20:52:19.209 : echo:  M421 I5 J7 Z0.00
20:52:19.287 : echo:  M421 I5 J8 Z0.00
20:52:19.365 : echo:  M421 I6 J0 Z0.00
20:52:19.439 : echo:  M421 I6 J1 Z0.00
20:52:19.516 : echo:  M421 I6 J2 Z0.00
20:52:19.594 : echo:  M421 I6 J3 Z0.00
20:52:19.672 : echo:  M421 I6 J4 Z0.00
20:52:19.746 : echo:  M421 I6 J5 Z0.00
20:52:19.824 : echo:  M421 I6 J6 Z0.00
20:52:19.901 : echo:  M421 I6 J7 Z0.00
20:52:19.979 : echo:  M421 I6 J8 Z0.00
20:52:20.057 : echo:  M421 I7 J0 Z0.00
20:52:20.131 : echo:  M421 I7 J1 Z0.00
20:52:20.209 : echo:  M421 I7 J2 Z0.00
20:52:20.286 : echo:  M421 I7 J3 Z0.00
20:52:20.364 : echo:  M421 I7 J4 Z0.00
20:52:20.442 : echo:  M421 I7 J5 Z0.00
20:52:20.516 : echo:  M421 I7 J6 Z0.00
20:52:20.594 : echo:  M421 I7 J7 Z0.00
20:52:20.671 : echo:  M421 I7 J8 Z0.00
20:52:20.749 : echo:  M421 I8 J0 Z0.00
20:52:20.823 : echo:  M421 I8 J1 Z0.00
20:52:20.902 : echo:  M421 I8 J2 Z0.00
20:52:20.980 : echo:  M421 I8 J3 Z0.00
20:52:21.057 : echo:  M421 I8 J4 Z0.00
20:52:21.134 : echo:  M421 I8 J5 Z0.00
20:52:21.209 : echo:  M421 I8 J6 Z0.00
20:52:21.287 : echo:  M421 I8 J7 Z0.00
20:52:21.365 : echo:  M421 I8 J8 Z0.00
20:52:21.442 : echo:Material heatup parameters:
20:52:21.446 : echo:  M145 S0 H180 B70 F0
20:52:21.446 : echo:  M145 S1 H240 B110 F0
20:52:21.450 : echo:PID settings:
20:52:21.450 : echo:  M301 P21.90 I1.43 D83.96
20:52:21.454 : echo:Z-Probe Offset (mm): (mm):
20:52:21.454 : echo:  M851 Z-4.79
20:52:24.736 : ok
20:52:24.736 : N2 M115*36
20:52:25.249 : echo:SD card ok
20:52:25.346 : FIRMWARE_NAME:Marlin bugfix-2.0.x (Github) SOURCE_CODE_URL:https://github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:Pi3 3D LabteK EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
20:52:25.346 : Cap:SERIAL_XON_XOFF:0
20:52:25.346 : Cap:EEPROM:1
20:52:25.350 : Cap:VOLUMETRIC:1
20:52:25.350 : Cap:AUTOREPORT_TEMP:1
20:52:25.354 : Cap:PROGRESS:0
20:52:25.354 : Cap:PRINT_JOB:1
20:52:25.354 : Cap:AUTOLEVEL:1
20:52:25.358 : Cap:Z_PROBE:1
20:52:25.358 : Cap:LEVELING_DATA:1
20:52:25.358 : Cap:BUILD_PERCENT:0
20:52:25.362 : Cap:SOFTWARE_POWER:0
20:52:25.362 : Cap:TOGGLE_LIGHTS:0
20:52:25.366 : Cap:CASE_LIGHT_BRIGHTNESS:0
20:52:25.366 : Cap:EMERGENCY_PARSER:0
20:52:25.371 : Cap:AUTOREPORT_SD_STATUS:0
20:52:25.374 : Cap:THERMAL_PROTECTION:1
20:52:25.374 : ok
20:52:25.401 : N4 M114*35
20:52:25.420 : X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0
20:52:25.420 : ok
20:52:25.420 : N5 M111 S6*98
20:52:25.440 : echo:DEBUG:INFO,ERRORS
20:52:25.440 : ok
20:52:25.440 : N6 T0*60
20:52:25.444 : echo:Active Extruder: 0
20:52:25.444 : ok
20:52:25.444 : N7 M20*22
20:52:25.448 : Begin file list
20:52:25.517 : End file list
20:52:25.517 : ok
20:52:25.517 : N8 M80*19
20:52:25.521 : echo:Unknown command: "M80"
20:52:25.521 : ok
20:52:25.521 : N9 M20*24
20:52:25.525 : Begin file list
20:52:25.595 : End file list
20:52:25.595 : ok
20:52:25.595 : N10 M220 S100*80
20:52:25.599 : ok
20:52:25.599 : N11 M221 S100*80
20:52:25.603 : ok
20:52:25.603 : N12 M111 S6*84
20:52:25.608 : echo:DEBUG:INFO,ERRORS
20:52:25.608 : ok
20:52:25.608 : N13 T0*8
20:52:25.612 : echo:Active Extruder: 0
20:52:25.612 : ok
20:52:25.612 : N14 M155 S1*85
20:52:25.616 : ok
20:52:33.078 : N15 M111 S32*100
20:52:33.083 : echo:DEBUG:LEVELING
20:52:33.083 : ok
20:57:01.399 : N16 M114*16
20:57:01.408 : X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0
20:57:01.408 : ok
20:57:50.360 : N17 M113 S0*85
20:57:50.365 : ok
20:57:50.365 : N18 M155 S60*110
20:57:50.369 : ok
20:57:50.369 : N19 M111 S32*104
20:57:50.374 : echo:DEBUG:LEVELING
20:57:50.374 : ok
20:57:50.374 : N20 G28*33
20:57:50.378 : >>> G28
20:57:50.382 : Machine Type: Cartesian
20:57:50.382 : Probe: SERVO PROBE
20:57:50.386 : Probe Offset X:0 Y:0 Z:-4.79 (Aligned With & Below Nozzle)
20:57:50.390 : Auto Bed Leveling: UBL (disabled)
20:57:50.394 : current_position=(0.00, 0.00, 0.00) : bracket_probe_move
20:57:50.399 : > endstops.enable(true)
20:57:50.399 : Raise Z (before homing) to 3.00
20:57:50.403 : >>> do_blocking_move_to(0.00, 0.00, 3.00)
20:57:50.407 : <<< do_blocking_move_to
20:57:51.533 : >>> homeaxis(X)
20:57:51.537 : Home 1 Fast:
20:57:51.541 : >>> do_homing_move(X, -270.00, [50.00])
20:57:51.545 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:57:51.959 : <<< do_homing_move(X)
20:57:51.963 : Move Away:
20:57:51.963 : >>> do_homing_move(X, 5.00, [50.00])
20:57:51.971 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:57:52.188 : <<< do_homing_move(X)
20:57:52.188 : Home 2 Slow:
20:57:52.192 : >>> do_homing_move(X, -10.00, 25.00)
20:57:52.196 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:57:52.299 : <<< do_homing_move(X)
20:57:52.303 : >>> set_axis_is_at_home(X)
20:57:52.303 : For X axis:
20:57:52.308 : home_offset = 0.00
20:57:52.308 : position_shift = 0.00
20:57:52.312 : soft_endstop_min = 0.00
20:57:52.312 : soft_endstop_max = 180.00
20:57:52.316 : > home_offset[X] = 0.00
20:57:52.320 : current_position=(0.00, 0.00, 3.00) :
20:57:52.320 : <<< set_axis_is_at_home(X)
20:57:52.324 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:57:52.332 : current_position=(0.00, 0.00, 3.00) : > AFTER set_axis_is_at_home
20:57:52.332 : <<< homeaxis(X)
20:57:52.332 : >>> homeaxis(Y)
20:57:52.336 : Home 1 Fast:
20:57:52.340 : >>> do_homing_move(Y, -270.00, [50.00])
20:57:52.344 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:57:52.758 : <<< do_homing_move(Y)
20:57:52.758 : Move Away:
20:57:52.762 : >>> do_homing_move(Y, 5.00, [50.00])
20:57:52.766 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:57:52.987 : <<< do_homing_move(Y)
20:57:52.987 : Home 2 Slow:
20:57:52.991 : >>> do_homing_move(Y, -10.00, 25.00)
20:57:52.995 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:57:53.098 : <<< do_homing_move(Y)
20:57:53.102 : >>> set_axis_is_at_home(Y)
20:57:53.102 : For Y axis:
20:57:53.106 : home_offset = 0.00
20:57:53.106 : position_shift = 0.00
20:57:53.110 : soft_endstop_min = 0.00
20:57:53.110 : soft_endstop_max = 180.00
20:57:53.115 : > home_offset[Y] = 0.00
20:57:53.115 : current_position=(0.00, 0.00, 3.00) :
20:57:53.119 : <<< set_axis_is_at_home(Y)
20:57:53.123 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:57:53.131 : current_position=(0.00, 0.00, 3.00) : > AFTER set_axis_is_at_home
20:57:53.131 : <<< homeaxis(Y)
20:57:53.131 : Z_SAFE_HOMING >>>
20:57:53.139 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:57:53.143 : destination=(90.00, 90.00, 3.00) : Z_SAFE_HOMING
20:57:53.147 : >>> do_blocking_move_to(90.00, 90.00, 3.00)
20:57:53.147 : <<< do_blocking_move_to
20:57:54.241 : >>> homeaxis(Z)
20:57:54.249 : current_position=(90.00, 90.00, 3.00) : set_probe_deployed
20:57:54.249 : deploy: 1
20:57:54.249 : do_probe_raise(3.00)
20:57:54.253 : >>> do_blocking_move_to(90.00, 90.00, 7.79)
20:57:54.257 : <<< do_blocking_move_to
20:57:56.294 : >>> do_blocking_move_to(90.00, 90.00, 7.79)
20:57:56.294 : <<< do_blocking_move_to
20:57:56.294 : Home 1 Fast:
20:57:56.297 : >>> do_homing_move(Z, -252.00, [4.00])
20:57:56.301 : current_position=(90.00, 90.00, 0.00) : sync_plan_position
20:58:00.697 : <<< do_homing_move(Z)
20:58:00.697 : Move Away:
20:58:00.701 : >>> do_homing_move(Z, 2.00, 4.00)
20:58:00.705 : current_position=(90.00, 90.00, 0.00) : sync_plan_position
20:58:01.520 : <<< do_homing_move(Z)
20:58:01.520 : Home 2 Slow:
20:58:01.525 : >>> do_homing_move(Z, -4.00, 2.00)
20:58:01.528 : current_position=(90.00, 90.00, 0.00) : sync_plan_position
20:58:01.639 : <<< do_homing_move(Z)
20:58:01.639 : >>> set_axis_is_at_home(Z)
20:58:01.643 : For Z axis:
20:58:01.643 : home_offset = 0.00
20:58:01.643 : position_shift = 0.00
20:58:01.647 : soft_endstop_min = 0.00
20:58:01.651 : soft_endstop_max = 168.00
20:58:01.655 : *** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***
20:58:01.655 : > zprobe_zoffset = -4.79
20:58:01.659 : > home_offset[Z] = 0.00
20:58:01.663 : current_position=(90.00, 90.00, 4.79) :
20:58:01.663 : <<< set_axis_is_at_home(Z)
20:58:01.671 : current_position=(90.00, 90.00, 4.79) : sync_plan_position
20:58:01.675 : current_position=(90.00, 90.00, 4.79) : > AFTER set_axis_is_at_home
20:58:01.680 : current_position=(90.00, 90.00, 4.79) : set_probe_deployed
20:58:01.684 : deploy: 0
20:58:01.684 : do_probe_raise(3.00)
20:58:01.688 : >>> do_blocking_move_to(90.00, 90.00, 7.79)
20:58:01.692 : <<< do_blocking_move_to
20:58:03.125 : >>> do_blocking_move_to(90.00, 90.00, 7.79)
20:58:03.130 : <<< do_blocking_move_to
20:58:03.130 : <<< homeaxis(Z)
20:58:03.130 : <<< Z_SAFE_HOMING
20:58:03.138 : current_position=(90.00, 90.00, 7.79) : sync_plan_position
20:58:03.142 : current_position=(90.00, 90.00, 7.79) : bracket_probe_move
20:58:03.146 : X:90.00 Y:90.00 Z:7.79 E:0.00 Count X:7200 Y:7200 Z:31160
20:58:03.146 : <<< G28
@autonumous
Copy link

autonumous commented Jun 18, 2018

you have ENDSTOP_NOISE_FILTER defined? possibly similar to the issue I posted, see thread #10986 (albeit bugfix-1.1.x, and bed moves the other way)

@lrpirlet
Copy link
Contributor Author

lrpirlet commented Jun 19, 2018

@autonumous
Thanks, with your input it works as expected…

It also means that the routine enabled by ENDSTOP_NOISE_FILTER is buggy...

This is the minimum modification needed to make it work as expected…

$ git diff 225b2546c
diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index 33fb9df8e..55847ee25 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -576,7 +576,7 @@
  * based on the Makerbot design, since they already include the 100nF capacitor.)
  */
 //#define ENDSTOP_NOISE_FILTER lrp changed... it needs to put capacitor...
-#define ENDSTOP_NOISE_FILTER
+//#define ENDSTOP_NOISE_FILTER

 //=============================================================================
 //============================== Movement Settings ============================

@lrpirlet
Copy link
Contributor Author

@thinkyhead
My problem is gone, there is most probably an issue hidden with the setting of ENDSTOP_NOISE_FILTER...

I have not the skill (given the time I can spend) to debug this problem...

I have no problem testing…. If you want, I'll keep my branch open till closure of this bug report:
https://github.com/lrpirlet/Marlin/tree/lrpv2

Just tell me.

@ejtagle
Copy link
Contributor

ejtagle commented Jun 19, 2018

@lrpirlet : ENDSTOP_NOISE_FILTER works as expected. It just waits until the endstop line stops changing and, only at that time, it uses the endstop value as the accepted (denoised) value.
If disabling ENDSTOP_NOISE_FILTER makes it work, the problem is probably your endstop switch is broken or has a loose connection. So, it just gives an small pulse when the endstop is hit, instead of keeping the signal at its active state, as it should.

@AnHardt
Copy link
Member

AnHardt commented Jun 19, 2018

The other way around.
If there is no second (slow) approach the endstop probably still reports triggered.

@lrpirlet
Copy link
Contributor Author

Please disregard hardware failure, it worked fine before I went to bugfix-2...
It NOW works as expected after commenting //#define ENDSTOP_NOISE_FILTER

@ejtagle
Copy link
Contributor

ejtagle commented Jun 19, 2018

The previous implementation had a 2 sample noise filter enabled at all times. The new approach, if you comment out (ENDSTOP_NOISE_FILTER) has no filter at all, and, if you enable it, has a filter that waits 7 samples with the same value before accepting the new endstop state... Sampling is done every 1mS ..
There is nothing wrong disabling the noise filter. In fact, that is what we encourage to do

@autonumous
Copy link

As previously mentioned in another thread (#10986), on my setup, I do see a change in Z behaviour when enabling ENDSTOP_NOISE_FILTER. Whether directly or indirectly, setting that option caused homing issues on the Z axis where the bed moved the wrong direction.

For me, it was easier to fix the issue that required me to use that option (by adding a capacitor to the Endstop) which was only introduced around May 21st

@thinkyhead
Copy link
Member

thinkyhead commented Jun 20, 2018

@ejtagle — The endstop noise filter requires 7 samples before it trusts that the endstop state has changed, and this counting only occurs in endstops.update, which is only called when the endstops are set as enabled. Therefore, if the endstop triggers or un-triggers and then the axis changes direction, it will require 7 samples (only while endstops are enabled) before it realizes the endstop state has changed.

So perhaps the endstop filter should be in effect at a lower level —at all times— and not just count-down when endstops are enabled.

@ejtagle
Copy link
Contributor

ejtagle commented Jun 20, 2018

Teoretically, when you enable ENDSTOP_NOISE_FILTER then it should start calling update() from the temperature ISR as well.. At least, that was the way i implemented it

@thinkyhead
Copy link
Member

thinkyhead commented Jun 20, 2018

Only endstops.poll is called from temperature.cpp, not endstops.update, so endstops.update is still only called when endstops.enabled is true.

@ejtagle
Copy link
Contributor

ejtagle commented Jun 20, 2018

endstops.poll() calls update() (otherwise, a horrible bug would be there... )

@thinkyhead
Copy link
Member

But endstops.update is only called when endstops.enabled is true. If endstops are disabled in-between moves towards the endstops, they will appear to still be triggered at the start of the second move.

@ejtagle
Copy link
Contributor

ejtagle commented Jun 20, 2018

Humm.. Then we have a problem. Maybe it should always be called ?

@ejtagle
Copy link
Contributor

ejtagle commented Jun 20, 2018

Humm... good question. Yes, this seems incorrect, but the periodic polling must be done periodically...

@thinkyhead
Copy link
Member

thinkyhead commented Jun 20, 2018

The best solution to avoid side-effects would seem to be testing the endstops at all times and maintaining the "validated state" as a lowest-level value.

@ejtagle
Copy link
Contributor

ejtagle commented Jun 20, 2018

I was thinking on the purpose of ENDSTOPS_ENABLED

@ejtagle
Copy link
Contributor

ejtagle commented Jun 20, 2018

Yes, the idea is to always poll... or at least, when the endstop_poll_count > 0

@ejtagle
Copy link
Contributor

ejtagle commented Jun 20, 2018

Please, correct me if i am wrong @thinkyhead : The purpose of ENDSTOPS_ENABLED is just to filter out the reporting of endstops being hit - If that is the case, then we can modify easily the endstops::update() function to keep polling and only report if endstops are enabled

@thinkyhead
Copy link
Member

thinkyhead commented Jun 20, 2018

Correct. The ENDSTOPS_ENABLED test tells the stepper ISR that if an endstop or probe is triggered then the current move should abort.

@lrpirlet
Copy link
Contributor Author

Do you want me to test anything?

@ejtagle
Copy link
Contributor

ejtagle commented Jun 21, 2018

Let me check your config file...

@ejtagle
Copy link
Contributor

ejtagle commented Jun 21, 2018

@lrpirlet : Could you try increasing Z_HOME_BUMP_MM to 5 , and enable the ENDSTOP_NOISE_FILTER ?

The default 2mm bump for Z and the default speed of 4mm/s should give 0.5seconds for the bump, and that is 500 endstop samples ... unless the endstop code is disabled while performing the sampling... But i think it is not...

@lrpirlet
Copy link
Contributor Author

lrpirlet commented Jun 22, 2018

@ejtagle @thinkyhead

Please note that I had to edit Marlin/src/module/endstops.h to remove a duplicate declaration that made PlatformIO to stop on error…

git diff shows

diff --git a/Marlin/src/module/endstops.h b/Marlin/src/module/endstops.h
index 830b1515b..7b41977bf 100644
--- a/Marlin/src/module/endstops.h
+++ b/Marlin/src/module/endstops.h
@@ -73,7 +73,7 @@ class Endstops {

     #if ENABLED(ENDSTOP_NOISE_FILTER)
       static esbits_t validated_live_state;
-      uint8_t Endstops::endstop_poll_count;
+      // uint8_t Endstops::endstop_poll_count;
       static uint8_t endstop_poll_count;    // Countdown from threshold for polling
     #endif

Tested as per request with ENDSTOP_NOISE_FILTER enabled and Z_HOME_BUMP_MM set to 5…

SAME BEHAVIOUR : it fails to execute a second bump….

Also, a subsequent G30 fails as it does not touch the bed

Log Output
20:40:40.943 : Printer reset detected - initalizing
20:40:40.943 : start
20:40:40.943 : echo: External Reset
20:40:40.947 : Marlin bugfix-2.0.x
20:40:40.951 : echo: Last Updated: 2018-01-20 | Author: LRP
20:40:40.951 : echo:Compiled: Jun 22 2018
20:40:40.955 : echo: Free Memory: 2571  PlannerBufferBytes: 1488
20:40:40.976 : echo:V55 stored settings retrieved (655 bytes; crc 23719)
20:40:40.980 : Unified Bed Leveling System v1.01 inactive.
20:40:41.033 : Unified Bed Leveling initialized.
20:40:41.037 : UBL System reset()
20:40:41.037 : echo:  G21    ; Units in mm (mm)
20:40:41.041 : echo:  M149 C ; Units in Celsius
20:40:41.046 : echo:Filament settings: Disabled
20:40:41.046 : echo:  M200 D3.00
20:40:41.046 : echo:  M200 D0
20:40:41.050 : echo:Steps per unit:
20:40:41.054 : echo:  M92 X80.00 Y80.00 Z4000.00 E402.00
20:40:41.054 : echo:Maximum feedrates (units/s):
20:40:41.058 : echo:  M203 X300.00 Y300.00 Z3.00 E45.00
20:40:41.062 : echo:Maximum Acceleration (units/s2):
20:40:41.066 : echo:  M201 X3000 Y3000 Z100 E10000
20:40:41.070 : echo:Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
20:40:41.074 : echo:  M204 P3000.00 R3000.00 T3000.00
20:40:41.083 : echo:Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>
20:40:41.087 : echo:  M205 B20000 S0.00 T0.00 J0.02
20:40:41.087 : echo:Home offset:
20:40:41.091 : echo:  M206 X0.00 Y0.00 Z0.00
20:40:41.095 : echo:Unified Bed Leveling:
20:40:41.095 : echo:  M420 S0 Z10.00
20:40:41.099 : Unified Bed Leveling System v1.01 inactive.
20:40:41.150 : N1 M110*34
20:40:41.152 : Active Mesh Slot: -1
20:40:41.152 : EEPROM can hold 9 meshes.
20:40:41.152 : echo:  G29 I99
20:40:41.156 : echo:  M421 I0 J0 Z0.00
20:40:41.233 : echo:  M421 I0 J1 Z0.00
20:40:41.311 : echo:  M421 I0 J2 Z0.00
20:40:41.385 : echo:  M421 I0 J3 Z0.00
20:40:41.463 : echo:  M421 I0 J4 Z0.00
20:40:41.541 : echo:  M421 I0 J5 Z0.00
20:40:41.618 : echo:  M421 I0 J6 Z0.00
20:40:41.692 : echo:  M421 I0 J7 Z0.00
20:40:41.770 : echo:  M421 I0 J8 Z0.00
20:40:41.848 : echo:  M421 I1 J0 Z0.00
20:40:41.926 : echo:  M421 I1 J1 Z0.00
20:40:42.003 : echo:  M421 I1 J2 Z0.00
20:40:42.077 : echo:  M421 I1 J3 Z0.00
20:40:42.155 : echo:  M421 I1 J4 Z0.00
20:40:42.233 : echo:  M421 I1 J5 Z0.00
20:40:42.311 : echo:  M421 I1 J6 Z0.00
20:40:42.388 : echo:  M421 I1 J7 Z0.00
20:40:42.462 : echo:  M421 I1 J8 Z0.00
20:40:42.541 : echo:  M421 I2 J0 Z0.00
20:40:42.619 : echo:  M421 I2 J1 Z0.00
20:40:42.695 : echo:  M421 I2 J2 Z0.00
20:40:42.770 : echo:  M421 I2 J3 Z0.00
20:40:42.848 : echo:  M421 I2 J4 Z0.00
20:40:42.926 : echo:  M421 I2 J5 Z0.00
20:40:43.004 : echo:  M421 I2 J6 Z0.00
20:40:43.080 : echo:  M421 I2 J7 Z0.00
20:40:43.155 : echo:  M421 I2 J8 Z0.00
20:40:43.233 : echo:  M421 I3 J0 Z0.00
20:40:43.311 : echo:  M421 I3 J1 Z0.00
20:40:43.389 : echo:  M421 I3 J2 Z0.00
20:40:43.466 : echo:  M421 I3 J3 Z0.00
20:40:43.540 : echo:  M421 I3 J4 Z0.00
20:40:43.618 : echo:  M421 I3 J5 Z0.00
20:40:43.696 : echo:  M421 I3 J6 Z0.00
20:40:43.774 : echo:  M421 I3 J7 Z0.00
20:40:43.847 : echo:  M421 I3 J8 Z0.00
20:40:43.925 : echo:  M421 I4 J0 Z0.00
20:40:44.003 : echo:  M421 I4 J1 Z0.00
20:40:44.081 : echo:  M421 I4 J2 Z0.00
20:40:44.159 : echo:  M421 I4 J3 Z0.00
20:40:44.232 : echo:  M421 I4 J4 Z0.00
20:40:44.310 : echo:  M421 I4 J5 Z0.00
20:40:44.388 : echo:  M421 I4 J6 Z0.00
20:40:44.466 : echo:  M421 I4 J7 Z0.00
20:40:44.544 : echo:  M421 I4 J8 Z0.00
20:40:44.617 : echo:  M421 I5 J0 Z0.00
20:40:44.695 : echo:  M421 I5 J1 Z0.00
20:40:44.773 : echo:  M421 I5 J2 Z0.00
20:40:44.851 : echo:  M421 I5 J3 Z0.00
20:40:44.925 : echo:  M421 I5 J4 Z0.00
20:40:45.002 : echo:  M421 I5 J5 Z0.00
20:40:45.080 : echo:  M421 I5 J6 Z0.00
20:40:45.158 : echo:  M421 I5 J7 Z0.00
20:40:45.236 : echo:  M421 I5 J8 Z0.00
20:40:45.310 : echo:  M421 I6 J0 Z0.00
20:40:45.387 : echo:  M421 I6 J1 Z0.00
20:40:45.465 : echo:  M421 I6 J2 Z0.00
20:40:45.543 : echo:  M421 I6 J3 Z0.00
20:40:45.621 : echo:  M421 I6 J4 Z0.00
20:40:45.694 : echo:  M421 I6 J5 Z0.00
20:40:45.772 : echo:  M421 I6 J6 Z0.00
20:40:45.850 : echo:  M421 I6 J7 Z0.00
20:40:45.928 : echo:  M421 I6 J8 Z0.00
20:40:46.002 : echo:  M421 I7 J0 Z0.00
20:40:46.079 : echo:  M421 I7 J1 Z0.00
20:40:46.157 : echo:  M421 I7 J2 Z0.00
20:40:46.235 : echo:  M421 I7 J3 Z0.00
20:40:46.313 : echo:  M421 I7 J4 Z0.00
20:40:46.387 : echo:  M421 I7 J5 Z0.00
20:40:46.464 : echo:  M421 I7 J6 Z0.00
20:40:46.542 : echo:  M421 I7 J7 Z0.00
20:40:46.620 : echo:  M421 I7 J8 Z0.00
20:40:46.698 : echo:  M421 I8 J0 Z0.00
20:40:46.772 : echo:  M421 I8 J1 Z0.00
20:40:46.849 : echo:  M421 I8 J2 Z0.00
20:40:46.927 : echo:  M421 I8 J3 Z0.00
20:40:47.005 : echo:  M421 I8 J4 Z0.00
20:40:47.079 : echo:  M421 I8 J5 Z0.00
20:40:47.157 : echo:  M421 I8 J6 Z0.00
20:40:47.234 : echo:  M421 I8 J7 Z0.00
20:40:47.312 : echo:  M421 I8 J8 Z0.00
20:40:47.391 : echo:Material heatup parameters:
20:40:47.391 : echo:  M145 S0 H180 B70 F0
20:40:47.395 : echo:  M145 S1 H240 B110 F0
20:40:47.395 : echo:PID settings:
20:40:47.399 : echo:  M301 P21.90 I1.43 D83.96
20:40:47.403 : echo:Z-Probe Offset (mm): (mm):
20:40:47.403 : echo:  M851 Z-4.79
20:40:50.683 : ok
20:40:50.683 : N2 M115*36
20:40:51.197 : echo:SD card ok
20:40:51.295 : FIRMWARE_NAME:Marlin bugfix-2.0.x (Github) SOURCE_CODE_URL:https://github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:Pi3 3D LabteK EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
20:40:51.295 : Cap:SERIAL_XON_XOFF:0
20:40:51.295 : Cap:EEPROM:1
20:40:51.299 : Cap:VOLUMETRIC:1
20:40:51.299 : Cap:AUTOREPORT_TEMP:1
20:40:51.299 : Cap:PROGRESS:0
20:40:51.302 : Cap:PRINT_JOB:1
20:40:51.302 : Cap:AUTOLEVEL:1
20:40:51.302 : Cap:Z_PROBE:1
20:40:51.306 : Cap:LEVELING_DATA:1
20:40:51.306 : Cap:BUILD_PERCENT:0
20:40:51.310 : Cap:SOFTWARE_POWER:0
20:40:51.310 : Cap:TOGGLE_LIGHTS:0
20:40:51.314 : Cap:CASE_LIGHT_BRIGHTNESS:0
20:40:51.314 : Cap:EMERGENCY_PARSER:0
20:40:51.318 : Cap:AUTOREPORT_SD_STATUS:0
20:40:51.318 : Cap:THERMAL_PROTECTION:1
20:40:51.322 : ok
20:40:51.348 : N4 M114*35
20:40:51.367 : X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0
20:40:51.367 : ok
20:40:51.367 : N5 M111 S6*98
20:40:51.388 : echo:DEBUG:INFO,ERRORS
20:40:51.388 : ok
20:40:51.388 : N6 T0*60
20:40:51.392 : echo:Active Extruder: 0
20:40:51.392 : ok
20:40:51.392 : N7 M20*22
20:40:51.396 : Begin file list
20:40:51.466 : End file list
20:40:51.466 : ok
20:40:51.466 : N8 M80*19
20:40:51.470 : echo:Unknown command: "M80"
20:40:51.470 : ok
20:40:51.470 : N9 M20*24
20:40:51.474 : Begin file list
20:40:51.544 : End file list
20:40:51.544 : ok
20:40:51.544 : N10 M220 S100*80
20:40:51.548 : ok
20:40:51.548 : N11 M221 S100*80
20:40:51.552 : ok
20:40:51.552 : N12 M111 S6*84
20:40:51.556 : echo:DEBUG:INFO,ERRORS
20:40:51.556 : ok
20:40:51.556 : N13 T0*8
20:40:51.560 : echo:Active Extruder: 0
20:40:51.560 : ok
20:40:51.561 : N14 M155 S1*85
20:40:51.564 : ok
20:41:22.008 : N15 M111 S32*100
20:41:22.015 : echo:DEBUG:LEVELING
20:41:22.015 : ok
20:41:46.788 : N16 M113 S0*84
20:41:46.793 : ok
20:41:46.793 : N17 M155 S0*87
20:41:46.797 : ok
20:41:46.797 : N18 M111 S32*105
20:41:46.801 : echo:DEBUG:LEVELING
20:41:46.801 : ok
20:41:46.802 : N19 G28*43
20:41:46.805 : >>> G28
20:41:46.810 : Machine Type: Cartesian
20:41:46.810 : Probe: SERVO PROBE
20:41:46.814 : Probe Offset X:0 Y:0 Z:-4.79 (Aligned With & Below Nozzle)
20:41:46.818 : Auto Bed Leveling: UBL (disabled)
20:41:46.822 : current_position=(0.00, 0.00, 0.00) : bracket_probe_move
20:41:46.826 : > endstops.enable(true)
20:41:46.826 : Raise Z (before homing) to 3.00
20:41:46.830 : >>> do_blocking_move_to(0.00, 0.00, 3.00)
20:41:46.834 : <<< do_blocking_move_to
20:41:47.965 : >>> homeaxis(X)
20:41:47.965 : Home 1 Fast:
20:41:47.969 : >>> do_homing_move(X, -270.00, [50.00])
20:41:47.973 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:41:49.997 : <<< do_homing_move(X)
20:41:49.997 : Move Away:
20:41:50.001 : >>> do_homing_move(X, 5.00, [50.00])
20:41:50.005 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:41:50.222 : <<< do_homing_move(X)
20:41:50.226 : Home 2 Slow:
20:41:50.226 : >>> do_homing_move(X, -10.00, 25.00)
20:41:50.234 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:41:50.337 : <<< do_homing_move(X)
20:41:50.341 : >>> set_axis_is_at_home(X)
20:41:50.341 : For X axis:
20:41:50.341 : home_offset = 0.00
20:41:50.345 : position_shift = 0.00
20:41:50.345 : soft_endstop_min = 0.00
20:41:50.349 : soft_endstop_max = 180.00
20:41:50.349 : > home_offset[X] = 0.00
20:41:50.353 : current_position=(0.00, 0.00, 3.00) :
20:41:50.357 : <<< set_axis_is_at_home(X)
20:41:50.361 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:41:50.366 : current_position=(0.00, 0.00, 3.00) : > AFTER set_axis_is_at_home
20:41:50.370 : <<< homeaxis(X)
20:41:50.370 : >>> homeaxis(Y)
20:41:50.370 : Home 1 Fast:
20:41:50.374 : >>> do_homing_move(Y, -270.00, [50.00])
20:41:50.378 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:41:52.401 : <<< do_homing_move(Y)
20:41:52.401 : Move Away:
20:41:52.405 : >>> do_homing_move(Y, 5.00, [50.00])
20:41:52.409 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:41:52.635 : <<< do_homing_move(Y)
20:41:52.639 : Home 2 Slow:
20:41:52.639 : >>> do_homing_move(Y, -10.00, 25.00)
20:41:52.647 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:41:52.749 : <<< do_homing_move(Y)
20:41:52.753 : >>> set_axis_is_at_home(Y)
20:41:52.753 : For Y axis:
20:41:52.753 : home_offset = 0.00
20:41:52.757 : position_shift = 0.00
20:41:52.757 : soft_endstop_min = 0.00
20:41:52.761 : soft_endstop_max = 180.00
20:41:52.761 : > home_offset[Y] = 0.00
20:41:52.765 : current_position=(0.00, 0.00, 3.00) :
20:41:52.769 : <<< set_axis_is_at_home(Y)
20:41:52.774 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:41:52.778 : current_position=(0.00, 0.00, 3.00) : > AFTER set_axis_is_at_home
20:41:52.782 : <<< homeaxis(Y)
20:41:52.782 : Z_SAFE_HOMING >>>
20:41:52.786 : current_position=(0.00, 0.00, 3.00) : sync_plan_position
20:41:52.790 : destination=(90.00, 90.00, 3.00) : Z_SAFE_HOMING
20:41:52.794 : >>> do_blocking_move_to(90.00, 90.00, 3.00)
20:41:52.798 : <<< do_blocking_move_to
20:41:53.892 : >>> homeaxis(Z)
20:41:53.900 : current_position=(90.00, 90.00, 3.00) : set_probe_deployed
20:41:53.900 : deploy: 1
20:41:53.900 : do_probe_raise(3.00)
20:41:53.904 : >>> do_blocking_move_to(90.00, 90.00, 7.79)
20:41:53.908 : <<< do_blocking_move_to
20:41:55.940 : >>> do_blocking_move_to(90.00, 90.00, 7.79)
20:41:55.944 : <<< do_blocking_move_to
20:41:55.945 : Home 1 Fast:
20:41:55.949 : >>> do_homing_move(Z, -252.00, [4.00])
20:41:55.953 : current_position=(90.00, 90.00, 0.00) : sync_plan_position
20:42:01.351 : <<< do_homing_move(Z)
20:42:01.351 : Move Away:
20:42:01.355 : >>> do_homing_move(Z, 5.00, 4.00)
20:42:01.359 : current_position=(90.00, 90.00, 0.00) : sync_plan_position
20:42:03.165 : <<< do_homing_move(Z)
20:42:03.165 : Home 2 Slow:
20:42:03.169 : >>> do_homing_move(Z, -10.00, 2.00)
20:42:03.173 : current_position=(90.00, 90.00, 0.00) : sync_plan_position
20:42:03.284 : <<< do_homing_move(Z)
20:42:03.284 : >>> set_axis_is_at_home(Z)
20:42:03.289 : For Z axis:
20:42:03.289 : home_offset = 0.00
20:42:03.293 : position_shift = 0.00
20:42:03.293 : soft_endstop_min = 0.00
20:42:03.297 : soft_endstop_max = 168.00
20:42:03.301 : *** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***
20:42:03.301 : > zprobe_zoffset = -4.79
20:42:03.305 : > home_offset[Z] = 0.00
20:42:03.309 : current_position=(90.00, 90.00, 4.79) :
20:42:03.309 : <<< set_axis_is_at_home(Z)
20:42:03.317 : current_position=(90.00, 90.00, 4.79) : sync_plan_position
20:42:03.321 : current_position=(90.00, 90.00, 4.79) : > AFTER set_axis_is_at_home
20:42:03.326 : current_position=(90.00, 90.00, 4.79) : set_probe_deployed
20:42:03.330 : deploy: 0
20:42:03.330 : do_probe_raise(3.00)
20:42:03.334 : >>> do_blocking_move_to(90.00, 90.00, 7.79)
20:42:03.338 : <<< do_blocking_move_to
20:42:04.771 : >>> do_blocking_move_to(90.00, 90.00, 7.79)
20:42:04.775 : <<< do_blocking_move_to
20:42:04.775 : <<< homeaxis(Z)
20:42:04.775 : <<< Z_SAFE_HOMING
20:42:04.784 : current_position=(90.00, 90.00, 7.79) : sync_plan_position
20:42:04.788 : current_position=(90.00, 90.00, 7.79) : bracket_probe_move
20:42:04.792 : X:90.00 Y:90.00 Z:7.79 E:0.00 Count X:7200 Y:7200 Z:31160
20:42:04.792 : <<< G28
20:42:04.792 : ok
20:42:04.792 : N20 G30 X10 Y10*41
20:42:04.817 : current_position=(90.00, 90.00, 7.79) : bracket_probe_move
20:42:04.821 : >>> probe_pt(10.00, 10.00, stow, 1, probe_relative)
20:42:04.825 : current_position=(90.00, 90.00, 7.79) :
20:42:04.829 : >>> do_blocking_move_to(10.00, 10.00, 7.79)
20:42:04.829 : <<< do_blocking_move_to
20:42:05.824 : current_position=(10.00, 10.00, 7.79) : set_probe_deployed
20:42:05.824 : deploy: 1
20:42:05.824 : do_probe_raise(3.00)
20:42:06.132 : >>> do_blocking_move_to(10.00, 10.00, 7.79)
20:42:06.132 : <<< do_blocking_move_to
20:42:06.136 : current_position=(10.00, 10.00, 7.79) : >>> run_z_probe
20:42:06.143 : current_position=(10.00, 10.00, 7.79) : >>> do_probe_move
20:42:06.143 : >>> do_blocking_move_to(10.00, 10.00, 2.79)
20:42:06.147 : <<< do_blocking_move_to
20:42:08.785 : current_position=(10.00, 10.00, 2.79) : sync_plan_position
20:42:08.789 : current_position=(10.00, 10.00, 2.79) : <<< do_probe_move
20:42:08.794 : SLOW Probe fail!
20:42:08.798 : current_position=(10.00, 10.00, 2.79) : <<< run_z_probe
20:42:08.802 : current_position=(10.00, 10.00, 2.79) : set_probe_deployed
20:42:08.802 : deploy: 0
20:42:08.806 : do_probe_raise(3.00)
20:42:08.810 : >>> do_blocking_move_to(10.00, 10.00, 7.79)
20:42:08.810 : <<< do_blocking_move_to
20:42:10.916 : >>> do_blocking_move_to(10.00, 10.00, 7.79)
20:42:10.916 : <<< do_blocking_move_to
20:42:10.920 : Error:Probing failed
20:42:10.921 : <<< probe_pt
20:42:10.924 : current_position=(10.00, 10.00, 7.79) : bracket_probe_move
20:42:10.932 : X:10.00 Y:10.00 Z:7.79 E:0.00 Count X:800 Y:800 Z:31160
20:42:10.932 : ok

WhatIHaveDone.txt

@lrpirlet
Copy link
Contributor Author

@thinkyhead @ejtagle
Please note that I see the problem on ALL 3 AXIS: X, Y and Z...

@ejtagle
Copy link
Contributor

ejtagle commented Jun 22, 2018

@lrpirlet Could you try latest bugfix2.0.x with the following endstops.cpp file ?

endstops.zip

@ejtagle
Copy link
Contributor

ejtagle commented Jun 22, 2018

@thinkyhead : I could be wrong here, but i think the already merged PR #11066 is not enough. If you read endstops::update(), you will notice the endstop state is ONLY read if steppers.axis_is_moving() returns true. That will only return true if the motors are moving, Something that will not happen when the move stops due to an endstop being hit.
That causes all endstops, after 7 samples, to be reported as open...

@lrpirlet
Copy link
Contributor Author

lrpirlet commented Jun 23, 2018

@ejtagle @thinkyhead

Thanks ejtagle, with the new endstops.cpp, it does work as expected…

Note that I set back the Z_HOME_BUMP_MM to 2 and it still continue working as expected…
Note that G28, G30 and M48 now works fine…

I would have closed this entry… do you want me to raise a PR for the duplicated declaration in endstops.h? (see 4 entries above)

Log Output
09:35:48.507 : N15 G28*39
09:35:50.515 : echo:busy: processing
09:35:52.514 : echo:busy: processing
09:35:54.534 : echo:busy: processing
09:35:56.532 : echo:busy: processing
09:35:58.535 : echo:busy: processing
09:36:00.535 : echo:busy: processing
09:36:02.538 : echo:busy: processing
09:36:04.811 : X:90.00 Y:90.00 Z:7.79 E:0.00 Count X:7200 Y:7200 Z:31160
09:36:04.812 : ok
09:36:09.586 : N16 G30*45
09:36:11.591 : echo:busy: processing
09:36:12.946 : Bed X: 90.00 Y: 90.00 Z: 0.04
09:36:12.951 : X:90.00 Y:90.00 Z:7.79 E:0.00 Count X:7200 Y:7200 Z:31160
09:36:12.954 : ok
09:36:24.371 : N17 M48 V4*107
09:36:24.375 : M48 Z-Probe Repeatability Test
09:36:24.379 : Positioning the probe...
09:36:26.374 : echo:busy: processing
09:36:27.104 : Bed X: 90.000 Y: 90.000 Z: 0.013
09:36:28.378 : echo:busy: processing
09:36:29.037 : 1 of 10: z: 0.010 mean: 0.0095 sigma: 0.000000 min: 0.010 max: 0.010 range: 0.000
09:36:30.380 : echo:busy: processing
09:36:30.975 : 2 of 10: z: -0.004 mean: 0.0025 sigma: 0.007000 min: -0.004 max: 0.010 range: 0.014
09:36:32.380 : echo:busy: processing
09:36:32.908 : 3 of 10: z: -0.006 mean: -0.0004 sigma: 0.007049 min: -0.006 max: 0.010 range: 0.016
09:36:34.383 : echo:busy: processing
09:36:34.838 : 4 of 10: z: -0.002 mean: -0.0008 sigma: 0.006143 min: -0.006 max: 0.010 range: 0.016
09:36:36.382 : echo:busy: processing
09:36:36.780 : 5 of 10: z: -0.016 mean: -0.0038 sigma: 0.008191 min: -0.016 max: 0.010 range: 0.026
09:36:38.385 : echo:busy: processing
09:36:38.725 : 6 of 10: z: -0.016 mean: -0.0058 sigma: 0.008694 min: -0.016 max: 0.010 range: 0.026
09:36:40.384 : echo:busy: processing
09:36:40.658 : 7 of 10: z: -0.016 mean: -0.0073 sigma: 0.008836 min: -0.016 max: 0.010 range: 0.026
09:36:42.387 : echo:busy: processing
09:36:42.592 : 8 of 10: z: -0.020 mean: -0.0089 sigma: 0.009268 min: -0.020 max: 0.010 range: 0.030
09:36:44.418 : echo:busy: processing
09:36:44.533 : 9 of 10: z: -0.018 mean: -0.0099 sigma: 0.009169 min: -0.020 max: 0.010 range: 0.030
09:36:46.418 : echo:busy: processing
09:36:46.463 : 10 of 10: z: -0.014 mean: -0.0103 sigma: 0.008775 min: -0.020 max: 0.010 range: 0.030
09:36:47.237 : Finished!
09:36:47.241 : Mean: -0.010275 Min: -0.020 Max: 0.010 Range: 0.030
09:36:47.245 : Standard Deviation: 0.008775
09:36:47.249 : X:90.00 Y:90.00 Z:7.79 E:0.00 Count X:7200 Y:7200 Z:31160
09:36:47.249 : ok

@ejtagle
Copy link
Contributor

ejtagle commented Jun 23, 2018

@lrpirlet: Donñt worry, i am raising a PR with both fixes (and an extra one to the Planner...) in a few hours... Thanks for confirming the fix works (i was not sure, as in my case the fix was not required)

@thinkyhead
Copy link
Member

thinkyhead commented Jun 30, 2018

Seems we're still having some endstop issues. (e.g., #10986). Please test the latest code, doing multiple G28 commands, to see if homing is behaving the way it should 100% of the time.

@lrpirlet
Copy link
Contributor Author

lrpirlet commented Jul 2, 2018

@thinkyhead
I have rebased lrpv2 to current mainstream… (lrpv2 is now "hanging from" commit 8299ac1)
I have run 12+ iteration of G28... NO PROBLEM at all (statistically that leaves a very low probability of an intermittent problem, yet still possible.) Please note that I do NOT use interrupt to detect endstop change, that I disable auto reporting of temperature and stop sending busy message while executing G28 (I have no added precision with interrupt but I risk my bed if interrupt is missed, I feel that Repetier is overdoing it by requesting a temperature reading every second, I see no use for those messages clutering the console)

Log is https://github.com/lrpirlet/Marlin/blob/lrpv2/Marlin/WhatIHaveDone.txt

sorry no time for text formating…. I need to drop now… tell me if you want more testing, I'll try my best.

@thinkyhead
Copy link
Member

AUTO_REPORT_TEMPERATURES is a good option to quiet down the host. Repetier should notice that it's enabled and stop sending M105 commands. Then M155 can also be used to set a longer interval.

@boelle
Copy link
Contributor

boelle commented Feb 20, 2019

@lrpirlet has problem gone away in latest bugfix 2.0?

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants