3.5.0rc4 - G29 crashes nozzle into bed after first probe point
-
adding configuration:
config.g
;=== initialize variables ===; M98 P"0:/sys/init.g" ;=== discard if necessary ===; ;=== configuration - initial networking setup ===; M586 P0 S1 ;; enable http, disable ftp, disable telnet, set printer name, wait 5s for expansion boards M586 P1 S0 M586 P2 S0 G4 S5 M550 P"legionXY" ;; in SBC mode, M550 goes in dsf-config.g, not config.g ;=== configuration - PanelDue init ===; M575 P1 S1 B115200 ;=== configuration - printer ===; G90 ;; absolute coordinates, relative extruder moves M83 M669 K1 ;; Kinematics type: 1 = CoreXY ;=== configuration - drive ===; M569 P0.0 S0 D2 ;; Z-axis motors, 0.driver0,0.driver1,0.driver2 M569 P0.1 S0 D2 M569 P0.2 S0 D2 M569 P0.3 S1 D2 ;; Left and right motors (X- and Y- axis), 0.driver3,0.driver4 M569 P0.4 S1 D2 M569 P20.0 S1 D2 ;; Extruder, RRF36.driver0 ;=== configuration - drive - axis mapping ===; M584 X0.3 Y0.4 Z0.1:0.0:0.2 E20.0 ;; map E-axis here as toolboard will be connected ;=== configuration - drive - microstepping ===; M350 X16 Y16 Z16 I1 ;=== configuration - drive - steps/mm, current, idle timeout ===; M92 X80 Y80 Z800 ;; set steps/mm, current (mA), idle timeout M906 X1600 Y1600 Z1600 I30 M84 S30 ;; set idle hold 30s ;=== configuration - drive - speed, acceeleration, jerk ===; M98 P"0:/sys/setMaxSpeed.g" ;; set all the max speeds below as these are adjusted during home moves so we only want to adjust in one spot ;=== configuration - axis - min/max ===; M208 X0 Y0 Z0 S1 M208 X310 Y300 Z300 S0 ;=== configuration - axis - endstops ===; M574 X1 S1 P"20.io2.in" ;; configure active high (S1) X endstop at X- (X1) on RRF36.io2.in (20.io.in) M574 Y2 S1 P"0.io2.in" ;; configure Y active high (S1) endstop at Y+ (Y2) on duet.io2.in (0.io2.in) M574 Z1 S2 ;; configure Z-probe (S2) endstop at low end (Z1) ;=== configuration - axis - z-probe ===; M558 P8 C"^20.io0.in" H5:1 F300:120 T6000 A20 B0 ;; klicky pcb probe installed on RRF36.io0.in (20.io0.in) M98 P"0:/sys/setBuildPlate.g" ;; see setBuildPlate.g for Z probe trigger value, offset, trigger height ;=== configuration - axis - mesh compensation and bed dismensions ===; M98 P"0:/sys/setDefaultProbePoints.g" ;; define mesh grid with allowance for mesh generation on printed area only if !exists(global.Bed_Center_X) ;; calculate bed center, insert into object model global Bed_Center_X = floor(move.axes[0].max / 2) if !exists(global.Bed_Center_Y) global Bed_Center_Y = floor(move.axes[1].max / 2) ;=== configuration - axis - lead screw position ===; M671 X-4.5:150:304.5 Y-4.52:305:-4.52 S5 ;=== configuration - sensor - bed heater & thermistor ===; M308 S0 P"0.temp0" Y"thermistor" T100000 B3950 A"Bed" ;; create sensor S0 on duet.temp0 named "Bed" M950 H0 C"0.out0" T0 Q11 ;; create heater (H0) for bed M307 H0 B0 S1.00 ;; on bed H0 disable bang-bang mode and set PWM limit M140 H0 ;; map heated bed to heater 0 (H0) M143 H0 S120 ;; set heater H0 temperature limit to 120C ;=== !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ===; ;; run bed PID tune using code below ;;; ;;; H0 = heater 0, or bed ;;; ;;; S = temperature in C (90C) ;;; ; M303 H0 S90 ;;; ;;; replace M307 below with results from M303 ;;; M307 may have a Vnnn included with it ;;; if you're using mains (AC) bed heater on your bed, omit it ;=== !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ===; M307 H0 R0.480 K0.256:0.000 D2.03 E1.35 S1.00 B0 ;; this is my M307, find your own ;=== configuration - sensor - chamber monitoring ===; M308 S5 P"0.io4.out+0.io4.in" Y"dht22" A"Chamber" ;; DHT22 setup M308 S8 P"S5.1" Y"dht-humidity" A"Humidity[%]" M308 S11 Y"mcu-temp" A"MCU" ;; MCU temperature, with offset M912 P0 S-1.2 ;=== configuration - LEDs, chamber ===; M950 P0 C"0.out5" Q1000 ;; configure Dayspring LEDs P0 on duet.out5 (0.out5) ;=== configuration - overrides ===; ;M501 ;; config-override.g should remain empty ;=== configuration - gizmo1 ===; M98 P"0:/sys/gizmo1.g" ;; housekeeping M568 P0 R0 S0 A0 ;; turn tool0 heater off M140 S-273.1 ;; turn bed off T0 P0 ;; select T0, don't run any toolchange macros ;=== configuration ===;
setMaxSpeed.g
;=== configuration - drive - current and idle factor ===; M906 X1600 Y1600 Z1600 I30 ;; set motor currents and motor idle factor in per cent, December 2023 M913 X100 Y100 Z100 ;; ensure motors are at 100% current after homing ;=== configuration - drive - jerk ===; M205 X5.00 Y5.00 Z0.4 P1 ;; set maximum instantaneous speed changes (mm/min) and jerk policy ;=== configuration - drive - speed ===; M203 X18000.00 Y18000.00 Z900.00 ;; set maximum speeds (mm/min) ;=== configuration - drive - acceleration ===; M201 X5000.00 Y5000.00 Z100.00 ;; set accelerations (mm/s^2), orbiter v2 M204 P2500 T5000 ;; Set printing and travel acceleration (mm/s^2)
setBuildPlate.g
;=== configuration - bed - mesh compensation ===; ;M376 H3 ;; fade mesh compensation at 3mm ;=== configuration - bed - z-probe offset ===; ;;set in config.g, but change here // old offset: G31 K0 P500 X-27.8 Y-12.0 Z1.55 G31 P500 X-23.34 Y-20.49 Z1.937 ;; klickyPCB with stock switch
setDefaultProbePoints.g
M557 X15:275 Y15:275 P7
gizmo1.g
;; gizmoN.g is the comprehensive definition of a tool (extruder, hotend, heater, thermisistor, filament monitoring, input shaping, tool and part cooling fans) ;; includes hotend (thermistor, heater), fan (tool, part), extruder (axis, microstepping), tool assignment and offset ;=== gizmo1 - fan ===; M950 F1 C"!0.out4+0.out4.tach" ;; create fan F1 named "4028" with duet.out4+duet.out4.tach (0.out4+0.out4.tach) M106 P1 C"4028" S0 H-1 ;=== gizmo1 - hotend thermistor ===; M308 S1 P"20.temp0" Y"thermistor" T100000 B4725 C7.060000e-8 A"e3drevo" ;; configure sensor 1 (S1) on pin RRF36.temp0 (20.temp0) as thermistor M950 H1 C"20.out0" T1 ;; create heater output (H1) on RRF36.out0 (20.out0) and map to sensor 1 (T1) M307 H1 B0 S1.00 ;; set PWM limit (S1.00) M563 P0 S"revo" D0 H1 F1 ;; define tool0 (T0) ;; assign fan F1, extruder drive D0 (E0) and heater H1 to tool T0 named "revo" G10 P0 X0 Y0 Z0 ;; set axis offsets, max temperature, initial temperature M143 H1 S280 G10 P0 R0 S0 ;=== gizmo1 - fan ===; M950 F1 C"!0.out4+0.out4.tach" ;; create fan F1 named "4028" with duet.out4+duet.out4.tach (0.out4+0.out4.tach) M106 P1 C"4028" S0 H-1 ;=== gizmo1 - hotend thermistor ===; M308 S1 P"20.temp0" Y"thermistor" T100000 B4725 C7.060000e-8 A"e3drevo" ;; configure sensor 1 (S1) on pin RRF36.temp0 (20.temp0) as thermistor M950 H1 C"20.out0" T1 ;; create heater output (H1) on RRF36.out0 (20.out0) and map to sensor 1 (T1) M307 H1 B0 S1.00 ;; set PWM limit (S1.00) M563 P0 S"revo" D0 H1 F1 ;; define tool0 (T0) ;; assign fan F1, extruder drive D0 (E0) and heater H1 to tool T0 named "revo" G10 P0 X0 Y0 Z0 ;; set axis offsets, max temperature, initial temperature M143 H1 S290 G10 P0 R0 S0 ;=== !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ===; ;; run hotend PID tune!! using code below ;;; T0 = PID tune tool0 ;;; S210 = temperature in C (210C) ;;; F0.45 = Fan PWM value; 0.45 = 45% ;;; ; M303 T0 S210 F0.45 ;;; replace M307 below with results from M303 ;=== !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ===; M307 H1 R3.611 K0.702:0.541 D1.95 E1.35 S1.00 B0 V23.5 ;; this is my M307, find your own ;=== gizmo1 - fan - hotend ===; M950 F0 C"20.out2" Q250 ;; create fan 0 (F0) on pin RRF.out2 (20.out2) M106 P0 C"tool" S0 H1 T45 L255 ;; set fan 0 (P0) to thermostatic control (45C), full-speed (L255) named "tool" ;=== gizmo1 - extruder ===; ;; Orbiter v2 with LDO motor M906 E1200 I10 ;; set extruder motor current and idle factor M350 E16 I1 ;; set microstepping to 16 with interpolation M92 E671.64 ;; set extruder steps per mm M203 E7200 ;; set max speed, jerk, acceleration M205 E5.0 M201 E3000 T0 P0 ;; select T0, don't run toolchange macro M703 ;; load filament specific gcode ;; I keep filament-specific PID tuning, retraction, and pressure advance ;; settings here. ;=== gizmo1 - options ===; M955 P20.0 I12 ;; accelerometer on RRF36 M950 E0 C"20.rgbled" T2 U2 Q3000000 ;; configure toolhead LED E0 on FLY36.rgbled (20.rgbled) ;M98 P"0:/sys/setFilamentMonitor.g" ;; filament monitor ;M98 P"0:/sys/setInputShaping.g" ;; input shaping parameters
mesh.g
; perform mesh compensation only where printing M98 P"0:/sys/setDefaultProbePoints.g" ; reset probe points again, just in case if (exists(param.A) && exists(param.B) && exists(param.C) && exists(param.D) && exists(param.N)) M557 X{max(move.compensation.probeGrid.mins[0],param.A),min(move.compensation.probeGrid.maxs[0],param.B)} Y{max(move.compensation.probeGrid.mins[1],param.C),min(move.compensation.probeGrid.maxs[1] ,param.D)} S{param.N} if result != 0 abort "Invalid M557 parameters" G29 S0
-
@omtek What sort of probe are you using? Is this the M588 that will be active during probing?
M558 P8 C"^20.io0.in" H5:1 F300:120 T6000 A20 B0
A height of 1 seems very close to the bed if using a probe that extends below the nozzle. Though having said that I'm not sure why that would work with rc.3 and not rc.4 unless rc.4 fixed something that means setting two probe heights works when perhaps it didn't in rc.3? Interestingly the docs do not document having two different dive heights (one for @droftarts perhaps).
-
@omtek What is in the macro that is called at the beginning of config.g? ie
M98 P"0:/sys/init.g"
If you are using a lot of variables, it's possible that the stack space used per level of expression nesting has increased. There was some new code to handle this between rc3 and rc4, but @dc42 has established that the new code to handle arrays does increase the stack space used in one of the commonly-used functions by quite a lot, even when arrays are not used. This has been fixed, but there's currently no release to test until 3.5.0 is released.
This is a similar issue to this thread: https://forum.duet3d.com/topic/35462/long-standing-macro-not-working-only-on-3-5rc4-and-mini5
Ian
-
@omtek Looking through the rest of your config.g and associated files, the only other thing I would note is that your Z axis jerk and acceleration seem high for the high number of steps per mm of the Z axis. It is configured as:
M92 X80 Y80 Z800 ;; set steps/mm, current (mA), idle timeout ... M205 X5.00 Y5.00 Z0.4 P1 ;; set maximum instantaneous speed changes (mm/min) and jerk policy M203 X18000.00 Y18000.00 Z900.00 ;; set maximum speeds (mm/min) M201 X5000.00 Y5000.00 Z100.00 ;; set accelerations (mm/s^2), orbiter v2
I don't think there were any changes between rc3 and rc4 to the motion code (see https://github.com/Duet3D/RepRapFirmware/wiki/Changelog-RRF-3.x-RC#reprapfirmware-350-rc4-changes-since-rc3), so I'm not sure why it works in rc3 and not rc4. If you could update to rc4 again, and check that the Z axis can move in the positive direction at the maximum speed, that might narrow down where this problem is coming from.
Ian
-
@gloomyandy I'm using a KlickyPCB. I don't remember when I added the second dive height (I think I was still using an inductive probe at the time) and I'm not sure why it's not documented but probing is noticeably faster when using H5:1 due to the decreased travel time.
-
init.g
if !exists(global.RunDaemon) global RunDaemon = true if !exists(global.BedPreheatTemp) global BedPreheatTemp = 60 if !exists(global.Cancelled) ; global variable for exiting out of loops global Cancelled = false if !exists(global.filamentDistance) global filamentDistance = 0 if !exists(global.filamentFeedSpeed) global filamentFeedSpeed = 180 if !exists(global.filamentRetractSpeed) global filamentRetractSpeed = 1800
It sets up some global variables I had hoped to use for universal filament load/unload but haven't fully implemented. I was planning on using them to make dropping a configuration for a ERCFv2 on top of everything a little more seamless.
I have another file of variables that gets loaded along with the ERCFv2 configuration. They were present in the OM during the first nozzle crash, but not during subsequent crashes.
ercf_init.g
;; global declarations for ERCF ;; some defaults established ;; and variables set and loaded if !exists(global.ercf_settings_loaded) ;=== configuration - general settings ===; global ercf_bowden_length = 630 ;; distance until the filaent is at the end global ercf_extruder_load_length = 50 ;; Orbiter 2.0 on EVA3 with E3D Revo Voron hotend ;=== configuration - blinky pulse count ===; global ercf_pulse_count = 0 global ercf_last_count = 0 ;=== configuration - selector ===; global ercf_selector_loaded = 0 global ercf_selector_engaged = 0 ;global ercf_selector_array = {0,22,43,69.2,90.7,112,112,112} global ercf_selector_0 = 0 global ercf_selector_1 = 24 global ercf_selector_2 = 47 global ercf_selector_3 = 70 global ercf_selector_4 = 93 global ercf_selector_5 = 116 global ercf_selector_6 = 139 global ercf_selector_7 = 162 global ercf_selector_offset = 3.700
-
@omtek It may be the stack space issue. @gloomyandy suggested @Nurgelrot rewrite his macro without so much nesting, which worked, so that may solve your problem. See their conversation on Discord here https://discord.com/channels/711873626080804914/930484450389786655/1229517039174025277
Or wait and see if the changes made post-rc4 (this one, I believe https://github.com/Duet3D/RepRapFirmware/commit/e7cc658546652d32756b1c5b05c1cf923f234edb) fix your problem when 3.5.0 stable is released (very soon!).Sorry for the damage to your machine. We try very hard NOT to break things!
Ian
-
I updated back to 3.5.0rc4 and tested the Z-motion again. Bed was able to move fully throughout it's range and I didn't observe any knocking or binding. DWC reported the speed capped out at 15mm/sec during the moves.
I double checked the original settings and my Z-axis jerk was a bit higher than the RatRig default (their M205 was Z0.1, mine was Z0.4). I've made the necessary change to my configuration.
Since I was back on 3.5.0rc4, I captured video of the occurrence, and the different behavior between H5 and H5:1.
This is with a single dive height specified in M558 (H5)
https://www.youtube.com/watch?v=SRwe0mazqtQ
This is with M558 H5:1. This is what bent the nozzle and scored the PEI.
-
@omtek just to make sure, did you do true bed leveling before the mesh?
-
@oliof Correct, during these tests/videos I ran G32 followed by a G29.
During a print, my start.g contains the G32, while the G29 is handled by the slicer start g-code calling mesh.g directly and passing the parameters for mesh generation only where printing.
start.g
T0 ; ensure the tool is selected M220 S100 ; set speed factor back to 100% in case it was changed M221 S100 ; set extrusion factor back to 100% in case it was changed M290 R0 S0 ; clear any baby-stepping M106 P0 S0 ; turn layer fan off if it is on M400 ; finish all moves, clear the buffer M98 P"0:/sys/setBuildPlate.g" ; pull in build plate parameters ; heightmap, probe height, etc. ; chamber LEDs on M98 P"0:/macros/LEDs/led_on.g" G32 ; 3-point bed leveling ;M501 ; load config-override.g M703 ; load filament-specific config.g M98 P"0:/sys/setInputShaping.g" ; pull in input shaping parameters G90 ; absolute Positioning M83 ; extruder relative mode ;=== DuetLapse3 control ===; ;M291 P"DuetLapse3.start" S2 ;M292 ;G4 S10 M98 P"0:/sys/setDefaultProbePoints.g" ; reset probe points, just in case ;=== slicer start code ===;
slicer start g-code
M98 P"0:/sys/mesh.g" A{first_layer_print_min[0]} B{first_layer_print_max[0]} C{first_layer_print_min[1]} D{first_layer_print_max[1]} N20 ; set N to your desired distance between points G29 S1 ; load small mesh M140 S[first_layer_bed_temperature] ; set bed temp M104 S[first_layer_temperature] ; set extruder temp G0 X30 Y30 Z0.2 F6000 ; move ahead of prime line position and wait for temp G92 E0.0 M190 S[first_layer_bed_temperature] ; wait for bed temp M109 S[first_layer_temperature] ; wait for extruder temp G0 X5 E10.0 Z0.2 F6000 ; move to prime line position and advance filament 10mm to fill heat break G1 X60.0 E9.0 F1000.0 ; intro line G1 X140.0 E10 F1000.0 ; intro line G92 E0.0 G0 Z1 F1000 ; dab M106 S0
-
@omtek I'm a bit confused both of those videos show the probe getting pretty mangled. I assume neither is correct? Are both of those with 3.5.0rc4?
-
@gloomyandy Both videos are taken with 3.5.0rc4.
The first video was taken with M558 H5 while the second video was taken with M558 H5:1.
The second video depicts the nozzle crash as I initially experienced it; after the second lower & slower probe point, the bed is driven into the nozzle instead of raising. Then it tries to move to the second point.
In the first video, I adjusted M558 so only one dive height (H5) is used. There you see the bed being driven into the probe, completely ignoring that the switch was triggered.
-
@omtek can you try the 3.5.0 release? https://github.com/Duet3D/RepRapFirmware/releases/tag/3.5.0
Ian
-
@droftarts I can, however I should probably wait for Team Gloomy to finalize their 3.5.0 release for the RRF36 board before testing anything.
-
@omtek In the above videos what did you do to run the G29? Was it simply G29 from the console or did you run the mesh.g with parameters?
I don't think there are any changes in the expansion board code so you should be fine to go ahead and use the rc.4 version of the RRF36 firmware for testing with 3.5.0. DWC will complain about mismatched versions but I think it should work fine.
It might be worth reducing the z motor current to try and avoid any further damage.
-
@gloomyandy Both videos I ran G29 from DWC (after homing XYZ, and running G32, also from the DWC).
G32 runs with out issue, too. Usually takes a few tries, though.
It might be worth reducing the z motor current to try and avoid any further damage.
An excellent idea. I've modified the M913 in my config accordingly.
-
I was just able to reproduce this issues using a detachable prob (Klicky) Homing works G32 works. manually running M401/402 to get and store the porbe works but when issuing G29 it error with
4/17/2024, 8:26:56 PM g29 Error: G1: Probe already triggered before probing move started
and all hell breaks loose if you dont hit estop fast.This was with 3.5.rc4 on an Octopusprov1.0 and a 1LC toolboard. So it dosen't seem to be port/board specific. Let me know what data you need. This is one of my best printing units so I'm loth to do too much damage to it testing but happy to help out as much as I can.
-
@gloomyandy I just finished updating what I could to 3.5.0.
(still need to compile firmware for the CannedERCF board, but I think it's ok doing CAN passthroughcompiled tonight).After making sure motors were running at 80%, homing XYZ, then ran G32 (almost got it in two passes) followed by G29 (using the buttons in DWC), the KlickyPCB is picked up and moved to the first probe point, and as soon as the Klicky is triggered the bed drives itself into the probe. I had my finger on the E-Stop this time so I wasn't able to see if it attempted to move to the second probe point.
-
@omtek So basically it does the same thing with 3.5.0 as it was doing before?
-
@omtek does it report an error in the console when it crashes? I noticed a small difference between the videos: when M558 H5 is set, the crash happens immediately the probe is triggered. With M558 H5:1, it completes the first probe, backs off (I can’t tell if it’s 5mm or 1mm) then probes again. When this second probe is triggered, it then crashes.
Also, you don’t need to test this on the bed. If you lower the bed say 100mm, you can trigger the probe manually, to see where it’s actually trying to go. But keep that finger over the emergency stop, too!
Ian