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

Probe Deploy (M401) and Stow (M402) #33

Closed
adsaxton opened this issue Apr 11, 2022 · 13 comments
Closed

Probe Deploy (M401) and Stow (M402) #33

adsaxton opened this issue Apr 11, 2022 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@adsaxton
Copy link

Description

AutoBim does not deploy ABL before probing

Steps to reproduce

When using probe such as the Allen Wrench type probe simply starting AutoBim will probe the mesh normally, deploying and stowing afterward. It will then proceed to attempt to probe the first corner without deploying the probe and fail.

Expected outcome

For it to deploy the probe, execute the process and stow when finished.

Actual outcome

As above in "Steps to reproduce"

Environment (leave empty if unknown or not relevant)

  • OctoPrint version: 1.7.3
  • Python version:
  • Marlin version: bugfix-2.0.x
  • Probe (e.g. BL-Touch, EZABL, ...): Euclid Probe
  • Printer (manufacturer/moodel, and please state any relevant modifications, like e.g. aftermarket mainboard): Ender 3 Pro
  • Browser (especially useful on UI issues): Brave Browser

For UI issues a screenshot always helps.

Feature

Add option to insert M401 before procedure and M402 after it's done.

Please note by far the quickest way to get a new feature is to file a Pull Request.

Just describe what you would like AutoBim as detailed as you can.

Question

Make sure your question is not covered by the Troubleshooting section.

Else: just fire away. But keep in mind: the more detail, the easier it is to answer 😃.

@j-be
Copy link
Owner

j-be commented Apr 11, 2022

Hi, thanks for the report. I'm not quite sure what's going on here, but I think I could easily implement a "Do this before starting" and "Do that after completeing" with custom GCode. Maybe that would also solve #31.

Btw:

AutoBim will probe the mesh normally

That should not happen. AutoBim should not probe the complete mesh. See https://github.com/j-be/AutoBim#what-is-supposed-to-happen for further detail. You might be having UBL enabled, but AutoBim failed to detect it. Be sure to double-check AutoBim's settings match your firmware configuration.

@j-be j-be added the enhancement New feature or request label Apr 11, 2022
@j-be j-be self-assigned this Apr 11, 2022
@j-be j-be closed this as completed in 9ba0095 Apr 11, 2022
@adsaxton
Copy link
Author

You might be having UBL enabled, but AutoBim failed to detect it.

I have BILINEAR enabled. Autobim has always done the initial mesh before starting. Even before with the BLTouch setup.

@adsaxton adsaxton changed the title Probe Deploy (M402) and Stow (M402) Probe Deploy (M401) and Stow (M402) Apr 11, 2022
@j-be
Copy link
Owner

j-be commented Apr 12, 2022

That is very weird. The plugin does:

  • G29 (Home)
  • Raise to Z=20
  • Clear mesh (G29 D for UBL, G29 J for Bilinear)
  • Go to first corner and do its thing

but at no point does it invoke a plain G29, i.e. "acquire mesh", as it makes no sense for the plugin to do so.

So what I think is happening here is that for some reason AutoBim detected UBL on first run and now goes for G29 D for "clear mesh". But D seems to be undefined for Bilinear (see https://marlinfw.org/docs/gcode/G029-abl-bilinear.html) so I guess the D is ignored and a plain G29 is executed, which is not optimal.

So be sure to check AutoBim's settings - i.e. Unified Bed Leveling - and make sure it is off.

image

@adsaxton
Copy link
Author

adsaxton commented Apr 12, 2022

But D seems to be undefined for Bilinear

Actually, according to that link, D is defined as Dry-Run mode. Just probe the grid but don’t update the bed leveling data. I will check that setting… Likely my mistake.

@adsaxton
Copy link
Author

So as it turns out the Unified Bed Leveling setting was the whole problem! It now Deploys and Stows. The problem is that it goes through this procedure with every probe! While watching the printer stow and deploy between each probe might be mildly entertaining when the bed is already tramed, it can be a real PIA between adjustments.

@j-be
Copy link
Owner

j-be commented Apr 13, 2022

I see, that is what I would have expected to begin with.

I just released v0.2.3 which adds support for custom GCodes before and after each run. Now I hope Marlin is smart enough to keep state, i.e. it does not stow the probe if it was manually deployed before the first G30. Would you mind testing adding a M401 before and a M402 after?

@adsaxton
Copy link
Author

adsaxton commented Apr 13, 2022 via email

@j-be
Copy link
Owner

j-be commented Apr 14, 2022

It is not so much what AutBim does - the plugin just tells Marlin G30 and waits for the response.

Malin now goes "let me deploy, probe, and stow it again". I hoped, that maybe if we tell Marlin "deploy" (i.e. M401) and then tell it G30 it would go "you told me to deploy, so I'm gonna probe and leave the probe deployed".

Could you please check if that is the case, i.e. does Marlin stow the probe after G30 even if a M401 was added to the "Before" GCode?

@adsaxton
Copy link
Author

adsaxton commented Apr 14, 2022 via email

@j-be
Copy link
Owner

j-be commented Apr 14, 2022

Damn, I still had hope...

Anyway, I'll see what I can do. I'll be on vacation next week, so not sure if I'll have any time for it. But I'll try to put together something that will work for probes like yours. I'll keep you updated 😄

@j-be j-be reopened this Apr 14, 2022
@j-be j-be closed this as completed in a534556 Apr 28, 2022
@j-be
Copy link
Owner

j-be commented Apr 28, 2022

I think I found a way to easily implement this. I pushed a preview of the feature to next branch.

@adsaxton Could you please test it?

To install, open OctoPrint's Settings and go to "Plugin Manager". There click on the "Get More" button on the top right, and under "... from URL" paste the following link https://github.com/j-be/AutoBim/archive/next.zip and click on "Install".

After that, you should have a new section in AutoBim's settings, like:

image

And don't forget to add the M401 to "Custom GCode > Before" and M402 to "Custom GCode > After".

@adsaxton
Copy link
Author

adsaxton commented Apr 28, 2022 via email

@j-be
Copy link
Owner

j-be commented Apr 29, 2022

That is excellent news 😃

I just released v0.2.4 with this feature. OctoPrint should offer the update shortly.

Happy printing 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants