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

Where to put documentation on how to use G26 to physically level the bed? #158

Closed
ManuelMcLure opened this issue May 5, 2018 · 8 comments

Comments

@ManuelMcLure
Copy link
Contributor

ManuelMcLure commented May 5, 2018

I want to write a documentation section on how to use G26 to help physically level the bed by moving to each of the four corners and running a partial G26 (producing a 2x2 subgrid) at each corner, for example:

G26 D X0 Y0 R4 B65 H205 L0.2 O3
G26 D X220 Y0 R4 B65 H205 L0.2 O3
G26 D X220 Y220 R4 B65 H205 L0.2 O3
G26 D X0 Y220R4 B65 H205 L0.2 O3

My first thought was to add this to the UBL doc, but this really applies to any of the leveling methods that can enable G26_MESH_VALIDATION so I'm not sure where the best place to put it is. Any suggestions?

On a different note, I was thinking of possibly adding an option to G26 that would automate generating this pattern. I'm trying to figure out which letter would be the best for this option - it looks like E I M N T V W Z are still available. Do you think this would be a good addition to G26, and which letter would be the best? Unfortunately P for physical and C for corner are already used. Maybe T for tramming would work.

@Roxy-3D
Copy link
Member

Roxy-3D commented May 5, 2018

You can remove the U option (and its code) and use that for 'Unlevel Beds'.

@ManuelMcLure
Copy link
Contributor Author

You can remove the U option (and its code) and use that for 'Unlevel Beds'.

That works. Now to get my head around the G26 code and see how to implement this.

@Roxy-3D
Copy link
Member

Roxy-3D commented May 6, 2018

And if you feel like it... You can change the 'circles' to use the G2 Arc command instead of being simulated with 12 line segments... That should make the 'circles' draw smoother, and it also will cut out a bunch of code (and the sin() cos() tables).

@ManuelMcLure
Copy link
Contributor Author

I'm working on using the arc command (calling plan_arc()) and am seeing something that concerns me. It looks like plan_arc() is calling planner.buffer_line_kinematic() directly and unless I'm missing something planner.buffer_line_kinematic() does not apply any leveling unless PLANNER_LEVELING is set. PLANNER_LEVELING is defined as

#define UBL_SEGMENTED  (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA)))
#define ABL_PLANAR     (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT))
#define ABL_GRID       (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR))
#define OLDSCHOOL_ABL  (ABL_PLANAR || ABL_GRID)
...
#define PLANNER_LEVELING      (OLDSCHOOL_ABL || ENABLED(MESH_BED_LEVELING) || UBL_SEGMENTED || ENABLED(SKEW_CORRECTION))

so as far as I can tell PLANNER_LEVELING is not set if using UBL on a cartesian printer and therefore it looks like leveling is not applied to arc moves. If I'm missing something please let me know.

@Roxy-3D
Copy link
Member

Roxy-3D commented May 6, 2018

Yikes! I think you are correct. It might be we should have a #if ENABLED() for the UBL non-segmented case to send it down the correct path.

THANK YOU for finding this!

@ManuelMcLure
Copy link
Contributor Author

Do you want me to enter an issue for this? I'm somewhat leery of attempting to fix this myself since I'm just learning the code and I'm not sure exactly what the interactions are involved between different levels and at what level the fix needs to be in.

@ManuelMcLure
Copy link
Contributor Author

It looks like bezier curves have the same issue.

@Roxy-3D
Copy link
Member

Roxy-3D commented May 6, 2018

Yes, please open an issue. (But in the Marlin/Firmware area... Otherwise it might not get the attention that it needs.)

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

No branches or pull requests

3 participants