Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR]/[BUG] PROBE_OFFSET_WIZARD should move the nozzle to the bed center #19650

Closed
qwewer0 opened this issue Oct 7, 2020 · 17 comments
Closed
Labels
T: Feature Request Features requested by users.

Comments

@qwewer0
Copy link
Contributor

qwewer0 commented Oct 7, 2020

Description

PROBE_OFFSET_WIZARD should move the nozzle to the center of the bed after it homed, but as of now, e817773 it only homes then gives the wizard options.
Using PROBE_OFFSET_WIZARD, If Z_SAFE_HOMING isn't enabled (homed with z-endstop), then after homing PROBE_OFFSET_WIZARD should move the nozzle to X_CENTER / Y_CENTER for z offset measurement, and if Z_SAFE_HOMING is enabled, then after homing PROBE_OFFSET_WIZARD should move the nozzle to the Z_SAFE_HOMING_X_POINT / Z_SAFE_HOMING_Y_POINT for z offset measurement, which is X_CENTER / Y_CENTER by default.

Feature Workflow

This is what should happen:

  1. Select Z Probe Wizard

  2. Printer Homes

  3. If Z_SAFE_HOMING ENABLED: (Homed with probe)

    1. Nozzle is at Z_SAFE_HOMING_X_POINT / Z_SAFE_HOMING_Y_POINT minus NOZZLE_TO_PROBE_OFFSET (X, Y)
    2. Nozzle moves to Z_SAFE_HOMING_X_POINT / Z_SAFE_HOMING_Y_POINT
  4. If Z_SAFE_HOMING DISABLED: (Homed with Z-Endstop)

    1. Nozzle is at X_MIN_POS and Y_MIN_POS (e.g. Ender 3, X_HOME_DIR -1, and Y_HOME_DIR -1)
    2. Nozzle moves to X_CENTER / Y_CENTER
  5. Use the Z Probe Wizard as normal

Additional Information

Configuration.zip

@qwewer0 qwewer0 added the T: Feature Request Features requested by users. label Oct 7, 2020
@thisiskeithb
Copy link
Member

thisiskeithb commented Oct 7, 2020

It will if Z_SAFE_HOMING is enabled (and the defaults are used), but I can see where this is problematic for users that home with a Z endstop and the probe/nozzle is off the bed.

@bill-orange
Copy link

@qwewer0 observation would also apply to my setups.

Is this new feature intended to to be useful with most probes or just the BL Touch?

@qwewer0
Copy link
Contributor Author

qwewer0 commented Oct 7, 2020

@thisiskeithb My idea was a two in one for the solution. For a setup that uses Z endstop to home, it obviously would need to move to the center of the bed, and for a setup that uses a probe for homing, while it is homing at the center of the bed, but that is relative to probe, but for both setups after the homing is done, the nozzle should move to the center of the bed relative to the nozzle and not the probe, in order to have the most accurate outcome.

@bill-orange I think this is for every bed leveling probe.

@thisiskeithb
Copy link
Member

Is this new feature intended to to be useful with most probes or just the BL Touch?

It works with multiple probe types. I've only tested it with a BLTouch and fix mounted probe though.

@thisiskeithb
Copy link
Member

@sjasonsmith Brought up another good point when using this feature.

It’d make sense to move the nozzle over to the probe point (based on X/Y probe offsets) for a more accurate Z probe offset, but I’m not sure how’d that factor into configs where users are homing with a Z endstop/not using Z_SAFE_HOMING.

Maybe @mwinters-stuff will have some ideas.

@qwewer0
Copy link
Contributor Author

qwewer0 commented Oct 10, 2020

It’d make sense to move the nozzle over to the probe point (based on X/Y probe offsets) for a more accurate Z probe offset, but I’m not sure how’d that factor into configs where users are homing with a Z endstop/not using Z_SAFE_HOMING.

@thisiskeithb That is exactly what this [FR]/[BUG] is opened for.
The best way to have this, is if Z_SAFE_HOMING isn't enabled, then after homing PROBE_OFFSET_WIZARD should move the nozzle to the center of the bed for z offset measurement, and if Z_SAFE_HOMING is enabled, then after homing PROBE_OFFSET_WIZARD should move the nozzle to the Z_SAFE_HOMING_X_POINT and Z_SAFE_HOMING_Y_POINT for z offset measurement, which is X_CENTER/Y_CENTER by default.

@sjasonsmith
Copy link
Contributor

@qwewer0 I'm not sure if you completely understood my concern.

When probing, the probe should be in the center of the bed.

When measuring the offset, the nozzle should be in the center of the bed.

There should be an X/Y move between the probe and measure steps, so that they are referring to the same X/Y coordinate.

@qwewer0
Copy link
Contributor Author

qwewer0 commented Oct 10, 2020

@qwewer0 I'm not sure if you completely understood my concern.

When probing, the probe should be in the center of the bed.

When measuring the offset, the nozzle should be in the center of the bed.

There should be an X/Y move between the probe and measure steps, so that they are referring to the same X/Y coordinate.

Am I not writing in english? That is exactly why I opened this issue.

Edit: Updated my previous comment to be more precise and to avoid misunderstandings. I hope it's now a bit more clear.

@qwewer0
Copy link
Contributor Author

qwewer0 commented Oct 10, 2020

