Z offset for T0

Discussion in 'Getting Started' started by mhe, Aug 25, 2019.

  1. mhe

    mhe Well-Known Member

    Sep 5, 2015
    Likes Received:
    Ok, so following the documentation, it just seems to be assumed that T0 is perfectly aligned with the Z probe because we assume no offset here. However, just as mentioned in the chapter with the first print, I measured my T0 offset from my Z switch height to be 0.35mm with a feeler gauge and verified it by printing a single layer (which was accurate to 0.01mm).

    Now my problem is that I don't really know how to adjust the offset of T0 in Z as running with -0.35mm babysteps seems kinda stupid. I tried G10 tool offsets for T0 but they didn't do anything and I wonder whether this is desired behavior of RRF or not.

    If I change my default Z reference point in config.g with the G31 command, it seems to not require any more baby steps, however, the display of the mesh bed leveling heightmap is messed up (as my bed does not even intersect the 0 reference plane anymore).

    What am I doing wrong here?
    Are the G10 offsets relative to T0 or are they relative to the Z zero point? Because I don't want to run babysteps all the time.
  2. mhe

    mhe Well-Known Member

    Sep 5, 2015
    Likes Received:
    Nevermind, I was being an idiot: I changed the tool offset in the part of the config that is supposed to re-zero it. Later the same tool gets overridden by another G10 command - if you change that, it works.

    Now if only bed adhesion wasn't such a bitch to me today, filament seems to love these Nozzle X thingies more than the printbed...
  3. Spoon Unit

    Spoon Unit Well-Known Member

    Sep 6, 2015
    Likes Received:
    The Z stop
    mhe likes this.
  4. mhe

    mhe Well-Known Member

    Sep 5, 2015
    Likes Received:
    To continue this issue, I found that adjusting the G31 parameter in config.g does nothing. So, in my config, I have G31 P200 Z-5 to make the machine set Z to -5mm when the Z probe is triggered.
    Before that, M558 correctly sets up the Z-probe and homing works.

    However, regardless of what I set G31 to, EVERY time I run home, the machine triggers at Z=0 and then moves to Z+5 after homing, irrespective of the Z probe offset performed by G31. Even when I manually send (e.g.) G31 P200 Z=115 on the gcode console, it saves the parameter correctly (as verified by sending just G31 and also checking the machine properties, the values always correspond), but when I home the machine, NOTHING changes, it always goes to Z coordinate 5mm.

    I am ripping my hair out here. All I want is to adjust the Z trigger height so T0 can work with a zero tool offset in Z and then only do non-zero Z tool offsets for tools 1-3. What am I missing here?

    @dc42 any idea what I am messing up?
    ; Configuration file for Duet WiFi / Ethernet
    ; executed by the firmware on start-up
    ; General preferences
    M111 S0                         ; Debugging off
    G21                             ; Work in millimetres
    G90                             ; Send absolute coordinates...
    M83                             ; ...but relative extruder moves
    M555 P2                         ; Set firmware compatibility to look like Marlin
    ; Network
    M550 PToolChanger                    ; Machine name and Netbios name (can be anything you like)
    M551 Pxxxxxxxxxxx                    ; Machine password (used for FTP)
    M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xEE            ; MAC Address (change if you need more than 1 DuetWifi on 1 network
    M552 S1                            ; Enable WiFi
    M552 P0.0.0.0                        ; Set IPv4 address, use zero for DHCP (Static DHCP set on Router)
    M587 S"xxxxx" P"xxxxx"            ; Connect to WiFi
    M586 P0 S1                         ; Enable HTTP
    M586 P1 S0                         ; Disable FTP
    M586 P2 S0                         ; Disable Telnet
    M667 S1                         ; Select CoreXY mode  
    ; Endstops
    M574 X1 Y1 S3                         ; Set X / Y endstop stall detection
    M574 Z1 S2                         ; Set Z endstop probe
    M558 P4 C2 X0 Y0 Z2 H3 F360 I0 T20000             ; Set Z probe type to switch, the axes for which it is used and the dive height + speeds
    G31 X0 Y0                         ; Set X,Y probe offset
    G31 P200 Z-115                         ; Set Z probe trigger value and trigger height
    M557 X10:290 Y20:180 S40                 ; Define mesh grid
    ; Drive direction
    M569 P0 S0                         ; Drive 0 X
    M569 P1 S0                         ; Drive 1 Y
    M569 P2 S1                         ; Drive 2 Z
    M569 P3 S0                         ; Drive 3 E0
    M569 P4 S0                         ; Drive 4 E1
    M569 P5 S1                         ; Drive 5 E2
    M569 P6 S1                         ; Drive 6 E3
    M569 P7 S0                         ; Drive 7 COUPLER
    M569 P8 S0                         ; Drive 8 UNUSED
    M569 P9 S0                         ; Drive 9 UNUSED
    M584 X0 Y1 Z2 C7 E3:4:5:6                 ; Apply custom drive mapping
    M208 X-35:328.5 Y-49:243 Z0:285 C0:500 S0         ; Set axis maxima & minima
    M350 E8:8:8:8 C8 I0                     ; Configure microstepping without interpolation
    M350 X16 Y16 Z16 I1                    ; Configure microstepping with interpolation
    M92 X100 Y100 Z1600 C100 E417:417:417:417        ; Set steps per mm
    M566 X400 Y400 Z8 C2 E300:300:300:300            ; Set maximum instantaneous speed changes (mm/min)
    M203 X35000 Y35000 Z1200 C5000 E5000:5000:5000:5000    ; Set maximum speeds (mm/min)
    M201 X6000 Y6000 Z400 C500 E2500:2500:2500:2500        ; Set accelerations (mm/s^2)
    M906 X2000 Y2000 Z1330 C500 E1680:1680:1680:1680 I30    ; Set motor currents (mA) and motor idle factor in percent
    M84 S120                         ; Set idle timeout
    ;Stall Detection
    M915 C S5 F0 H200 R4700                    ; Coupler
    ;Stall Detection
    M915 X Y S5 F0 H400 R4700                ; X / Y Axes
    ; Heaters
    M305 P0 T100000    B4300 R4700                 ; Set bed thermistor
    ;M305 P0 T100000 B4138 C0                 ; Set bed thermistor
    M143 H0 S225                         ; Set temperature limit for heater 0 to 225C
    M305 P1 X200                        ; Set PT100 for T0
    M143 H1 S300                         ; Set temperature limit for heater 1 to 300C
    M305 P2 X201                        ; Set PT100 for T1
    M143 H2 S300                         ; Set temperature limit for heater 2 to 300C
    M305 P3 X204                        ; Set PT100 for T2
    M143 H3 S300                         ; Set temperature limit for heater 3 to 300C
    M305 P4 X205                        ; Set PT100 for T3
    M143 H4 S300                         ; Set temperature limit for heater 4 to 300C
    ; Tools
    M563 P0 S"T0" D0 H1 F2                    ; Define tool 0
    G10 P0 X0 Y0 Z0                     ; Reset tool 0 axis offsets
    G10 P0 R0 S0                         ; Reset initial tool 0 active and standby temperatures to 0C
    M563 P1 S"T1" D1 H2 F4                    ; Define tool 1
    G10 P1 X0 Y0 Z0                     ; Reset tool 1 axis offsets
    G10 P1 R0 S0                         ; Reset initial tool 1 active and standby temperatures to 0C
    M563 P2 S"T2" D2 H3 F6                    ; Define tool 2
    G10 P2 X0 Y0 Z0                     ; Reset tool 2 axis offsets
    G10 P2 R0 S0                         ; Reset initial tool 2 active and standby temperatures to 0C
    M563 P3 S"T3" D3 H4 F8                    ; Define tool 3
    G10 P3 X0 Y0 Z0                     ; Reset tool 3 axis offsets
    G10 P3 R0 S0                         ; Reset initial tool 3 active and standby temperatures to 0C
    ; Fans
    M106 P0 S0                        ; UNUSED
    M106 P1 S255 H1 T70                    ; T0 HE
    M106 P2 S0                        ; T0 PCF
    M106 P3 S255 H2 T70                     ; T1 HE
    M106 P4 S0                        ; T1 PCF
    M106 P5 S255 H3 T70                     ; T2 HE
    M106 P6 S0                         ; T2 PCF
    M106 P7 S255 H4 T70                    ; T3 HE
    M106 P8 S0                        ; T3 PCF
    M593 F50                        ; cancel ringing at 50Hz
    ;M376 H15                        ; bed compensation taper
    ;tool offsets
    G10 P0 X-9 Y39 Z0                    ; T0
    G10 P1 X-9 Y39 Z0                    ; T1
    G10 P2 X-9 Y39 Z0                    ; T2
    G10 P3 X-9 Y39 Z0                    ; T3
    ;deselect tools
    ;M572 D0 S0.2                         ; pressure advance T0
    ;M572 D1 S0.2                         ; pressure advance T1
    ;M572 D2 S0.2                         ; pressure advance T2
    ;M572 D3 S0.2                         ; pressure advance T3
    ;G29 S1                            ; Enable Mesh compensation and load heightmap.csv, call in slicer instead
    M501                            ; call config-override.g
  5. dc42

    dc42 Well-Known Member

    Aug 16, 2016
    Likes Received:
    Check whether you have a config-override.g file with a G31 command in it.
    mhe likes this.
  6. mhe

    mhe Well-Known Member

    Sep 5, 2015
    Likes Received:
    I do have a config-override.g file but it does not contain a G31 command.

    I have played around a bit and as far as I can tell, the software makes an assumption that whenever I hit the Z endstop, it sets Z to the coordinate that it specified as the minimum in M208.

    The only thing that G31 does have an effect on is G29 bed mesh probing, if I put the Z offset at anything significant, then the probing outright fails and claims that the offset is too significant. Firmware is 2.04RC1.

Share This Page