How is the Z-probe trigger value invoked

  • Can someone tell me when the the Z-probe trigger offset value is updated when changing the value in the config (i.e. "Z-3.5")?

    G31 P500 X0 Y0 Z-3.5

    Does the value update in the controller only when a probe routine is run or every time the controller is reset?

  • Hi,

    If the setting of that value appears in config.g it only is updated when the printer is powered on or reset.

    I have a macro file which configures my z probe. I invoke that macro anytime I'm about to use the z probe to be sure the z probe is using the most recent settings that I have edited in the macro.

    For example, let's say the Z=0 datum needs to be set using G30. The code would appear something like below:

    M98 P"configprobe.g" ; invoke the macro that configures the probe
    G1 X0 Y0 ; move to the desired probing location
    G30 ; probe the bed at that location and set the Z coordinate to match the probe trigger height


  • Moderator

    @code7 said in How is the Z-probe trigger value invoked:

    G31 P500 X0 Y0 Z-3.5

    A negative trigger value like that would be very unusual (3.5mm below the surface of the bed.)

  • @fcwilt Thanks for the idea to make a macro.
    @Phaedrux I'm using a negative value because a laser is being used to melt the material a few mm below the tip of the nozzle. I'm also using conductive bed calibration where the tip of the nozzle completes a circuit with the bed during calibration to set Z-heights.

    After working with this more I've proven some of my assumptions about how G31 works on a Delta printer to be false. Here is what I learned:

    1. Updating the G31 Z offset value in the config.g or sending the G31 P500 X0 Y0 Z-3.5 command through the console does not update the value.
    2. Even though sending G31 through the console will report the updated value, this new value is not actually invoked until the controller is reset and the G30 or G32 commands are run.
    3. Measuring the distance between the bed and nozzle won't confirm the correct offset distance as the nozzle probe returns to its previous height. A G0 Z0 needs to be sent first.
    4. I need to remember to send M500 to store the new offset distance.

  • Moderator

    @code7 a few clarifications for you.

    Changing the G31 from the console won't update the position by itself. A new G30 will need to be performed to update the actual position of Z0. G31 will be reset to the value in config.g after resetting the board.

    If you change G31 in config.g then yes a reset is required, and of course a G30 because the homed state is lost on reset.

    M500 by itself will not save the G31 state. To save that to config-override.g you need to use M500 P31

    You must also have M501 at the end of config.g to load config-override.g at startup.

  • @Phaedrux said in How is the Z-probe trigger value invoked:

    M500 by itself will not save the G31 state. To save that to config-override.g you need to use M500 P31

    Thanks for pointing this out to me. I didn't understand why the state wasn't saving after a reset with M500 alone as it did in previous FW versions.
    "(in older firmware versions the G31 parameters are stored even if the P31 parameter is not present)"

    This also clarifies some of the problems I was having when trying to experimentally understand my original question.

Log in to reply