If the measured point by the probe is different from the measured point for the nozzle, then we could get wrong z offset value with the wizard, if the bed isn't absolutely flat.

@mwinters-stuff
Copy link
Contributor

I have always used safe z homing, that was a default config on my printer. I have recently moved house and my printer is still packed away, I wont have time for a few weeks to look at this.

I think we would have to add an option, where the safe way is to provide an X/Y coordinate for where the nozzle should be when this feature is being used (after the homing step). This could be used even if safe-homing is turned on.

@qwewer0
Copy link
Contributor Author

qwewer0 commented Oct 11, 2020

@mwinters-stuff Z_SAFE_HOMING_X_POINT and Z_SAFE_HOMING_Y_POINT are already in marlin for probe homing (Z_SAFE_HOMING enabled), and for z-endstop homing (Z_SAFE_HOMING disabled), the safest would be to just use X_CENTER and Y_CENTER as default.

I tried the PROBE_OFFSET_WIZARD with a G0 "move to center" injected after the if (all_axes_homed()), and it worked fine.
So I think, we only need to add something like this (barbarian code) in menu_probe_offset.cpp at line 135:

    if (all_axes_homed()) {
      if ENABLED(Z_SAFE_HOMING) "Move nozzle to Z_SAFE_HOMING_X_POINT and Z_SAFE_HOMING_Y_POINT"
      else "Move nozzle to X_CENTER and Y_CENTER"

      ui.goto_screen(probe_offset_wizard_menu);
      ui.defer_status_screen();
    }

I think we would have to add an option, where the safe way is to provide an X/Y coordinate for where the nozzle should be when this feature is being used (after the homing step). This could be used even if safe-homing is turned on.

The main problem is that the homed position and the examined position for the nozzle can be at a different Z height, so if there would be an option to change the examined position for the nozzle, that would only add more problems e.g. "bug report" from users that don't understand this.
And for z-endstop homing (Z_SAFE_HOMING disabled), it would be the best to just stay consistent and have examined position for the nozzle at the center of the bed.

@alan-creater3d
Copy link

alan-creater3d commented Oct 15, 2020

my understanding would be to probe the center of the bed (x,y) to probe activation then move nozzle to same (x,ytaking x&y probe to nozzle offsets onto consideration) position and measure the offset(my custom machine homes z max, so z offset is +300mm at start of z movement in the wizard a lot of manual movement at 1mm a time)

@laurienzu
Copy link

I agree with this request: during the wizard, exactly after homing, the nozzle should move according to the probe offset in X and Y so it will be in the same position where the probe measured the distance with the bed. After this mod the feature will be perfect!

@qwewer0
Copy link
Contributor Author

qwewer0 commented Oct 17, 2020

Updated the Description, and the Feature Workflow to better reflect my idea for ideal PROBE_OFFSET_WIZARD operation.

@swissnorp
Copy link
Contributor

swissnorp commented Nov 16, 2020

In my Opinion this feature is not that flawless and I like your approach @qwewer(). I did some work on this but my code kept crashing my printer xD... I finaly gave up because I am no coder myself.

Flaws of the actual Feature

  • SET_SOFT_ENDSTOP_LOOSE(true) must be called after G28. (G28 resets it to false) [BUG]
  • The Nozzle does not move to the same position where the probing was done.
    Therefor it is not possible to use this feature without Z_SAFE_HOMING (Homing by regular Z-Endstop instead of Probe) [Weaknes]
  • In my Opinion PROBE_OFFSET_START is obsolete and NOZZLE_TO_PROBE_OFFSET.Z should be used instead.

My suggestion is as followed.. may you could pick it up for the feature request?!

CONFIGURATION

  • It should be possible to uncomment PROBE_OFFSET_START . If uncommented, NOZZLE_TO_PROBE_OFFSET.Z would be used instead!
    PROBE_OFFSET_START should also be allowed to be Zero.
  • It should be possible to define a PROBE_OFFSET_POS { X , Y } to define where the probing should be done (after probing the nozzle would move to the same position). The default values would be { X_CENTER , Y_CENTER}. This would be better for a big bed.

ACCESS

  • Of course the Feature needs a Probe. This must be checked in SanityCheck or wherever.
  • I think it's okay if the Feature is reachable by the Advanced Configuration/Settings. But other opinions are welcome.

SUGGESTED BEHAVIOR

  1. Wizard is called by Menu
  2. (Store probe.offset.z for backup and overwrite it with PROBE_OFFSET_START)
  3. Store Bed-Leveling-State and deactivate it
  4. Do G28
  5. Deactivate Software-Endstops
  6. If Probe not used for homing: probe Z at PROBE_OFFSET_POS { X , Y } : popxy_height = probe.probe_at_point()
  7. The probed height should be used value for calculation: calculated_z_offset = probe.offset.z + current_position.z + popxy_height
  8. The Nozzle moves to the Probing point PROBE_OFFSET_POS { X , Y } and the Menu for adjustment opens as it is now. Nothing needs to be changed
  9. The Done and the Cancel Action are good as they are. But after accepting with "Done" there should be a G28 Z if homing is done by probe!

Good Night and Bye , norp

@qwewer0
Copy link
Contributor Author

qwewer0 commented Nov 27, 2020

Closing, since solved.

@qwewer0 qwewer0 closed this as completed Nov 27, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: Feature Request Features requested by users.
Projects
None yet
Development

No branches or pull requests

8 participants