Calibrate the Z probe trigger height
-
; Z probes M558 P5 C"^zprobe.in" H5 F300 T6000 ; set Z probe type to switch and the dive height + speeds G31 P500 X0 Y0 Z.18 ; set Z probe trigger value, offset and trigger height M557 X0:282 Y0:275 S40 ; define mesh grid
Hey guys I am trying to get my z-offset lower to the bed, Once you have the nozzle touching the bed, send command G92 Z0 to tell the firmware that the head is at Z=0, I then Jog the head up 10mm and Send command G30 S-1, in the config.g file I Set the Z parameter in the G31 to the value I got from G30 S-1.
After I restart the duet I still get the same offset that I got before (The Nozzle is above the bed.
-
Tell us how you are homing. Share your homeall.g and homez.g or any other macros used in the process.
-
@Phaedrux here you go. No macro used.
https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe; Configuration file for Duet WiFi (firmware version 3.3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.13 on Fri Oct 14 2022 18:23:20 GMT-0400 (Eastern Daylight Time) ; General preferences M575 P1 S1 B57600 ; enable support for PanelDue M111 S0 ; Debugging off G21 ; Work in millimetres G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Voron" ; set printer name M669 K1 ; select CoreXY mode M564 S1 H1 ; Forbid axis movements when not homed ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; --- Z Drive map --- ; _______ ; | 6 | 7 | ; | ----- | ; | 5 | 8 | ; ------- ; front ; ; (looking at the printer from the top) ; Drive directions M569 P0 S0 ; A M569 P1 S0 ; B M569 P3 S1 ; Extruder M569 P5 S0 ; Z1 M569 P6 S1 ; Z2 M569 P7 S0 ; Z3 M569 P8 S1 ; Z4 M584 X0 Y1 Z5:6:7:8 E3 ; Motor mapping and steps per mm M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E562.00 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X60000.00 Y60000.00 Z18000.00 E1200.00 ; set maximum speeds (mm/min) M201 X6000.00 Y6000.00 Z4000.00 E250.00 ; set accelerations (mm/s^2) ; Drive currents M906 X1500 Y1500 Z1200 E400 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S10 ; Set idle timeout ; Endstops M574 X2 S1 P"^xstop" ; Xmax endstop on hall effect board M574 Y2 S1 P"^ystop" ; Ymax endstop on hall effect board M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Axis travel limits M208 X0 Y0 Z0 S1 ; Set axis minima M208 X312 Y325 Z275 S0 ; Set axis maxima ; Z probes M558 P5 C"^zprobe.in" H5 F300 T6000 ; set Z probe type to switch and the dive height + speeds G31 P500 X0 Y0 Z0 ; set Z probe trigger value, offset and trigger height M557 X0:282 Y0:275 S40 ; define mesh grid ; Bed leveling M584 X0 Y1 Z5:6:7:8 E3 ; Motor mapping and steps per mm M671 X-65:-65:365:365 Y0:395:395:0 S20 ; Define Z belts locations (Front_Left, Back_Left, Back_Right, Front_Right) ;Bed (Keenovo 750w 120v) 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 R0.490 K0.247:0.000 D1.97 E1.35 S1.00 B0 ; enable 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 ;E3d Revo Voron) M308 S1 P"e0temp" Y"thermistor" T100000 B4725 C7.06e-8 ; 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 R4.091 K0.614:0.000 D1.92 E1.35 S1.00 B0 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S0 H-1 ; 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 M950 F2 C"duex.fan3" Q500 ; create fan 2 on pin duex.fan3 and set its frequency M106 P2 S1 H1 T205 ; set fan 2 value. Thermostatic control is turned on M950 F3 C"duex.fan4" Q500 ; create fan 3 on pin duex.fan4 and set its frequency M106 P3 S1 H1 T205 ; set fan 3 value. Thermostatic control is turned on M950 F2 C"fan2" Q500 ; create fan 2 on pin fan2 and set its frequency M106 P2 S1 H1 T45 ; set fan 2 value. Thermostatic control is turned on ; LEDs M950 H2 C"nil" ; free up e2_heat pin M950 F3 C"duex.e2_heat" M106 P3 S255 B0 H-1 C"Top Lights" ;Neopixel M150 X4 M150 W255 P255 ; 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 ; Custom settings are not defined ; Miscellaneous M501 ; load config-override.g T0 ; select tool 0 ; load saved parameters from non-volatile memory M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss M143 H0 S110 M143 H1 S300
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.3.14 on Sat Oct 29 2022 11:20:15 GMT-0400 (Eastern Daylight Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X355 Y355 F6000 ; move quickly to X or Y endstop and stop there (first pass) G1 H1 X355 ; home X axis G1 H1 Y355 ; home Y axis G1 X-5 Y-5 F6000 ; go back a few mm G1 H1 X355 F360 ; move slowly to X axis endstop once more (second pass) G1 H1 Y355 ; then move slowly to Y axis endstop G90 ; absolute positioning G1 X140 Y150 F6000 ; go Center of bed G30 ; home Z by probing the bed G32
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.3.14 on Sat Oct 29 2022 11:08:05 GMT-0400 (Eastern Daylight Time) G1 X140 Y150 F6000 ; go Center of bed G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G90 ; absolute positioning G1 X140 Y150 F6000 ; go to first probe point G30 ; home Z by probing the bed
; bed.g ; called to perform automatic bed compensation via G32 ; ; generated by RepRapFirmware Configuration Tool v2 on Mon Dec 10 2018 01:47:39 GMT+0000 (GMT) M561 ; clear any bed transform ;G28 Z ; home Z M671 S20 G1 F20000 X0 Y0 Z10 G30 P0 X0 Y0 Z-99999 G1 F20000 X0 Y275 Z10 G30 P1 X0 Y275 Z-99999 G1 F20000 X282 Y275 Z10 G30 P2 X282 Y275 Z-99999 G1 F20000 X282 Y0 Z10 G30 P3 X282 Y0 Z-99999 S4 G1 F9000 X140 Y150 Z150
-
At the end of your homeall you call G32, which runs bed.g which is doing tilt and roll correction. You should add a G30 at the center of the bed after you've done that to re-establish the Z0 position incase it has changed with the tilt correction.
-
@Phaedrux Hey I am not following you, are you saying add G30 at then end of home.g after G32.
How do I get G30 to go at the center of the bed. Like this.
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.3.14 on Sat Oct 29 2022 11:20:15 GMT-0400 (Eastern Daylight Time) G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 X355 Y355 F6000 ; move quickly to X or Y endstop and stop there (first pass) G1 H1 X355 ; home X axis G1 H1 Y355 ; home Y axis G1 X-5 Y-5 F6000 ; go back a few mm G1 H1 X355 F360 ; move slowly to X axis endstop once more (second pass) G1 H1 Y355 ; then move slowly to Y axis endstop G90 ; absolute positioning G1 X140 Y150 F6000 ; go Center of bed G30 ; home Z by probing the bed G32 G30 P4 X140 Y150 Z-99999
-
G90; absolute positioning
G1 X140 Y150 F6000 ; go Center of bed
G30 ; home Z by probing the bedAdd that to your bed.g right above the last line.
-
@Phaedrux Thank, I can get a good first layer now.
Here is another question. How do I get the probe to go three times around the bed.; bed.g ; called to perform automatic bed compensation via G32 ; ; generated by RepRapFirmware Configuration Tool v2 on Mon Dec 10 2018 01:47:39 GMT+0000 (GMT) M561 ; clear any bed transform ;G28 Z ; home Z M671 S20 G1 F20000 X0 Y0 Z10 G30 P0 X0 Y0 Z-99999 G1 F20000 X0 Y275 Z10 G30 P1 X0 Y275 Z-99999 G1 F20000 X282 Y275 Z10 G30 P2 X282 Y275 Z-99999 G1 F20000 X282 Y0 Z10 G30 P3 X282 Y0 Z-99999 S4 G90 ; absolute positioning G1 X140 Y150 F6000 ; go Center of bed G30 ; home Z by probing the bed G1 F9000 X140 Y150 Z150
-
You want to probe each point multiple times? Check out the M558 "A" and "N" parameters... A is maximum number of probes per point and N is the tolerance
https://docs.duet3d.com/en/User_manual/Reference/Gcodes
change this line in you config
M558 P5 C"^zprobe.in" H5 F300 T6000 ; set Z probe type to switch and the dive height + speeds
to
M558 P5 C"^zprobe.in" H5 F300 T6000 A3 S0.02 ; set Z probe type to switch and the dive height + speeds
This change will probe each point up to three times or only twice if the deviation between the two probings is less than 0.02
-
If you mean doing 3 iterations of the leveling process, the easiest way is to simply duplicate the commands the number of times you want it to do.
; bed.g ; called to perform automatic bed compensation via G32 ; ; generated by RepRapFirmware Configuration Tool v2 on Mon Dec 10 2018 01:47:39 GMT+0000 (GMT) M561 ; clear any bed transform ;G28 Z ; home Z M671 S20 G1 F20000 X0 Y0 Z10 ;first G30 P0 X0 Y0 Z-99999 G1 F20000 X0 Y275 Z10 G30 P1 X0 Y275 Z-99999 G1 F20000 X282 Y275 Z10 G30 P2 X282 Y275 Z-99999 G1 F20000 X282 Y0 Z10 G30 P3 X282 Y0 Z-99999 S4 G90 ; absolute positioning G1 X140 Y150 F6000 ; go Center of bed G30 ; home Z by probing the bed ;second G1 F20000 X0 Y0 Z10 G30 P0 X0 Y0 Z-99999 G1 F20000 X0 Y275 Z10 G30 P1 X0 Y275 Z-99999 G1 F20000 X282 Y275 Z10 G30 P2 X282 Y275 Z-99999 G1 F20000 X282 Y0 Z10 G30 P3 X282 Y0 Z-99999 S4 G90 ; absolute positioning G1 X140 Y150 F6000 ; go Center of bed G30 ; home Z by probing the bed ;third G1 F20000 X0 Y0 Z10 G30 P0 X0 Y0 Z-99999 G1 F20000 X0 Y275 Z10 G30 P1 X0 Y275 Z-99999 G1 F20000 X282 Y275 Z10 G30 P2 X282 Y275 Z-99999 G1 F20000 X282 Y0 Z10 G30 P3 X282 Y0 Z-99999 S4 G90 ; absolute positioning G1 X140 Y150 F6000 ; go Center of bed G30 ; home Z by probing the bed G1 F9000 X140 Y150 Z150
-
@Phaedrux ok, Also how do you slow the z probing in each of the three passes.
I saw someone has this.
; Probe the bed at 4 points, x3 for more precision M558 K0 H10 F1200 ; increase the depth range, gets the gantry mostly level immediately M98 P"/sys/bed.g" M558 K0 H4 F240 ; reduce depth range, probe slower for better repeatability M98 P"/sys/bed.g" M558 K0 H1 F60 ; reduce depth range, probe slower for better repeatability M98 P"/sys/bed.g"
-
That could work too, or just add the M558 commands to your bed.g between the iterations.
-
@Phaedrux Hey how about this. Do I have to add M671 S20 to bed.g
;bed_probe_points G30 K0 P0 X0 Y0 Z-99999 ; probe point 0 near a leadscrew G30 K0 P1 X0 Y275 Z-99999 ; probe point 1 near a leadscrew G30 K0 P2 X282 Y275 Z-99999 ; probe point 2 near a leadscrew G30 K0 P3 X282 Y0 Z-99999 S4 ;probe point 3 near a leadscrew and calibrate 4 motors
; bed.g ; Called to align the gantry to the bed plane via G32 M561 ; Clear any bed transform M84 E3 ; Turn off noisy Extruder motor G28 ; Home all axes ; Probe the bed at 4 points, x3 for more precision M558 K0 H10 F1200 ; increase the depth range, gets the gantry mostly level immediately M98 P"/sys/bed_probe_points.g" M558 K0 H4 F240 ; reduce depth range, probe slower for better repeatability M98 P"/sys/bed_probe_points.g" M558 K0 H1 F60 ; reduce depth range, probe slower for better repeatability M98 P"/sys/bed_probe_points.g" G90 ; absolute positioning G1 X140 Y150 F6000 ; go Center of bed G30 ; home Z by probing the bed
-
@Karim said in Calibrate the Z probe trigger height:
Do I have to add M671 S20 to bed.g
No that should probably stay in config.g. Only call it if you intend to change it.
-
@Phaedrux ok what do this means.
The K parameter is applicable to all G30 commands. It is the Z probe number, default 0. It is not remembered between G30 commands, it always defaults to 0.
For example I use it here.
M558 K0 H4 F240 -
Do you actually have multiple probes? If not, just remove the K0 entirely from all commands.
-
@Phaedrux like this.
;bed_probe_points G30 P0 X0 Y0 Z-99999 ; probe point 0 near a leadscrew G30 P1 X0 Y275 Z-99999 ; probe point 1 near a leadscrew G30 P2 X282 Y275 Z-99999 ; probe point 2 near a leadscrew G30 P3 X282 Y0 Z-99999 S4 ;probe point 3 near a leadscrew and calibrate 4 motors
also the K0 in here too.
; bed.g ; Called to align the gantry to the bed plane via G32 M561 ; Clear any bed transform M84 E3 ; Turn off noisy Extruder motor G28 ; Home all axes ; Probe the bed at 4 points, x3 for more precision M558 K0 H10 F1200 ; increase the depth range, gets the gantry mostly level immediately M98 P"/sys/bed_probe_points.g" M558 K0 H4 F240 ; reduce depth range, probe slower for better repeatability M98 P"/sys/bed_probe_points.g" M558 K0 H1 F60 ; reduce depth range, probe slower for better repeatability M98 P"/sys/bed_probe_points.g" G90 ; absolute positioning G1 X140 Y150 F6000 ; go Center of bed G30 ; home Z by probing the bed
-
Yes but how many probe devices do you actually have?
-
@Phaedrux one z probe, no z end stop switch
-
Then you don't need K0 anywhere.
-
@Phaedrux Got it working, Thank You.