Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    height map shifting down

    Tuning and tweaking
    2
    4
    131
    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.
    • Feynman137
      Feynman137 last edited by Feynman137

      I have noticed that when I execute a homeall and then a mesh compensation my heightmap shifts down but maintains the same shape. For example, at (260,260) which is roughly the center of the bed I saw -0.229, 0.649, -1.114 after performing a homeall and then mesh compensation three times.

      I have also noticed that doing just a mesh compensation 3 times in a row does not result in height map shifting downward. Also if I do a home all and then run G30 S-1 I will always get the same measurement.

      Does anyone know what could be going on? My setup is a CoreXY with a BL touch on duet mainboard 6HC. I will post my config.g and homeall.g for reference.

      ; Configuration file for Duet 3 (firmware version 3)
      ; executed by the firmware on start-up
      ;
      ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Jun 23 2021 23:47:21 GMT-0400 (Eastern Daylight Time)
      
      ; General preferences
      G90                                             ; send absolute coordinates...
      M83                                             ; ...but relative extruder moves
      M550 P"Duet 3"                                  ; set printer name
      M669 K1                                         ; select CoreXY mode
      
      ; Drives
      M569 P0.0 S1                                    ; physical drive 0.0 goes forwards
      M569 P0.1 S1                                    ; physical drive 0.1 goes forwards
      M569 P0.2 S1									; physical drive 0.2 goes forwards
      M569 P0.3 S1									; physical drive 0.3 goes forwards
      M569 P0.4 S1									; physical drive 0.4 goes forwards
      M569 P0.5 S1									; physical drive 0.5 goes forwards                                			
      M569 P1.1 S1                                    ; physical drive 1.1 goes forwards
      M569 P1.2 S1                                    ; physical drive 1.2 goes forwards
      M584 X0.0 Y0.1 Z0.2:0.3:0.4:0.5 E1.1:1.2        ; set drive mapping
      M671 X683.45:683.45:-106.25:-106.25 Y-30.12:513.52:513.52:-30.12 S0.5 			; leadscrews at (xf,yi) (xf,yf) (xi,yf) (xi,yi)
      M350 X16 Y16 Z16 E16:16 I1                      ; configure microstepping with interpolation
      M92 X40.00 Y40.00 Z1200.00 E837.00:837.00        ; set steps per mm
      M566 X900.00 Y900.00 Z150.00 E120.00:120.00      ; set maximum instantaneous speed changes (mm/min)
      M203 X6000.00 Y6000.00 Z300.00 E1200.00:1200.00 ; set maximum speeds (mm/min)
      M201 X500.00 Y500.00 Z10.00 E250.00:250.00      ; set accelerations (mm/s^2)
      M906 X1500 Y1500 Z1500 E800:800 I30             ; set motor currents (mA) and motor idle factor in per cent
      M84 S30                                         ; Set idle timeout
      
      ; Axis Limits
      M208 X0 Y0 Z-2 S1                              ; set axis minima
      M208 X550 Y500 Z451 S0                          ; set axis maxima
      
      ; Endstops
      M574 X1 S1 P"!io4.in"                           ; configure active-low endstop for low end on X via pin !io1.in
      M574 Y1 S1 P"!io5.in"                           ; configure active-low endstop for low end on Y via pin !io5.in
      M574 Z2 S1 P"!io3.in"                           ; configure active-low endstop for high end on Z via pin !io3.in
      
      ; Z-Probe
      M950 S0 C"io7.out"                              ; create servo pin 0 for BLTouch
      M558 P9 C"^io7.in" H2 F120 T6000                ; set Z probe type to bltouch and the dive height + speeds
      G31 X0 Y0 Z4.1                          ; set Z probe trigger value, offset and trigger height
      M557 X10:550 Y10:500 S50                        ; define mesh grid
      
      ; Heaters
      M308 S0 P"1.temp0" Y"thermistor" T100000 B4138  ; configure sensor 0 as thermistor on expansion board pin 1.temp0
      M950 H0 C"1.out0" T0                            ; create nozzle heater output on 1.out0 and map it to sensor 0
      M307 H0 B0 S1.00                                ; disable bang-bang mode for heater  and set PWM limit
      M143 H0 S280                                    ; set temperature limit for heater 0 to 280C
      
      M308 S1 P"1.temp1" Y"thermistor" T100000 B4138  ; configure sensor 2 as thermistor on expansion board pin 1.temp1
      M950 H1 C"1.out1" T1                            ; create nozzle heater output on 1.out2 and map it to sensor 1
      M307 H1 B0 S1.00                                ; disable bang-bang mode for heater  and set PWM limit
      M143 H1 S280                                    ; set temperature limit for heater 1 to 280C
      
      ; bed heater0
      M308 S2 P"0.temp0" Y"thermistor" T100000 B4138    ; configure sensor 2 as thermistor on mainboard pin temp0
      M950 H2 C"0.out9" T2                            ; create bed heater output on 1.out0 and map it to sensor 2
      M140 P0 H2                                         ;assign H2 to bed heater0
      M307 H2 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
      M143 H2 S120                                     ;set temperature limit for heater 0 to 120C 
      
      ; bed heater1
      M308 S3 P"0.temp1" Y"thermistor" T100000 B4138    ; configure sensor 3 as thermistor on mainboard pin temp1
      M950 H3 C"0.out6" T3                             ; create bed heater output on 1.out0 and map it to sensor 3
      M140 P1 H3                                         ;assign H2 to bed heater0
      M307 H3 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
      M143 H3 S120                                     ;set temperature limit for heater 0 to 120C
      
      ; bed heater2
      M308 S4 P"0.temp2" Y"thermistor" T100000 B4138    ; configure sensor 4 as thermistor on mainboard pin temp2
      M950 H4 C"0.out5" T4                             ; create bed heater output on 1.out0 and map it to sensor 4
      M140 P2 H4                                          ;assign H2 to bed heater0
      M307 H4 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
      M143 H4 S120                                     ;set temperature limit for heater 0 to 120C
      
      ; bed heater3
      M308 S5 P"0.temp3" Y"thermistor" T100000 B4138    ; configure sensor 5 as thermistor on mainboard pin temp3
      M950 H5 C"0.out4" T5                             ; create bed heater output on 1.out0 and map it to sensor 5
      M140 P3 H5                                      ;assign H2 to bed heater0
      M307 H5 B0 S10.00                                ; disable bang-bang mode for the bed heater and set PWM limit
      M143 H5 S120                                     ;set temperature limit for heater 0 to 120C
      
      
      
      ; Fans
      M950 F0 C"1.out7" Q500                          ; create fan 0 on pin 1.out7 and set its frequency
      M106 P0 S0 H-1                                  ; set fan 0 value. Thermostatic control is turned off
      M950 F1 C"1.out8" Q500                          ; create fan 1 on pin 1.out8 and set its frequency
      M106 P1 S1 H-1                                  ; set fan 1 value. Thermostatic control is turned off
      
      ; Tools
      M563 P0 D0 H0 F0                                ; define tool 0
      G10 P0 X23.9 Y-28.21 Z0                          ; set tool 0 axis offsets
      G10 P0 R0 S0                                    ; set initial tool 0 active and standby temperatures to 0C
      M563 P1 D1 H1 F1                                ; define tool 1
      G10 P1 X-23.9 Y-28.21 Z0                         ; set tool 1 axis offsets
      G10 P1 R0 S0                                    ; set initial tool 0 active and standby temperatures to 0C
      
      ; Custom settings are not defined
      
      ; Miscellaneous
      M575 P1 S1 B57600                               ; enable support for PanelDue
      
      
      ; homeall.g
      ; called to home all axes
      ;
      ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Jun 23 2021 23:47:22 GMT-0400 (Eastern Daylight Time)
      G91                     ; relative positioning
      G1 H2 Z5 F6000          ; lower Z relative to current position
      G1 H1 X-640 Y-545 F1800 ; move quickly to X or Y endstop and stop there (first pass)
      G1 H1 X-640             ; home X axis
      G1 H1 Y-545             ; home Y axis
      G1 X5 Y5 F6000          ; go back a few mm
      G1 H1 X-640 F360        ; move slowly to X axis endstop once more (second pass)
      G1 H1 Y-545				; then move slowly to Y axis endstop
      G1 X20					;move x axis
      G92 X0
      G1 Y20
      G92 Y0             		;compensate to keep BL touch on plate
      G1 H1 Z550 F360        ; move Z down stopping at the endstop
      G90                     ; absolute positioning
      G92 Z446.5                ; set Z position to axis max (you may want to adjust this)
      
      
      ; Uncomment the following lines to lift Z after probing
      ;G91                    ; relative positioning
      ;G1 Z7 F100             ; lift Z relative to current position
      ;G90                    ; absolute positioning
      
      1 Reply Last reply Reply Quote 0
      • Phaedrux
        Phaedrux Moderator last edited by

        You are using a Z max endstop, so there is likely to be an offset.

        After homing, and before doing the mesh, you should do a single G30 at the center of the bed, preferably with the probe on one of the probe points used in the mesh. This sets the Z0 based on the probe, rather than the endstop. I would expect this to correct your offset.

        Also, I notice that your G31 X Y are missing. You need to tell the firmware what the probe offset is.

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 1
        • Feynman137
          Feynman137 last edited by Feynman137

          @phaedrux could I change my homing to be on the z probe/BL touch? I think I would prefer this than the zmax. Because this is a coreXY and it is moving the plate all the way to the bottom then all the way to the top before prints.

          I see your point about the G31 XY

          What I am suggesting is something like this for the homing file:

          ; homeall.g
          ; called to home all axes
          ;
          ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Jun 23 2021 23:47:22 GMT-0400 (Eastern Daylight Time)
          G91                     ; relative positioning
          G1 H2 Z5 F6000          ; lower Z relative to current position
          G1 H1 X-640 Y-545 F1800 ; move quickly to X or Y endstop and stop there (first pass)
          G1 H1 X-640             ; home X axis
          G1 H1 Y-545             ; home Y axis
          G1 X5 Y5 F6000          ; go back a few mm
          G1 H1 X-640 F360        ; move slowly to X axis endstop once more (second pass)
          G1 H1 Y-545				; then move slowly to Y axis endstop
          G1 X20					;move x axis
          G92 X0					;compensate to keep BL touch on plate
          G1 X275					;move x to center of build plate
          G1 Y20					;move y from unprintable region
          G92 Y0             		;compensate to keep BL touch on plate
          G1 Y250					;move y to center of build plate
          G30 S-1        			; move Z down stopping at the endstop
          G92 Z4.1				;set zaxis to z probe trigger height
          G90 					;absolute positioning
          

          I did just roll the dice and give this a try and it seemed to work fine. I expanded it to do a second z probe after the first one. But the only problem I am seeing is that I can't control the G30 S-1 speed, so it moves pretty fast to do the 2nd z probe and I'd like to make that really slow.

          ; homeall.g
          ; called to home all axes
          ;
          ; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Jun 23 2021 23:47:22 GMT-0400 (Eastern Daylight Time)
          G91                     ; relative positioning
          G1 H2 Z5 F300          ; lower Z relative to current position
          G1 H1 X-640 Y-545 F1800 ; move quickly to X or Y endstop and stop there (first pass)
          G1 H1 X-640             ; home X axis
          G1 H1 Y-545             ; home Y axis
          G1 X5 Y5 F6000          ; go back a few mm
          G1 H1 X-640 F360        ; move slowly to X axis endstop once more (second pass)
          G1 H1 Y-545				; then move slowly to Y axis endstop
          G1 X20					;move x axis
          G92 X0					;compensate to keep BL touch on plate
          G1 Y20					;move y from unprintable region
          G92 Y0             		;compensate to keep BL touch on plate
          G1 X275	F1800			;move x to center of build plate
          G1 Y250	F1800			;move y to center of build plate
          G30 S-1        			; move Z down stopping at the endstop
          G92 Z4.1				;set zaxis to z probe trigger height
          G1 Z5 F100				;move build plate down slowly for second pass
          G30 S-1					;zhoming second pass
          G92 Z4.1				;set z coordinates
          G1 Z5 F100				;move buildplate down slightly
          G90 					;absolute positioning
          
          1 Reply Last reply Reply Quote 0
          • Phaedrux
            Phaedrux Moderator last edited by

            Use G30, not G30 S-1.

            G30 is a single probe to find Z0.

            G30 S-1 is to determine the trigger height of the probe when z0 is set manually.

            To control the speed of the probe move you need to adjust your M558 command in config.g which defines the probe behaviour. The F value is the dive speed.

            https://docs.duet3d.com/User_manual/Reference/Gcodes#m558-set-z-probe-type

            Z-Bot CoreXY Build | Thingiverse Profile

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