Euclid Z Probe - Deploy Errors Gcode Logic
-
I'm having trouble getting my newly installed Euclid / Klicky probe to function smoothly with Duet 3 Mini 5+. I successfully have the probe able to dock and undock correctly automatically when a home request is performed. But when i do a 3 point leadscrew tram/bed level, the probe docks and undocks between each point measurement, so its incredibly slow and cumbersome. I have some logging turned on to try and help seeing the logic, but i cannot figure it out.
It seems that the deploy token never gets set to true.
I have attached my relevant files and a console output:
console output
config.g
deployprobe.g
retractprobe.g
bed.g
homez.gconsole
11/14/2022, 6:23:07 PM Leadscrew adjustments made: 0.054 0.046 0.042, points used 3, (mean, deviation) before (0.047, 0.004) after (-0.000, 0.000) Current rough pass deviation: 0.004 Final deviation: 0.004 11/14/2022, 6:22:50 PM Macro deployprobe.g complete 11/14/2022, 6:22:45 PM Probe Pickup complete Object Model Deployuser token (after while loop) = true 11/14/2022, 6:22:44 PM Probe Value =0 11/14/2022, 6:22:43 PM Object Model Deployuser token (before while loop) = true 11/14/2022, 6:22:40 PM Running deployprobe.g Object Model Deployuser token =true Lift Z in advance of deploy Probe Value =1000 Passed first logic test to deploy probe Probe Pickup macro running 11/14/2022, 6:22:38 PM complete movement commands Macro retractprobe.g complete Leadscrew adjustments made: 0.013 0.001 0.006, points used 3, (mean, deviation) before (0.006, 0.004) after (0.000, 0.000) Current deviation: 0.004 Final deviation: 0.004 11/14/2022, 6:22:36 PM Probe Value =1000 Object Model Deployuser token =false 11/14/2022, 6:22:25 PM running retractprobe.g macro Object Model Deployuser token =false Probe Value =0 Object Model Deployuser token =false 11/14/2022, 6:22:21 PM Macro deployprobe.g complete 11/14/2022, 6:22:17 PM Probe Value =0 Probe Pickup complete Object Model Deployuser token (after while loop) = false 11/14/2022, 6:22:15 PM Object Model Deployuser token (before while loop) = false 11/14/2022, 6:22:12 PM Probe Value =1000 Passed first logic test to deploy probe Probe Pickup macro running 11/14/2022, 6:22:11 PM complete movement commands Macro retractprobe.g complete Running deployprobe.g Object Model Deployuser token =false Lift Z in advance of deploy 11/14/2022, 6:22:10 PM Probe Value =1000 Object Model Deployuser token =false 11/14/2022, 6:21:58 PM running retractprobe.g macro Object Model Deployuser token =false Probe Value =0 Object Model Deployuser token =false 11/14/2022, 6:21:54 PM Macro deployprobe.g complete 11/14/2022, 6:21:50 PM Probe Pickup complete Object Model Deployuser token (after while loop) = false 11/14/2022, 6:21:49 PM Probe Value =0 11/14/2022, 6:21:48 PM Object Model Deployuser token (before while loop) = false 11/14/2022, 6:21:45 PM Probe Value =1000 Passed first logic test to deploy probe Probe Pickup macro running 11/14/2022, 6:21:44 PM complete movement commands Macro retractprobe.g complete Running deployprobe.g Object Model Deployuser token =false Lift Z in advance of deploy 11/14/2022, 6:21:42 PM Probe Value =1000 Object Model Deployuser token =false 11/14/2022, 6:21:36 PM running retractprobe.g macro Object Model Deployuser token =false Probe Value =0 Object Model Deployuser token =false 11/14/2022, 6:21:32 PM Macro deployprobe.g complete 11/14/2022, 6:21:28 PM Probe Pickup complete Object Model Deployuser token (after while loop) = false 11/14/2022, 6:21:27 PM Probe Value =0 11/14/2022, 6:21:26 PM Object Model Deployuser token (before while loop) = false 11/14/2022, 6:21:23 PM Probe Value =1000 Passed first logic test to deploy probe Probe Pickup macro running 11/14/2022, 6:21:22 PM complete movement commands Macro retractprobe.g complete Leadscrew adjustments made: 0.028 0.042 0.043, points used 3, (mean, deviation) before (0.038, 0.006) after (0.000, 0.000) Current rough pass deviation: 0.006 Deviation over threshold. Executing pass 1 deviation 0.006 Running deployprobe.g Object Model Deployuser token =false Lift Z in advance of deploy 11/14/2022, 6:21:20 PM Probe Value =1000 Object Model Deployuser token =false 11/14/2022, 6:21:09 PM running retractprobe.g macro Object Model Deployuser token =false Probe Value =0 Object Model Deployuser token =false 11/14/2022, 6:21:05 PM Macro deployprobe.g complete 11/14/2022, 6:21:01 PM Probe Pickup complete Object Model Deployuser token (after while loop) = false 11/14/2022, 6:20:59 PM Probe Value =0 11/14/2022, 6:20:58 PM Object Model Deployuser token (before while loop) = false 11/14/2022, 6:20:56 PM Probe Value =1000 Passed first logic test to deploy probe Probe Pickup macro running 11/14/2022, 6:20:55 PM complete movement commands Macro retractprobe.g complete Running deployprobe.g Object Model Deployuser token =false Lift Z in advance of deploy 11/14/2022, 6:20:53 PM Probe Value =1000 Object Model Deployuser token =false 11/14/2022, 6:20:42 PM running retractprobe.g macro Object Model Deployuser token =false Probe Value =0 Object Model Deployuser token =false 11/14/2022, 6:20:38 PM Macro deployprobe.g complete 11/14/2022, 6:20:34 PM Probe Pickup complete Object Model Deployuser token (after while loop) = false 11/14/2022, 6:20:33 PM Probe Value =0 11/14/2022, 6:20:32 PM Object Model Deployuser token (before while loop) = false 11/14/2022, 6:20:29 PM Probe Value =1000 Passed first logic test to deploy probe Probe Pickup macro running 11/14/2022, 6:20:28 PM complete movement commands Macro retractprobe.g complete Running deployprobe.g Object Model Deployuser token =false Lift Z in advance of deploy 11/14/2022, 6:20:27 PM Probe Value =1000 Object Model Deployuser token =false 11/14/2022, 6:20:20 PM running retractprobe.g macro Object Model Deployuser token =false Probe Value =0 Object Model Deployuser token =false 11/14/2022, 6:20:16 PM Macro deployprobe.g complete 11/14/2022, 6:20:12 PM Probe Pickup complete Object Model Deployuser token (after while loop) = false 11/14/2022, 6:20:11 PM Probe Value =0 11/14/2022, 6:20:10 PM Object Model Deployuser token (before while loop) = false 11/14/2022, 6:20:07 PM Probe Value =1000 Passed first logic test to deploy probe Probe Pickup macro running 11/14/2022, 6:20:06 PM G32 Running deployprobe.g Object Model Deployuser token =false Lift Z in advance of deploy 11/14/2022, 6:20:01 PM complete movement commands Macro retractprobe.g complete 11/14/2022, 6:19:59 PM Probe Value =1000 Object Model Deployuser token =false 11/14/2022, 6:19:50 PM running retractprobe.g macro Object Model Deployuser token =false Probe Value =0 Object Model Deployuser token =false 11/14/2022, 6:19:46 PM Macro deployprobe.g complete 11/14/2022, 6:19:42 PM Probe Pickup complete Object Model Deployuser token (after while loop) = false 11/14/2022, 6:19:41 PM Probe Value =0 11/14/2022, 6:19:40 PM Object Model Deployuser token (before while loop) = false 11/14/2022, 6:19:37 PM Probe Value =1000 Passed first logic test to deploy probe Probe Pickup macro running 11/14/2022, 6:19:36 PM G28 Running deployprobe.g Object Model Deployuser token =false Lift Z in advance of deploy
config.g
; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"V-Core3" ; set printer name M669 K1 ; CoreXY G21 ; Set Units to Millimeters ; Network M552 S2 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet G4 S2 ; wait for expansion boards to start ; Drives M569 P0.0 S0 D2 ; Left Z physical drive 0.0 goes forwards M569 P0.1 S0 D2 ; Rear Z physical drive 0.1 goes forwards M569 P0.2 S0 D2 ; Right Z physical drive 0.2 goes forwards M569 P0.3 S1 D2 ; Right physical drive 0.3 goes forwards M569 P0.4 S1 D2 ; Left physical drive 0.4 goes forwards M569 P121.0 S1 D2 ; Extruder physical drive 0.5 goes forwards M584 X0.4 Y0.3 Z0.0:0.1:0.2 E121.0 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z800.00 E690 ;E400 ; set steps per mm M906 X2000 Y2000 Z1800 E1000 I10 ;E700 I30 ; set motor currents (mA) and motor idle factor in per cent -- safe for Duet 3 mini 5+ M84 S30 ; Set idle timeout M566 X500.00 Y500.00 Z60.00 E300 P1 ;X1500.00 Y1500.00 Z6.00 E300 P1 ;E120.00 P1 ; set maximum instantaneous speed changes (mm/min) M203 X30000.00 Y30000.00 Z1000.00 E7200 ;E3600.00 ; set maximum speeds (mm/min) M201 X10000.00 Y10000.00 Z100.00 E10000 ;E3600.00 ; set accelerations (mm/s^2) M207 S0.6 F7200 Z0.2 ; firmware retraction orbiter 2.0 ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X310 Y310 Z300 S0 ; set axis maxima ; Endstops M574 X1 S1 P"121.io2.in" ; configure active high endstops M574 Y2 S1 P"io1.in" ; configure active high endstops M574 Z1 S2 M671 X-4.5:150:304.5 Y-4.52:305:-4.52 S5 ; define positions of Z leadscrews or bed levelling screws M557 X30:280 Y20:290 P5 ; define 5x5 mesh grid ; Heaters M308 S0 P"temp0" Y"thermistor" T100000 B3950 A"Keenevo 600W Bed" ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out0" T0 Q10 ; Define Heater0 as the heated bed, bind to Sensor0 M140 H0 P0 ; Define Heated Bed M307 H0 R0.602 K0.401:0.000 D2.44 E1.35 S1.00 B0 ; PID Tuning for Heater0, Heated Bed (100C) M143 H0 S140 ; Set temperature limit for Heater0 to 120C M308 S1 P"121.temp0" Y"thermistor" T100000 B4725 C7.060000e-8 A"Slice Hotend" ;Slice Engineering 300C thermistor, settings are online M950 H1 C"121.out0" T1 Q100 ; Define Heater1 as Extruder0 heater, bind to Sensor1 M307 H1 R3.030 K0.444:0.000 D4.49 E1.35 S1.00 B0 V23.8 ; PID Tuning for Heater1, Extruder0 (240C) M143 H1 S325 ; Set temperature limit for heater 1 to 285C M308 S2 P"temp1" Y"thermistor" T100000 B3950 A"Chamber" ; configure sensor 2 as thermistor on pin temp2 M950 H2 C"out1" T2 ;Q10 ; create chamber heater output on out1 and map it to sensor 2 M307 H2 R0.01 K0.200:0.000 D60 E1.35 S1.00 B1 ; enable bang-bang mode for the chamber heater and set PWM limit M141 H2 ; map chamber to heater 2 M143 H2 S120 ; set temperature limit for heater 2 to 60C M308 S3 P"121.temp1" Y"thermistor" A"Toolhead Motor" T100000 B4725 C7.060000e-8 ; Define Sensor as Chamber temperature M308 S4 Y"drivers" A"4028 Power" ; 4028 power using spare heater M308 S5 Y"mcu-temp" A"MCU" ; Define Sensor3 as the integrated MCU temperature sensor M308 S6 Y"drivers" A"TMC Drivers" ; Define Sensor4 as the TMC overheat sensor M308 S7 Y"mcu-temp" P"121.dummy" A"Toolboard 1LC" M308 S8 Y"drivers" P"121.dummy" A"1LC Stepper" ; Fans M950 H3 C"!out2" T2 Q10 ;H2 ; Define Heater2 as the 4028 fan power, bind to Sensor3 M143 H3 P2 S200 ; Needed M143 to set max temp so the graph scaled correctly M950 F0 C"!121.out1+out1.tach" Q25000 ;Q500 ; create fan 0 on pin out4 and set its frequency M106 P0 C"Layer Fan" L0.0 X1.0 S0 H-1 B0.1 ; set fan 0 name and value. Thermostatic control is turned off M950 F1 C"121.out2+out2.tach" Q500 ; Fan 1 uses out3, and using out3.tach as a tacho input M106 P1 C"Hotend Fan" S0 H1 T45 ; set fan 1 name and value. Thermostatic control turned on for Hotend M950 F2 C"out5" Q500 ; create fan 1 on pin out5 and set its frequency M106 P2 C"Board Fan" S0 H4:5:6 T46 ; set fan 1 name and value. Thermostatic control turned on for Hotend M950 F3 C"out3+out3.tach" Q500 ; Chamber Heater Fan Noctua NF-F12 Industrial M106 P3 C"Chamber Heater Fan" S0.0 L1.0 X0.0 H2 T100 ; S0.3 L0.3 X0.6 B0.1 T30:40 ; set fan 1 name and value. Thermostatic control turned on for Hotend M950 F4 C"out4" Q500 ; create fan 4 for Water Cooling 12V Fan 4 on pin out4 and set its frequency M106 P4 C"Liquid Cooling Fan" S0 H4:5:6 T15 ; set fan 1 name and value. Thermostatic control turned on for Hotend ; Tools M563 P0 D0 H1 F0 S"Mosquito Magnum" ; define tool 0 G10 P0 X0 Y0 Z0 R0 S0 ; set tool 0 axis offsets, set initial tool 0 active 60C and standby temperatures to 0C ;M563 P0 H0 F0 S"Keenevo 600W Bed" ;G10 P0 X0 Y0 Z0 ;G10 P0 R50 S0 ; Z-Probe Inductive Probe ;M558 P5 C"121.io0.in" H5 F400 T5000 ; set Z probe type to unmodulated and the dive height + speeds M558 P8 C"^121.io0.in" H8 F400 T9000 A1 ; S0.01 ; set Z probe type to unmodulated and the dive height + speeds G31 P1000 X-28 Y-20 Z8.50 ; K0 ; set Z probe trigger value, offset and trigger height, more Z means closer to the bed ;; BLTouch ; M950 S0 C"io7.out" ; Create a servo pin on io7 ; M558 P9 C"io7.in" H5 F240 T10800 A5 ; set Z probe type to unmodulated and the dive height + speeds ; G31 P25 X-28.00 Y-13.00 Z0.78 ; set Z probe trigger value, offset and trigger height, more Z means closer to the bed ;Accelerometer M955 P121.0 I16 ;Input Shaper M593 P"zvdd" F44 ; for 10k acceleration ;M593 P"mzv" F42.5 ; for 15k acceleration ;Filament Sensor0 M591 D0 P3 C"121.io1.in" S1 M591 D0 L27 R10:190 ;PanelDue 5i M575 P1 S1 B57600 ;NeoPixels x3 M150 X3 Q4000000 ;R128 U128 B128 P128 S2 F0 M150 X3 R255 U255 B255 W255 P255 S2 F0 ; display led ; Custom settings G29 S1 M572 D0 S0.01; set Pressure Advance K-factor M501 ;M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss ; init print time logging if !exists(global.runtime) M98 P"runtime.g" ; init LED variables if !exists(global.warmUp) global warmUp = false ; Select default tool M404 N1.75 ; Define filament diameter for print monitor T0
-
This post is deleted! -
@Herve_Smith thanks, so you are calling your homexy.g directly.
i made some progress by adding M401 deploy probe at the beginning of my bed.g. now it trams all points with the same deploy, but now i get a new error due to the last line of my bed.g where i home Z one final time after tramming.
ERROR G28 may not be used within a homing file.
but this line has always been present at the end of my bed.g. for some reason the M401 and M402 commands don't like this. i'm stuck on this now.
bed.g
M290 R0 S0 ; clear baby stepping M561 ; reset all bed adjustments M400 ; flush move queue ; echo "Running bed4point.g" ;M558 F60 A6 ;A3 ; fix probe speed to 1mm/s ;G90 ;G4 P250 if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed echo "not all axes homed, homing axes first" G28 M401 ; deploy Z probe (omit if using bltouch) G30 P0 X30 Y20 Z-99999 ;X30 Y20 Z-99999 ; probe near a leadscrew G30 P1 X155 Y276 Z-99999 ;Y282 Z-99999 ; probe near a leadscrew G30 P2 X279 Y20 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors echo "Current rough pass deviation: " ^ move.calibration.initial.deviation while move.calibration.initial.deviation > 0.005 if iterations >= 5 echo "Error: Max attemps failed. Deviation: " ^ move.calibration.initial.deviation break echo "Deviation over threshold. Executing pass" , iterations+1, "deviation", move.calibration.initial.deviation G30 P0 X30 Y20 Z-99999 ; probe near a leadscrew G30 P1 X155 Y276 Z-99999 ; probe near a leadscrew G30 P2 X279 Y20 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors echo "Current deviation: " ^ move.calibration.initial.deviation continue echo "Final deviation: " ^ move.calibration.initial.deviation M402 ; retract probe (omit if using bltouch) G0 X155 Y155 Z10 F9000 ; rehome Z as the absolute height of the z plane may have shifted G28 Z
-
@RogerPodacter can you post your homez file?
-
homez.g
; *********************************************************** ; Euclid Probe homez.g Example Macro ; RRF3.X Firmware Example ; saveas system/homez.g ; comments and echo statements throughout are provided for convenience ; *********************************************************** if !move.axes[0].homed || !move.axes[1].homed ; If the printer hasn't been homed, home it M98 P"0:/sys/homexy.g" M561 ; clear any bed transform M290 S0 R0 ; clear baby steps G91 ; relative positioning G1 H2 Z6 F6000 ; lift Z relative to current position to clear any obstructions M400 G90 ; absolute positioning ; echo "Call deployprobe.g macro" M401 P0 ; This runs macro file deployprobe ; echo "Return" G1 X145 Y162.5 F9000 ; go to center of bed in advance of probe that point M400 ; echo "G30 Command" G30 ; Probe the bed at the current XY position. When the probe is triggered, ; adjust the Z offset of the current tool to make the current position Z=0. G1 Z10 ; raise Z=10 M400 G4 P500 ; echo "Call bed4point.g macro" M98 P"0:/sys/bed.g" ; tram bed ; echo "Return" G1 X145 Y162.5 F9000 ; go back to the first probe point and reprobe 0 in case it moved G30 ; echo "Call retractprobe.g macro" M402 P0 ; retract probe ; echo "Return" G1 Z10 F600 ; lift Z relative to current position G90 ; absolute positioning M564 S1 H0 ; reset the bounding limits ; G1 X150 Y0 F9000 ; move carriage to center front
-
@RogerPodacter it may be that you're calling the bed macro from home z, which is then itself calling home z, which is calling bed and so on.
Remove calling the bed file from home z use G32 after you've homed the machine -
i experimented a bit removing that command but didnt have much luck resolving the issue. i think i finally have it working, using your advice i removed the G28 and replaced with a G30 at the end of bed.g and that seemed to give the behavior expected. it completes the cycle fully.
M290 R0 S0 ; clear baby stepping M561 ; reset all bed adjustments M400 ; flush move queue ; echo "Running bed4point.g" ;M558 F60 A6 ;A3 ; fix probe speed to 1mm/s ;G90 ;G4 P250 if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed echo "not all axes homed, homing axes first" G28 M401 ; deploy Z probe (omit if using bltouch) G30 P0 X30 Y20 Z-99999 ;X30 Y20 Z-99999 ; probe near a leadscrew G30 P1 X155 Y276 Z-99999 ;Y282 Z-99999 ; probe near a leadscrew G30 P2 X279 Y20 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors echo "Current rough pass deviation: " ^ move.calibration.initial.deviation while move.calibration.initial.deviation > 0.005 if iterations >= 5 echo "Error: Max attemps failed. Deviation: " ^ move.calibration.initial.deviation break echo "Deviation over threshold. Executing pass" , iterations+1, "deviation", move.calibration.initial.deviation G30 P0 X30 Y20 Z-99999 ; probe near a leadscrew G30 P1 X155 Y276 Z-99999 ; probe near a leadscrew G30 P2 X279 Y20 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors echo "Current deviation: " ^ move.calibration.initial.deviation continue echo "Final deviation: " ^ move.calibration.initial.deviation G0 X155 Y155 Z10 F9000 G30 ;G28 Z M402 ; retract probe (omit if using bltouch)