[Solved] Calibrate Z-probe macro



  • I've posted in the past about this and I 've read a couple other posts, but I'm still not sure I completely understand it.

    I'm trying to create a macro that measures the trigger height and saves it to config-override. As I understand it I should be able to run a trigger height measuring script using G30 which sets the current height to the z probe trigger height. Then I send M500 P31 to store this new trigger height to config-override, however, the Z trigger height in config-override does not seem to update with the new measured value. Do I have to send G31 with the new measured value manually before sending M500 P31?





  • I've tried this as well and I can't get it to work either.

    I manually adjusted my inductive probe but it's not perfect.

    Not sure what I missed either.



  • How are you measuring your trigger height? Are you following instructions of above link point to point?



  • I think he's asking more for an end product targeted at a non-technical end user, so trying to make the process as automated as possible without needing to measure things or edit files.



  • As for me, I've followed the instructions on the link. I've done the following:
    I've positioned the nozzle at the center of the bed, or very close to.
    I've jogged the bed up down so that the nozzle is just touching a sheet of #20 printer paper. I had to use M464 S0 to do so.
    I then ran G92 Z0 to set z=0
    I've moved the bed down 5mm.
    I sent G30 S-1 to the controller. The bed came up.

    I ran steps five through seven several times.
    In the we interface I edited config.g and set z in the G31 command to the trigger height I was given in the previous steps.

    I wonder if I missed something though.



  • @Phaedrux Yes, you are exactly right. Right now I'm looking into the G30 S-2 which measures the tool offset and that does save to config-override. However, I have yet to get is to measure the correct offset. Hoping it is just because my procedure for the script is not quite right yet.



  • This script worked for me

    T0
    M291 P"Press ""OK"" if you would you like to calibrate the Z-offset for this Tool Cartridge." R"Calibrate Z-Offset" S3
    M291 P"Make sure your nozzle is free of debris. Press ""Cancel"" if you need to stop and clean the nozzle." R"Calibrate Z-Offset" S3
    M291 P"Homing, please wait..." R"Calibrate Z-Offset" S1
    M98 P/sys/homeall.g
    M208 S1 Z-2 ; allow movement below Z0
    G1 X100 Y10 Z8 F2000 ; move to center of bed
    M558 P0
    G30 S-2
    M500 ; save results
    M501 ; load new data
    M208 S1 Z0 ; disallow movement below Z0
    G1 Z25 ; drop build plate
    M291 P"Z-offset calibration complete! " R"Calibrate Z-Offset" S1 T3



  • @jckray

    I'll try that.

    I see that your script has M500 to save the results. I don't see that on the calibrate Z probe page. Is that what I've been missing?



  • @jamesadoty said in [Solved] Calibrate Z-probe macro:

    Is that what I've been missing?

    Not if you've already entered it manually into config.g.

    Perhaps you could start your own thread with the specifics of your issue.



  • @phaedrux

    I thinks so too. I will.

    Thanks.



  • @jamesadoty this script measures and saves a G10 tool offset, which is separate from the z-probe trigger hight. I went this route, because, as I understand it, measuring the trigger height just reports the value and requires a manual G31 entry with the new trigger hight in order for M500 P31 to save the new trigger height. For an individual printer without any kind of tool changing it is probably better to just measure the trigger height and manually update the value in config. For my application which is for a consumer product and has to do with tool changing it actually makes more sense to use the tool offset to and have a static z-probe trigger height.


  • administrators

    @jckray said in [Solved] Calibrate Z-probe macro:

    this script measures and saves a G10 tool offset, which is separate from the z-probe trigger hight. I went this route, because, as I understand it, measuring the trigger height just reports the value and requires a manual G31 entry with the new trigger hight in order for M500 P31 to save the new trigger height.

    Hmm, maybe I should add a S-3 option to the G31 command, that probes the bed and then sets the trigger height to the stopped height?



  • @jckray

    I like your script though. It shows how powerful Reprap firmware really is.


  • administrators

    @jamesadoty said in [Solved] Calibrate Z-probe macro:

    @jckray

    I like your script though. It shows how powerful Reprap firmware really is.

    Several times in the past I have read a request on the forum of the form "Can the Duet/RRF do X" and my impulse was to respond No, that would require a firmware change. But then I have thought of a way to do it using RRF features, in particular macros, additional axes and tool definitions. Cases in point:

    • Homing multiple axis motors using a separate endstop switch for each motor
    • Doing mirror prints on an IDEX printer
    • Extruding until an endstop switch is triggered
    • Measuring Z probe repeatability

 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.