Substantial Z offset: Two Z-Endstops and IR-Probe



  • I have a self-built HevoRS.

    • Duet Web Control 3.1.1
    • Board: Duet 2 WiFi (2WiFi)
    • Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.1.1 (2020-05-19b2)
    • Duet WiFi Server Version: 1.23
    • CoreXY

    This has two separate Z-Endstops and a DC42 IR-Probe.
    Screenshot 2020-09-02 171922.jpg

    If I now execute a G32 I always receive the message:
    Warning: the height map has a substantial Z offset. Suggest use Z-probe to establish Z=0 date, then re-probe the mesh.

    I have successfully established Z date several times.
    Does anyone have an idea how I can solve the problem?

    Here my Config file:
    config.g


  • Moderator

    Post your homeall.g homez.g and bed.g as well.

    If you use the endstops to set the Z height, then it's going to be based on the assumption that the endstop position is accurate to the bed surface being at Z0, but that may not be the case. The probe is actually measuring the bed position directly. The warning is basically telling you that you've loaded/created a heightmap using the endstops to define Z0 when you should be using the probe to do that.

    Posting your files will let us see what you're actually doing.



  • Here the additional files:
    homez.g homeall.g bed.g


  • Moderator

    M584 X0 Y1 Z2:4 E3                               ; set drive mapping
    M350 X16 Y16 Z16 U16 E16 I1                        ; configure microstepping with interpolation
    M92 X80.00 Y80.00 Z400.00 U400.00 E418.00              ; set steps per mm
    M566 X900.00 Y900.00 Z12.00 U12.00 E600.00            ; set maximum instantaneous speed changes (mm/min)
    M203 X9000.00 Y9000.00 Z180.00 U180.00 E6000.00        ; set maximum speeds (mm/min)
    M201 X800.00 Y800.00 Z20.00 U20.00 E800.00            ; set accelerations (mm/s^2)
    M906 X1300 Y1300 Z1300 U1300 E1300 I30               ; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                        ; Set idle timeout
    
    ; Axis Limits
    M208 X0 Y-45 Z0 U0 S1                             ; set axis minima
    M208 X265 Y245 Z265 U265 S0                         ; set axis maxima
    
    ; Endstops
    M574 X1 S1 P"xstop"                            ; configure active-high endstop for low end on X via pin xstop
    M574 Y1 S1 P"ystop"                            ; configure active-high endstop for low end on Y via pin ystop
    M574 Z1 S1 P"zstop+e1stop"                            ; configure active-high endstop for low end on Z via pin zstop
    
    ; Z-Probe
    M558 P1 C"zprobe.in+zprobe.mod" H1 F2000 T15000 ; set Z probe type to unmodulated and the dive height + speeds
    G31 P500 X34 Y2 Z1.408                          ; set Z probe trigger value, offset and trigger height
    M557 X35:260 Y10:240 P5:4                       ; define mesh grid
    

    If the U axis is intended to be for the second Z motor, you don't need it in 3.1.1 unless you want to be able to manually jog it around independent to the other Z axis motor. You've defined both endstops for the Z axis, so it will automatically move the motors to the endstops. No need for the U axis anymore. So remove all references to U unless you want to jog it manually.

    Now if we assume that you've set the trigger point for both the Z endstops correctly so that the tilt is removed, your homing file is fine, however you aren't using the probe anywhere to set Z0, which is the source of that error message.

    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Tue Aug 25 2020 16:04:36 GMT+0200 (Mitteleuropäische Sommerzeit)
    G91                     ; relative positioning
    G1 H2 Z5 F12000         ; lift Z relative to current position
    G1 H1 X-300 Y-295 F6000 ; move quickly to X or Y endstop and stop there (first pass)
    G1 H1 X-300             ; home X axis
    G1 H1 Y-295             ; home Y axis
    G1 X5 Y5 F12000         ; go back a few mm
    G1 H1 X-300 F300        ; move slowly to X axis endstop once more (second pass)
    G1 H1 Y-295             ; then move slowly to Y axis endstop
    G1 H1 Z-270 F300        ; move Z down stopping at the endstop
    G90                     ; absolute positioning
    G92 Z0                  ; set Z position to axis minimum (you may want to adjust this)
    

    At the end of the homeall I would add a single G30 probe to the center of the bed so that Z0 is being set by the probe, and then in bed.g I would make sure to run G28 before G29 so that the axis are homed, the tilt is corrected, and Z0 is found by the probe.

    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Tue Aug 25 2020 16:04:36 GMT+0200 (Mitteleuropäische Sommerzeit)
    G91                     ; relative positioning
    G1 H2 Z5 F12000         ; lift Z relative to current position
    G1 H1 X-300 Y-295 F6000 ; move quickly to X or Y endstop and stop there (first pass)
    G1 H1 X-300             ; home X axis
    G1 H1 Y-295             ; home Y axis
    G1 X5 Y5 F12000         ; go back a few mm
    G1 H1 X-300 F300        ; move slowly to X axis endstop once more (second pass)
    G1 H1 Y-295             ; then move slowly to Y axis endstop
    G1 H1 Z-270 F300        ; move Z down stopping at the endstop
    G90                     ; absolute positioning
    G92 Z0                  ; set Z position to axis minimum (you may want to adjust this)
    G1 X150 Y125 Z20 F6000 ; move to center of the bed.
    G30 ; probe the bed surface to find Z0
    G1 X10 Y10 Z10 ; move to parking position
    

    You can adjust the position of the probing such that the probe is placed at the center of the bed. G1 X150 Y125 is just a random guess on my part.

    ; bed.g
    ; called to perform automatic bed compensation via G32
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Tue Aug 25 2020 16:04:36 GMT+0200 (Mitteleuropäische Sommerzeit)
    M561 ; clear any bed transform
    G28 ; home all axis
    G29  ; probe the bed and enable compensation
    

    Then in your slicer start gcode you would want

    G28 ; to home
    G29 S1 ; to load a saved heightmap

    Or just G32 to home and re-run a fresh heightmap



  • @Phaedrux Thanks for your very detailed explanation and help. With the mentioned adjustments the problem does not occur anymore.

    Many thanks for your support 👍


Log in to reply