Z-Homing via endstops vs. Mesh Bed Compensation



  • Hello everyone,

    i can't find the settings for auto levelling the bed as I want it:

    I have a CoreXY-Printer with 3 independent Z-Leadscrews. Every Z-Axis has an endstop at its top position (z=0). What I am trying to do:

    1. Step: Home all axes with the use of the endstops:
      This works, and even a manually heavy tilted bed is levelled by individually moving all 3 Z-
      Axes until all endstops are active.

    2. Step: After the "rough" bed levelling via the endstops (Step 1), I want to use a BL-Touch-Sensor
      to create a .csv Map. This works as well. Right now, in the heightmap I can see that the
      Bed is tilted in one direction. This should be caused by small height differences of the
      endstop parts.

    3. Step: If i activate Mesh Bed compensation, i can see that the bed moves up and down if i move
      the Hotend along the y-axis. It does what it should do, but I want the bed to detect that it
      is still tilted after endstop homing and correct its 3 z-axes accordingly after heightmap
      creation. Instead of the z-correction while moving in the xy-plane, i want the bed to level
      itself before printing.

    So is this only possible, if i just use homing via z-Probe( BL-Touch) instead of endstop homing?
    Of course i can adapt the endstop positions, but this would be the more elegant way to go in my eyes.




  • Moderator

    In case it's not already clear from reading the linked doc, you will need to add some gcode to the config.g to tell the firmware where your leadscrews are physically, and then you will need to add some gcode to a macro, probably bed.g (G32), to probe near those lead screws and effect the tilt correction. You can then carry on with a G29 to map the bed surface.



  • Ok, thank you for your answers.

    So, it seems that I have to use the G30 command to auto-level the bed.
    I hoped there is a way to use the Mesh Bed Compensation Data to level the bed in the 2 directions (e.g. with a least square algorithm). By that I mean not to use the Mesh Bed Compensation only while moving the Hotend by adapting the bed-height but to level the bed as good as possible by turning the 3 z-motors individually before printing.


  • Moderator

    @Lasko said in Z-Homing via endstops vs. Mesh Bed Compensation:

    By that I mean not to use the Mesh Bed Compensation only while moving the Hotend by adapting the bed-height but to level the bed as good as possible by turning the 3 z-motors individually before printing.

    Mesh Bed Levelling doesn’t work that way. It’s role is to compensate for any unevenness in the bed, once it is already on a level plane. It doesn’t automatically level the bed plane; the three point bed levelling does that. You can certainly use the information from the mesh levelling to level the bed plane manually, but you have a probe that can do that!

    Why put the endstops at the top of the Z axes? You have the probe to provide setting Z endstop and datum, as well as bed plane levelling and mesh compensation (if it’s even necessary). Better to put the Z endstops at the bottom of the axis, then if you lose power mid-print, you can home to them on restart, when you can’t home to the top of the axis or with the probe, because the print would be in the way. You can even use the probe to set the Z endstops offsets very accurately, so you don’t even need to probe.

    Ian



  • Thank you for those informations Ian!

    I joined the "development" of this 3D-Printer as part of a student thesis. It might really be the best option to revisit the positioning of the endstops that was done before. I never thought about the power-off-mid-print situation. Thank you for your reply!

    Maybe i even find a way to use the Mesh Data. This way I would already have something i could write into my thesis 😄

    Lasko



  • So,
    I tried to Auto-Bed-Level with the G30 command and the BL-Touch:

    G30 P0 X10 Y10 Z-9999 ; probe at point 1
    G30 P1 X20 Y20 Z-9999 ; probe at point 2
    G30 P2 X30 Y10 Z-9999 S3 ; probe at point 3 and auto bed level

    It doesn't work as I want it to. It does the same as Mesh bed levelling, only compensating the tilted bed during moving the CoreXY-Extruder. I hoped that this Three-Point-Levelling might work (like @droftarts said). But there is no visible bed levelling when running this code...



  • M98 P"0:/macros/homezBLT.g"
    Warning: 3/4-point bed compensation is deprecated and will be removed in a future firmware release. Please use G29 mesh bed compensation instead.
    Bed equation fits points [20.0, 60.0, -4.238] [40.0, 100.0, -6.059] [60.0, 60.0, -5.284]

    This is what the console responds. It finds the points and seems to calculate the plane correction, but the motors aren't moving afterwards... Is the S-parameter wrong?

    Lasko



  • @Lasko

    Did you follow all the steps in the information provided in the link?

    There are a number of things that need to be in "sync" but when the configuration settings are all correct it does work.

    Frederick



  • Hello Frederick,

    yes, I tried everything relevant that is in "Bed levelling using multiple independent Z motors". May there be a problem if i first define 3z endstops via the M574 command and reconfiguring the board later (in another macro) to use a BL-Touch as an z-Probe?

    Lasko



  • Hi,

    I have both Z end stop sensors using IR "beam break" devices and a BLTouch Z probe.

    I use the end stop sensors for Z homing and use the probe for setting the Z=0 datum and creating the height map.

    So I don't think you need to have code to change from one to another.

    In the meantime can you post your M671 command and your bed.g file?

    Thanks.

    Frederick


  • Moderator

    Post your config files. We can't help unless we see what your gcode is trying to do.

    The error message makes it sound like you do not have an M671 command in your config.g, so it's not trying to do leveling, it's just trying to do a 3 point compensation.



  • @Phaedrux I could solve the problem in another thread, you should have seen it 😌

    For all that are interested:

    M671 X--xxx,xx:xx,xx:xxx,xx ... is invalid
    M671 X-xxx.xx:xx.xx:xxx.xx ... is valid
    

    So no commata or "-" between X/Y and the values!

    Thank you all for your help,
    Lasko


  • Moderator

    @Lasko See https://duet3d.dozuki.com/Wiki/Gcode#Section_M671_Define_positions_of_Z_leadscrews_or_bed_levelling_screws for code examples of correct notation. Use the Gcode dictionary to check your syntax when writing gcode commands. There's also a description of correct syntax here: https://duet3d.dozuki.com/Wiki/Gcode#Section_G_Code_Structure

    Ian



  • @Lasko said in Z-Homing via endstops vs. Mesh Bed Compensation:

    M671 X--xxx,xx:xx,xx:xxx,xx ... is invalid
    M671 X-xxx.xx:xx.xx:xxx.xx ... is valid
    

    So no commata or "-" between X/Y and the values!

    Just to be sure you understand a hyphen indicates a negative value.

    So the "valid" example has the first location as negative.

    Frederick


Log in to reply