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

Delta auto bed level (Updated PR) #1586

Merged
merged 10 commits into from
Mar 17, 2015
Merged

Delta auto bed level (Updated PR) #1586

merged 10 commits into from
Mar 17, 2015

Conversation

maverikou
Copy link
Contributor

Ported over Johann Rocholl's improvements for delta printers:

  • Nonlinear auto bed leveling code. Cleaned it up to be a delta-specific AUTO_BED_LEVELING_GRID code path.
  • Allen key z-probe deployment and retraction code. Cleaned it up and added safety checks.
  • G29, G30, M401, M402.
  • Z_RAISE_AFTER_PROBING.
  • Added new test configuration (standard Mini Kossel setup) to test new bed leveling and z-probe code paths.

- Nonlinear auto bed leveling code (includes G29, G30, Z_RAISE_AFTER_PROBING). Cleaned it up to be a delta-specific AUTO_BED_LEVELING_GRID code path.
- Allen key z-probe deployment and retraction code. Cleaned it up and added safety checks.
@thinkyhead
Copy link
Member

Looks good. I'm inclined to merge it, but I'll see if any testers are interested in trying it out first.

@thinkyhead thinkyhead mentioned this pull request Mar 9, 2015
@maverikou
Copy link
Contributor Author

Good idea.
I've only tested it on Mini Kossel with these config changes:
https://github.com/maverikou/Marlin/commit/ad50fbbc4807eebdbe6fc913aae8fd73a95aa3fc

@thinkyhead
Copy link
Member

I'm still hoping to merge this soon. There are a lot of bed leveling related items being submitted lately. If you can resolve the current merge conflicts, I will try to get this in early in the week.

Conflicts:
	Marlin/Marlin_main.cpp
@maverikou
Copy link
Contributor Author

Resolved.

@thinkyhead
Copy link
Member

Excellent. Let's get this into the Development branch and see if anything breaks. 😈

thinkyhead added a commit that referenced this pull request Mar 17, 2015
@thinkyhead thinkyhead merged commit 89fe774 into MarlinFirmware:Development Mar 17, 2015
@maverikou maverikou deleted the delta_auto_bed_level branch March 17, 2015 05:28
@alexborro
Copy link
Contributor

Please someone TEST this added feature.

Cheers.

Alex.
Em 16/03/2015 22:17, "Scott Lahteine" notifications@github.com escreveu:

Merged #1586 #1586.


Reply to this email directly or view it on GitHub
#1586 (comment).

@SkyFlyer2
Copy link

These changes apply to the issue #1589 ?

@maverikou
Copy link
Contributor Author

@SkyFlyer2 Yea it should solve #1589 - now it always raises before retracting.

@SkyFlyer2
Copy link

Ok,
I will check this.

@avluis
Copy link
Contributor

avluis commented Mar 18, 2015

Tester here - I can tell you it is not working as intended.
Here is a video that demonstrates the whole thing:
https://www.youtube.com/watch?v=BdIHuXF-Njg
First a G28, then a G29 E.
I won't do a G29 because I don't want to keep riding my micro switch on my glass...

Things to note:
The probing order is different now and the ABL routine ends on the front left instead of the front right as before.
Z_RAISE_AFTER_PROBING is raising AFTER the probe is up (I hope this is not how it was intended).
G28 still needs some love~

@alexborro @thinkyhead @maverikou @SkyFlyer2

@SkyFlyer2
Copy link

avluis
Your video shows that Issue #1589 is not solved still.

I also have checked now - it does not work as it should.

The probe must be lifted up BEFORE any retraction, but it does not happens.

@maverikou
Copy link
Contributor Author

G29 does this:

do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);

However that same code is not in G28. Is that the bug you're seeing?

@SkyFlyer2
Copy link

The probe not lift up before servo retraction. This is a bug, that I mean. In commands G28, G29, G30, M48.

@thinkyhead
Copy link
Member

@maverikou @SkyFlyer2 The new Z_RAISE_AFTER_PROBING define should be working in G29 at least, according to my reading of the code. It makes sense to do the same thing for Z homing (G28) but not using the same define. Instead we ought to add a Z_RAISE_AFTER_HOMING as a companion to the Z_RAISE_BEFORE_HOMING define.

@SkyFlyer2
Copy link

I will check it again.

May be is a good idea using only one define, e.g. Z_RAISE_BEFORE_RETRACTION. It is more simple, than two defines.

@thinkyhead
Copy link
Member

@SkyFlyer2 Retraction has other connotations, so maybe Z_RAISE_BEFORE_RETRACT_PROBE. You're right that it should apply – when a probe is used – to both G28 and G29.

@SkyFlyer2
Copy link

I checked this. Is NOT working as it should.

In g28 - no changes, servo retract and Z-axis not lift up.
In g29 - it is lift up probe AFTER servo retract, so it continue damaging servo.

I tested this just now.


"do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);" - this code must be executed before servo retraction.
I tried put it in function probe_pt(), as result after G29 command Marlin starts printing in air, not on heated bed.

I don't understand why.

@thinkyhead
Copy link
Member

@SkyFlyer2 Interesting. The code in G29 is supposed to start lifting the Z axis, wait for it to finish, then retract the probe.

do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);
st_synchronize();

This kind of code works elsewhere. The st_synchronize function should cause the code execution to stop and wait until the move is finished. If it's not waiting, that's peculiar. Perhaps you can add some code to print a message to the serial out or to the LCD in-between these lines, and see whether the code waits or not.

@SkyFlyer2
Copy link

Should I define "Z_PROBE_END_SCRIPT" ?

@maverikou
Copy link
Contributor Author

It is not working in your case because G29 calls probe_pt with act=ProbeRetract and causes a retract_z_probe() call, which in turn activates servos if SERVO_ENDSTOPS is defined.

I believe this code was getting merged at roughly the same time as Z_RAISE_AFTER_PROBING implementation and caused this high-level functionality conflict.

We could move

do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);
st_synchronize();

into probe_pt and handle act=ProbeRetract or add ProbeLiftAndRetract as a special case?

@SkyFlyer2
Copy link

"It is not working in your case because G29 calls probe_pt with act=ProbeRetract and causes a retract_z_probe() "

I send this command: G29 e V4 P3
e - says no probe retraction between points.

Who does retract after the last sample point?


"We could move... ?"

About this I'm not sure.
Perhaps we need to test these 2 variants and select the best method.

I have tried to do so (move this code into probe_pt), the probe was raised before retract. It would seem that everything is OK? No! When I start printing, the printer starts to print in the air at a height equal to the height it was raised.
Maybe I'm just wrong code added, I do not know.

@maverikou
Copy link
Contributor Author

Can't tell without seeing your code changes, but the return value (measured_z) is probably incorrect.

Did you do this?

if (retract_action & ProbeRetract)
    {
        do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_RAISE_AFTER_PROBING);
        st_synchronize();
        retract_z_probe();
    }

@SkyFlyer2
Copy link

I insert only this line: "do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS);"

whitout "st_synchronize();"

" return value (measured_z) is probably incorrect."

But without this line, I can normal start print after auto leveling procedure.

@avluis
Copy link
Contributor

avluis commented Mar 22, 2015

Looks like my issue (with G28 and G29) was fixed with maverikou's blind fix: #1507

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

Successfully merging this pull request may close these issues.

5 participants