Automatic Bed Tilt Calibration, G30 S4, and G30 S-2
-
@bstump said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
M558 P9 H15 F120 T9000 A1 R0.7 ; Set Z probe type to bltouch and the dive height + speeds
every time you send this it will reset any G31 offsets. Why not just set it in config once and forget?
You should maybe also look at using an iterative probing routine so you don;t have to repeat everything. e.g.
if !move.axes[0].homed || !move.axes[1].homed ; If the printer hasn't been homed, home it G28 XY ; home y and x ; G28 Z ; home z ; M561 ; clear any bed transform M98 P"bed_screws.g" ; perform bed tramming echo "BTC: 1 - Difference was " ^ move.calibration.initial.deviation ^ "mm" ; while move.calibration.initial.deviation >= 0.01 ; perform additional tramming if previous deviation was over 0.01mm if iterations = 5 abort "Too many auto tramming attempts" M98 P"bed_screws.g" ; perform bed tramming echo "BTC: " ^ iterations + 2 ^ " - Difference was " ^ move.calibration.initial.deviation ^ "mm" continue ; G28 Z
and bed_screws
; call this bed_screws.g G30 P0 X10 Y10 Z-99999 ; Probe near a leadscrew G30 P1 X980 Y10 Z-99999 ; Probe near a leadscrew G30 P2 X980 Y980 Z-99999 ; Probe near a leadscrew G30 P3 X10 Y980 Z-99999 S4 ; Probe near a leadscrew
@bstump said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
M280 P7 S60
When using a P9 probe, there should be no need to extend it as this is handled by the firmware. If you do want to use the "fast probing" use M401 instead so the firmware can keep track of the probe status
-
@oliof @jay_s_uk Here are the current homeall.g, homez.g, bed.g and config.g
homeall.g
; homeall.g ; called to home all axes M280 P7 S60 G91 ; relative positioning G1 H2 Z5 F200 ; lift Z relative to current position M584 X0 Y5 Z6:7:8:9 U1 E3:4 P4 ; Driver mapping M400 G1 H1 X-1005 Y1005 U-1005 F3000 ; move quickly to X axis endstop and stop there (first pass) G1 H2 X5 Y-5 U5 F600 ; go back a few mm G1 H1 X-1005 Y1005 U-1005 F600 ; move slowly to X and Y axis endstops once more (second pass) M400 M584 X0:1 Y5 Z6:7:8:9 U1 E3:4 P3 ; Driver mapping M400 G90 ; absolute positioning G30 ; home Z by probing the bed M375 ; Loads the grid matrix file (Heightmap)
homez.g
; homez.g ; called to home the Z axis M280 P7 S60 G91 ; relative positioning G1 H2 Z5 F200 ; lift Z relative to current position G90 ; absolute positioning G30 ; home Z by probing the bed M375 ; Loads the grid matrix file (Heightmap)
bed.g
M291 S1 T46 R"Function disabled" P"For performing bed compensation, please navigate to the ""Macros"" tab"
config.g
;Generated by Modix - 1.4 ;Modix Big Meter, Dual Printhead ;Written by Elad E. ; General preferences_______________________________________________ G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves M111 S0 ; Debug off M555 P2 ; Set output to look like Marlin M575 P1 B57600 S1 ; Set auxiliary serial port baud rate and require checksum (for PanelDu ; Network________________________________________________________ֹֹֹֹֹ___ M550 P"Big Meter" ; Set machine name ;M551 P"MODIX3D" ; Set password (optional) M552 S1 ; Enable network ;M552 P0.0.0.0 ; Uncomment this command for using Duet Ethernet board M586 P0 S1 ; Enable HTTP M586 P1 S0 ; Disable FTP M586 P2 S0 ; Disable Telnet ; Drives ;Main board______________________________________________________________________ M569 P0 S0 ; Physical drive 0 . X1 M569 P1 S1 ; Physical drive 1 . X2 M569 P2 R-1 ; Physical drive 2 . Canceled M569 P3 S1 ; Physical drive 3 . Main Extruder M569 P4 S0 ; Physical drive 4 . Secondary Extruder ;Duex5 board_____________________________________________________________________ M569 P5 S0 ; Physical drive 5 . Y M569 P6 S0 ; Physical drive 6 . Z1 (0,1000) M569 P7 S0 ; Physical drive 7 . Z2 (0,0) M569 P8 S0 ; Physical drive 8 . Z3 (1000,0) M569 P9 S0 ; Physical drive 9 . Z4 (1000,1000) ;___________________________________________________________________ M584 X0:1 Y5 Z6:7:8:9 U1 E3:4 P3 ; Driver mapping M671 X-181:-181:1049:1049 Y1066:-58:-58:1066 S10 ; Anticlockwise ;___________________________________________________________________ M350 X16 Y16 Z16 E16 U16 I1 ; Configure microstepping with interpolation M92 X100.00 Y100.00 Z2000.00 E412.32 U100.00 ; Set steps per mm M566 X240 Y360 Z30.00 E120.00 U240 P1 ; Set maximum instantaneous speed changes (mm/min) M203 X9000.00 Y9000.00 Z200.00 E1200.00 U9000.00 ; Set maximum speeds (mm/min) M201 X1000 Y1000 Z120.00 E250.00 U1000 ; Set accelerations (mm/s^2) M204 P500 T1000 ; Set print and travel accelerations (mm/s^2) M906 X1800 Y1800.00 E1000.00 U1800 I30 ; Set motor currents (mA) and motor idle factor in per cent M906 Z1800.00 I50 ; Set motor currents (mA) and motor idle factor in per cent M84 S60 X Y U E0 E1 ; Set idle timeout - one minute ; Axis Limits_______________________________________________________ M208 X0:1000 Y0:1000 Z0:1000 U0:1000 ; Set axis minima and maxima ; Endstops__________________________________________________________ M574 X1 Y2 U1 S1 ; Set active low and disabled endstops ; Z-Probe___________________________________________________________ M574 Z2 S2 ; Set endstops controlled by probe M307 H7 A-1 C-1 D-1 ; Disable heater on PWM channel for BLTouch M558 P9 H5 F120 T9000 A1 R0.7 ; Set Z probe type to bltouch and the dive height + speeds G31 P500 X-14 Y21 Z1.081 ; Set Z probe trigger value, offset and trigger height(Z-offset) M557 X-14:974 Y21:1009 S52 ; Define mesh grid. 400 Points M376 H10 ; Height (mm) over which to taper off the bed compensation ; Heaters___________________________________________________________ M140 H-1 ; Disable heated bed M307 H0 A-1 C-1 D-1 ; Disable heater on PWM channel ;E0_________________________________________________________________ ;M305 P1 T100000 B4725 C7.060000e-8 R4700 ; Set thermistor + ADC parameters for heater 1 M305 P1 X200 ; use PT100 M143 H1 S285 ; Set temperature limit for heater 1 to 285C ;M307 H1 A# C# D# V# S1.0 B0 ; PID calibration ;E1_________________________________________________________________ M305 P2 T100000 B4725 C7.060000e-8 R4700 ; Set thermistor + ADC parameters for heater 2 M143 H2 S285 ; Set temperature limit for heater 2 to 285C ;M307 H2 A# C# D# V# S1.0 B0 ; PID calibration ; Fans______________________________________________________________ M106 P0 S0 I0 F500 H-1 C"E0 BlowerFan" ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off M106 P1 S0 I0 F500 H-1 C"E1 BlowerFan" ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off M106 P5 T46 H1 ; Set fan 5. Thermostatic control is turned on M106 P6 T46 H2 ; Set fan 6. Thermostatic control is turned on M106 P2 I-1 ; LED (optional) M106 P3 I-1 ; LED (optional) M106 P4 I-1 ; LED (optional) M106 P7 I-1 ; Main LED M106 P8 I-1 ; LED (optional) ; Tools ;T0_________________________________________________________________ M563 P0 S"E0 Primary" D0 H1 F0 ; Define tool 0 G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets G10 P0 R0 S210 ; Set initial tool 0 active and standby temperatures to 0C ;T1_________________________________________________________________ M563 P1 S"E1 Sacondary" D1 H2 F1 ; Define tool 1 G10 P1 X-0.2 Y52.5 Z0 ; Set tool 1 axis offsets G10 P1 R0 S210 ; Set initial tool 1 active and standby temperatures to 0C ; Automatic power saving____________________________________________ M911 S22.5 R29.0 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss. Power Failure Pause ; Custom settings___________________________________________________ M591 D0:1 P1 C4 S1 ; Regular filament sensor for E0 and E1 ;M564 H0 S0 ; Negative movements are allowed
-
One thing that I see is in your homeZ.g file.
You don't move the probe to a known XY position before issuing the G30.
My printers are setup so that X=0 Y=0 is the center of the bed and that is the point I use.
Whatever point you use it should always be the same point.
Frederick
-
@fcwilt Yes it looks like it homes where is currently is on the bed
-
@bstump said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
@fcwilt Yes it looks like it homes where is currently is on the bed
That is not a good idea - it needs to be the same point every time G30 is used for homing Z or setting the Z=0 datum.
Frederick
-
@fcwilt said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
@bstump said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
@fcwilt Yes it looks like it homes where is currently is on the bed
That is not a good idea - it needs to be the same point every time G30 is used for homing Z or setting the Z=0 datum.
Frederick
I will have to see if it is used as a subroutine in any other macro. If so I will have to resolve that and if not I can add a move to the back left where homeall.g goes.
-
@jay_s_uk the M401 looks like it just runs the deployprobe.g routine which in turn runs a M280 P7 S10
; deployprobe.g ; called to deploy a physical Z probe M280 P7 S10 ; deploy BLTouch
Not quite sure what the net difference is between the M280 P7 S60 and a M280 P7 S10 commands.
-
@bstump normally one is deploy and the other is retract. what type of probe do you have?
-
@bstump said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
@fcwilt said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
@bstump said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
@fcwilt Yes it looks like it homes where is currently is on the bed
That is not a good idea - it needs to be the same point every time G30 is used for homing Z or setting the Z=0 datum.
Frederick
I will have to see if it is used as a subroutine in any other macro. If so I will have to resolve that and if not I can add a move to the back left where homeall.g goes.
Can we set the Z=0 for each Z Stepper, better still for the mean of the 4 steppers. I hope that is what the G30 S4 is supposed to do.
-
@jay_s_uk said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
@bstump normally one is deploy and the other is retract. what type of probe do you have?
BLTouch
-
@jay_s_uk the H558 commands in both the tilt macro and the config.g are identical. I will comment out the one in my modified macro.
-
After commenting out the M558 and M280 in my Tilt Macro the results are better but it does not look like it corrected the Z=0. Maybe I need to run a G30 S-2 K0 to correct the Z=0.
M300 S555 P666 ; ;M280 P7 S60 M300 S1888 P444 ; Beep M561 G28 ; Home ;M558 P9 H15 F120 T9000 A1 R0.7 ; Set Z probe type to bltouch and the dive height + speeds G30 P0 X10 Y10 Z-99999 ; Probe near a leadscrew G30 P1 X980 Y10 Z-99999 ; Probe near a leadscrew G30 P2 X980 Y980 Z-99999 ; Probe near a leadscrew G30 P3 X10 Y980 Z-99999 S4 ; Probe near a leadscrew M561 ; home G28 ; home ;M558 P9 H15 F120 T9000 A1 R0.7 ; Set Z probe type to bltouch and the dive height + speeds G30 P0 X10 Y10 Z-99999 ; Probe near a leadscrew G30 P1 X980 Y10 Z-99999 ; Probe near a leadscrew G30 P2 X980 Y980 Z-99999 ; Probe near a leadscrew G30 P3 X10 Y980 Z-99999 S4 ; Probe near a leadscrew M561 ; home G28 ; home ;M558 P9 H15 F120 T9000 A1 R0.7 ; Set Z probe type to bltouch and the dive height + speeds G30 P0 X10 Y10 Z-99999 ; Probe near a leadscrew G30 P1 X980 Y10 Z-99999 ; Probe near a leadscrew G30 P2 X980 Y980 Z-99999 ; Probe near a leadscrew G30 P3 X10 Y980 Z-99999 S4 ; Probe near a leadscrew M561 ; home G28 ; home M300 S1600 P555 M291 S2 P"Automatic bed tilt calibration has been performed"
-
Well the G30 S-2 K0 still errored out and said no tool selected.
M300 S555 P666 ; ;M280 P7 S60 M300 S1888 P444 ; Beep G30 S-2 K0 M561 G28 ; Home ;M558 P9 H15 F120 T9000 A1 R0.7 ; Set Z probe type to bltouch and the dive height + speeds G30 P0 X10 Y10 Z-99999 ; Probe near a leadscrew G30 P1 X980 Y10 Z-99999 ; Probe near a leadscrew G30 P2 X980 Y980 Z-99999 ; Probe near a leadscrew G30 P3 X10 Y980 Z-99999 S4 ; Probe near a leadscrew M561 ; home G28 ; home ;M558 P9 H15 F120 T9000 A1 R0.7 ; Set Z probe type to bltouch and the dive height + speeds G30 P0 X10 Y10 Z-99999 ; Probe near a leadscrew G30 P1 X980 Y10 Z-99999 ; Probe near a leadscrew G30 P2 X980 Y980 Z-99999 ; Probe near a leadscrew G30 P3 X10 Y980 Z-99999 S4 ; Probe near a leadscrew M561 ; home G28 ; home ;M558 P9 H15 F120 T9000 A1 R0.7 ; Set Z probe type to bltouch and the dive height + speeds G30 P0 X10 Y10 Z-99999 ; Probe near a leadscrew G30 P1 X980 Y10 Z-99999 ; Probe near a leadscrew G30 P2 X980 Y980 Z-99999 ; Probe near a leadscrew G30 P3 X10 Y980 Z-99999 S4 ; Probe near a leadscrew M561 ; home G28 ; home M300 S1600 P555 M291 S2 P"Automatic bed tilt calibration has been performed"
-
Added T0 to the macro (not config.g) and got past the G30 S-2 no tool error, but still no sign the Z=0 is being reset.
M300 S555 P666 ; ;M280 P7 S60 M300 S1888 P444 ; Beep T0 G30 X10 Y980 S-2 K0 M561 G28 ; Home ;M558 P9 H15 F120 T9000 A1 R0.7 ; Set Z probe type to bltouch and the dive height + speeds G30 P0 X10 Y10 Z-99999 ; Probe near a leadscrew G30 P1 X980 Y10 Z-99999 ; Probe near a leadscrew G30 P2 X980 Y980 Z-99999 ; Probe near a leadscrew G30 P3 X10 Y980 Z-99999 S4 ; Probe near a leadscrew M561 ; home G28 ; home ;M558 P9 H15 F120 T9000 A1 R0.7 ; Set Z probe type to bltouch and the dive height + speeds G30 P0 X10 Y10 Z-99999 ; Probe near a leadscrew G30 P1 X980 Y10 Z-99999 ; Probe near a leadscrew G30 P2 X980 Y980 Z-99999 ; Probe near a leadscrew G30 P3 X10 Y980 Z-99999 S4 ; Probe near a leadscrew M561 ; home G28 ; home ;M558 P9 H15 F120 T9000 A1 R0.7 ; Set Z probe type to bltouch and the dive height + speeds G30 P0 X10 Y10 Z-99999 ; Probe near a leadscrew G30 P1 X980 Y10 Z-99999 ; Probe near a leadscrew G30 P2 X980 Y980 Z-99999 ; Probe near a leadscrew G30 P3 X10 Y980 Z-99999 S4 ; Probe near a leadscrew M561 ; home G28 ; home M300 S1600 P555 M291 S2 P"Automatic bed tilt calibration has been performed"
-
I need a way that automatically works to reset the Z=0. Currently no sign the tilt correction is taking nor the Z=0 is being reset correctly.
-
@jay_s_uk said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
if !move.axes[0].homed || !move.axes[1].homed ; If the printer hasn't been homed, home it G28 XY ; home y and x ; G28 Z ; home z ; M561 ; clear any bed transform M98 P"bed_screws.g" ; perform bed tramming echo "BTC: 1 - Difference was " ^ move.calibration.initial.deviation ^ "mm" ; while move.calibration.initial.deviation >= 0.01 ; perform additional tramming if previous deviation was over 0.01mm if iterations = 5 abort "Too many auto tramming attempts" M98 P"bed_screws.g" ; perform bed tramming echo "BTC: " ^ iterations + 2 ^ " - Difference was " ^ move.calibration.initial.deviation ^ "mm" continue ; G28 Z
I tried to use your suggested macro and it errored out
-
@bstump said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
I tried to use your suggested macro and it errored out
But it does sort of run and the second iteration does look like it compensated for the Z=0
-
@bstump what version of RRF are you running?
Post the output of M115 -
@jay_s_uk said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
@bstump what version of RRF are you running?
Post the output of M115 -
@bstump said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
@jay_s_uk said in Automatic Bed Tilt Calibration, G30 S4, and G30 S-2:
@bstump what version of RRF are you running?
Post the output of M115Looks to be the latest RRF