Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Automatic Bed Tilt Calibration, G30 S4, and G30 S-2

    Scheduled Pinned Locked Moved
    General Discussion
    5
    46
    2.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BStumpundefined
      BStump
      last edited by

      I have very large Modix Big Meter with 4 corner Z stepper motors controlling the height and level of the bed. When I run multiple consecutive automatic tilt compensations it looks like it never remembers the adjusted Z=0 positions when it does the G30 S4, and each cycle starts with about the same tilt. The issue is that the Z Offset keeps growing as the G30 S4 and even the G30 S-2 command does not work (the G30 S-2 keeps saying tool was not selected). A a result when I run an automated tilt compensation with an automatic bed mesh compensation it says the Z-Offset is now excessive.

      Is this a known issue with the Duet and the G30 command, or am I missing something with the G30 S4 command to ensure it remember the tilt compensations it just did?

      516ebf1c-a22f-4b71-ae65-d3e29d5392bf-image.png

      5875ce5f-7cf8-45c6-9c56-b982c92279f3-image.png

      This is three consecutive rounds of tilt calibration/compensation probing the four corners of the bed neat the lead screws. While I would expect the first to be off to some degree, the 2nd and 3rd appear to have the same results indicating to me the Z=0 was never adjusted for each screw.

      4754bbee-7699-4ff1-af86-f1da1a27429c-image.png

      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"

      oliofundefined jay_s_ukundefined 2 Replies Last reply Reply Quote 0
      • oliofundefined
        oliof @BStump
        last edited by

        It probably helps if you shared your config.g and homeall.g (and homez.g). For your issue

        (the G30 S-2 keeps saying tool was not selected)

        make sure you select a tool at the end of config.g (just add T0 at the end of config.g). Alternately, try adding Kn to your G30 command to select a probe (n should be 0 if you only have a single z probe).

        Also make sure that M558 in config.g is the same as in your tilt correction script so that differences in dive height and speed don't change the behavior of the BLTouch (which usually is known for decent repeatability).

        <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

        BStumpundefined 1 Reply Last reply Reply Quote 0
        • jay_s_ukundefined
          jay_s_uk @BStump
          last edited by

          @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

          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

          BStumpundefined 3 Replies Last reply Reply Quote 1
          • BStumpundefined
            BStump @oliof
            last edited by

            @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
            
            fcwiltundefined Phaedruxundefined 2 Replies Last reply Reply Quote 0
            • fcwiltundefined
              fcwilt @BStump
              last edited by fcwilt

              @bstump

              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

              Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

              BStumpundefined 1 Reply Last reply Reply Quote 0
              • BStumpundefined
                BStump @fcwilt
                last edited by

                @fcwilt Yes it looks like it homes where is currently is on the bed

                fcwiltundefined 1 Reply Last reply Reply Quote 0
                • fcwiltundefined
                  fcwilt @BStump
                  last edited by

                  @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

                  Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                  BStumpundefined 1 Reply Last reply Reply Quote 0
                  • BStumpundefined
                    BStump @fcwilt
                    last edited by

                    @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.

                    BStumpundefined 1 Reply Last reply Reply Quote 0
                    • BStumpundefined
                      BStump @jay_s_uk
                      last edited by

                      @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.

                      jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                      • jay_s_ukundefined
                        jay_s_uk @BStump
                        last edited by

                        @bstump normally one is deploy and the other is retract. what type of probe do you have?

                        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                        BStumpundefined 1 Reply Last reply Reply Quote 0
                        • BStumpundefined
                          BStump @BStump
                          last edited by

                          @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.

                          1 Reply Last reply Reply Quote 0
                          • BStumpundefined
                            BStump @jay_s_uk
                            last edited by

                            @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

                            1 Reply Last reply Reply Quote 0
                            • BStumpundefined
                              BStump @jay_s_uk
                              last edited by

                              @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.

                              BStumpundefined 1 Reply Last reply Reply Quote 0
                              • BStumpundefined
                                BStump @BStump
                                last edited by

                                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.

                                6571d84c-7454-457b-b462-2641d26b1cff-image.png

                                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"
                                
                                BStumpundefined 1 Reply Last reply Reply Quote 0
                                • BStumpundefined
                                  BStump @BStump
                                  last edited by

                                  Well the G30 S-2 K0 still errored out and said no tool selected.

                                  0404c870-0e2e-45b2-9acd-f199b3790395-image.png

                                  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"
                                  
                                  BStumpundefined 1 Reply Last reply Reply Quote 0
                                  • BStumpundefined
                                    BStump @BStump
                                    last edited by

                                    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.

                                    41eb135b-06db-4aff-9ba3-98a81b02ee83-image.png

                                    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"
                                    
                                    BStumpundefined 1 Reply Last reply Reply Quote 0
                                    • BStumpundefined
                                      BStump @BStump
                                      last edited by

                                      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.

                                      1 Reply Last reply Reply Quote 0
                                      • BStumpundefined
                                        BStump @jay_s_uk
                                        last edited by

                                        @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

                                        5e5d7a71-a9fc-4384-9065-5502b8b3bbb9-image.png 0bf4bd25-64ae-4b10-8cc1-1f03dade83db-image.png

                                        BStumpundefined 1 Reply Last reply Reply Quote 0
                                        • BStumpundefined
                                          BStump @BStump
                                          last edited by BStump

                                          @jay_s_uk

                                          @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

                                          30a7f8a9-fc21-46fa-8d53-35f142a0e1d3-image.png

                                          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                                          • jay_s_ukundefined
                                            jay_s_uk @BStump
                                            last edited by

                                            @bstump what version of RRF are you running?
                                            Post the output of M115

                                            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                                            BStumpundefined 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA