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

Z Raise after probing addition #1507

Closed
doomstrike opened this issue Feb 16, 2015 · 45 comments
Closed

Z Raise after probing addition #1507

doomstrike opened this issue Feb 16, 2015 · 45 comments

Comments

@doomstrike
Copy link

Currently there are these these 3 options for probing:

  #define Z_RAISE_BEFORE_HOMING 6       // (in mm) Raise Z before homing (G28) for Probe Clearance.
                                        // Be sure you have this distance over your Z_MAX_POS in case
  #define Z_RAISE_BEFORE_PROBING 10    //How much the extruder will be raised before traveling to the first probing point.
  #define Z_RAISE_BETWEEN_PROBINGS 3  //How much the extruder will be raised when traveling from between next probing points

There needs to be an option to raise Z after probing is done. I have the problem of my extruder hitting my bed clamps after probing is done when the print starts. By design my extruder leaves the bed area so that the Z-probe switch can contact the edges of the bed. Problem is the print starts at the height of the last contact causing my extruder to hit my clamps on the way to the center of the bed.

@thinkyhead
Copy link
Member

Yes, that is annoying. We'll look at that!

@thinkyhead thinkyhead added the T: Feature Request Features requested by users. label Feb 16, 2015
@galexander1
Copy link
Contributor

galexander1 commented Feb 16, 2015 via email

@Kiessar
Copy link

Kiessar commented Feb 16, 2015

Have the same problem. My extruder crashed into the clamps too. +1
An option center after probing or moving to home position would be helpful.

@thinkyhead
Copy link
Member

The feature has been added, but it seems to be misbehaving, retracting the servo immediately without waiting for the Z move to finish. We're still looking into it.

@maverikou
Copy link
Contributor

@SkyFlyer2 please test https://github.com/maverikou/Marlin/commit/a08e8f03a925b548491b48bfa4d18a6961838c67

I don't have access to a printer right now.

@SkyFlyer2
Copy link

Ok,
I can check this only in monday, because printer on my work.

@avluis
Copy link
Contributor

avluis commented Mar 22, 2015

I still need to learn how to cherry pick a commit from a different repo so I merged it all manually.
What can I say - it works as expected now.
G28 & G29 E raise the Z axis before retracting probe.
Quick video: https://www.youtube.com/watch?v=dNtTYOOITH8

@maverikou @SkyFlyer2 @thinkyhead @doomstrike @alexborro

avluis added a commit to avluis/Marlin that referenced this issue Mar 22, 2015
@maverikou
Copy link
Contributor

Cool. I'll clean it up and PR.

@maverikou
Copy link
Contributor

PR #1666 needs testing.

@SkyFlyer2
Copy link

It seem to be working. I'll check tomorrow.

Why change the order check points? This is incorrect settings or the code was changed?

Too much movement will not add exactly. Check, please.

Also, try to start printing to ensure that printer is not start print in air.

@maverikou maverikou mentioned this issue Mar 22, 2015
@SkyFlyer2
Copy link

@maverikou
@thinkyhead

I checked the changes.

The probe lift now works, as a whole is normal.

But, If I start printing, the Marlin starts print in air. Why??
With previous version firmware everything was ok (.

Also, we have a lot of new problems:

  1. Why order measurement points changed? Now the probe moves diagonally when measuring between points.

  2. The LED on the heated bed is blinks now, as a result a very long time heating.
    The voltage on the bed now is only ~10.6v - 10.9v, before it was 12.7v. At this moment TestBed temperature cannot reach 115 degrees. I'm waiting about 1/2 hour.

What was changed?

In previous versions of the firmware did not have such problems.

@thinkyhead
Copy link
Member

@SkyFlyer2 The short answer is, a lot has changed in a short time, so the current Development branch HEAD has some extant bugs. We haven't tagged any releases lately, but if we can determine the most recent point before these bugs began to appear, we could tag that date's last commit as an Alpha or beta version, and encourage people to use that while we solve these issues.

@avluis
Copy link
Contributor

avluis commented Mar 23, 2015

@SkyFlyer2
The order of measured points was in before @maverikou introduced his PR (#16660) so that would be unrelated.
I manually applied his patch as well so I may not have the latest Marlin just yet, but my pull was from March 21st towards the end of the day, so that may be a way to track down what has changed (avluis@ab1914).

avluis added a commit to avluis/Marlin that referenced this issue Mar 23, 2015
* commit 'e0a42d3f9afeea6f3e78782c8c744926fef6de77':
  Corrected Z_PROBE_ALLEN_KEY behaviour.
  Clean up Z_RAISE_AFTER_PROBING to work the same in all code paths except Z_PROBE_SLED.
  Blind fix for MarlinFirmware#1507

Resolved onflicts:
	Marlin/Marlin_main.cpp
avluis added a commit to avluis/Marlin that referenced this issue Mar 23, 2015
* feature-request: (22 commits)
  Report changes from previous PR from old code base including : I've updated the minimum values from the LCD. It has been a while that i want to at least fix this. I have an inductive probe and often i need to set my zOffset to something lower than 0.5. With the current implementation, the default LCD value is set to 0.5 for some reason. On my case i need to be able to set it down to 0.0 as my inductive probe can be lower than 0.5. Before with the LCD we couldn't change this value below 0.5. We had to flash the firmware every time which was painful. Now we are able to change this value down to 0.0 if needed. I've also changed the minimum value for Z min acceleration. In the default configuration it's set to 25 but on the LCD the minimum was 100 which is not coherent. I've changes the minimum to 10. On this axis, depending on the mechanics/motor drivers we might require very low acceleration, so i guess 10 is somehow realistic.
  fix bad insertion config again
  Fix bad insert in configuration
  Fix mangled probe_pt calls
  Corrected Z_PROBE_ALLEN_KEY behaviour.
  Clean up Z_RAISE_AFTER_PROBING to work the same in all code paths except Z_PROBE_SLED.
  Blind fix for MarlinFirmware#1507
  Removed malplaced comment.
  Fix compile error with `*_DUAL_STEPPER_DRIVERS`
  Refactor SCARA calibration. Save some lines of code and possibly ROM.
  Don't add home offsets in G29
  Fix temperature min/max test
  Added G29 command
  Fix shrinked menucode
  Added comment for the EEPROM storage
  Shortened mesh_plan_buffer_line()
  EEPROM saving of z_values. Tried to make it a little intelligent.
  Remove of mesh_plan_buffer_line parameter reference (e)
  Disable option. Enable for use/test.
  Added comment about MESH_NUM axis points.
  ...
avluis added a commit to avluis/Marlin that referenced this issue Mar 23, 2015
* Marlin_phoenix: (22 commits)
  Report changes from previous PR from old code base including : I've updated the minimum values from the LCD. It has been a while that i want to at least fix this. I have an inductive probe and often i need to set my zOffset to something lower than 0.5. With the current implementation, the default LCD value is set to 0.5 for some reason. On my case i need to be able to set it down to 0.0 as my inductive probe can be lower than 0.5. Before with the LCD we couldn't change this value below 0.5. We had to flash the firmware every time which was painful. Now we are able to change this value down to 0.0 if needed. I've also changed the minimum value for Z min acceleration. In the default configuration it's set to 25 but on the LCD the minimum was 100 which is not coherent. I've changes the minimum to 10. On this axis, depending on the mechanics/motor drivers we might require very low acceleration, so i guess 10 is somehow realistic.
  fix bad insertion config again
  Fix bad insert in configuration
  Fix mangled probe_pt calls
  Corrected Z_PROBE_ALLEN_KEY behaviour.
  Clean up Z_RAISE_AFTER_PROBING to work the same in all code paths except Z_PROBE_SLED.
  Blind fix for MarlinFirmware#1507
  Removed malplaced comment.
  Fix compile error with `*_DUAL_STEPPER_DRIVERS`
  Refactor SCARA calibration. Save some lines of code and possibly ROM.
  Don't add home offsets in G29
  Fix temperature min/max test
  Added G29 command
  Fix shrinked menucode
  Added comment for the EEPROM storage
  Shortened mesh_plan_buffer_line()
  EEPROM saving of z_values. Tried to make it a little intelligent.
  Remove of mesh_plan_buffer_line parameter reference (e)
  Disable option. Enable for use/test.
  Added comment about MESH_NUM axis points.
  ...

Resolved conflicts:
	Marlin/Configuration.h
avluis added a commit to avluis/Marlin that referenced this issue Mar 23, 2015
* Marlin_phoenix: (22 commits)
  Report changes from previous PR from old code base including : I've updated the minimum values from the LCD. It has been a while that i want to at least fix this. I have an inductive probe and often i need to set my zOffset to something lower than 0.5. With the current implementation, the default LCD value is set to 0.5 for some reason. On my case i need to be able to set it down to 0.0 as my inductive probe can be lower than 0.5. Before with the LCD we couldn't change this value below 0.5. We had to flash the firmware every time which was painful. Now we are able to change this value down to 0.0 if needed. I've also changed the minimum value for Z min acceleration. In the default configuration it's set to 25 but on the LCD the minimum was 100 which is not coherent. I've changes the minimum to 10. On this axis, depending on the mechanics/motor drivers we might require very low acceleration, so i guess 10 is somehow realistic.
  fix bad insertion config again
  Fix bad insert in configuration
  Fix mangled probe_pt calls
  Corrected Z_PROBE_ALLEN_KEY behaviour.
  Clean up Z_RAISE_AFTER_PROBING to work the same in all code paths except Z_PROBE_SLED.
  Blind fix for MarlinFirmware#1507
  Removed malplaced comment.
  Fix compile error with `*_DUAL_STEPPER_DRIVERS`
  Refactor SCARA calibration. Save some lines of code and possibly ROM.
  Don't add home offsets in G29
  Fix temperature min/max test
  Added G29 command
  Fix shrinked menucode
  Added comment for the EEPROM storage
  Shortened mesh_plan_buffer_line()
  EEPROM saving of z_values. Tried to make it a little intelligent.
  Remove of mesh_plan_buffer_line parameter reference (e)
  Disable option. Enable for use/test.
  Added comment about MESH_NUM axis points.
  ...

Resolved conflicts:
	Marlin/Configuration.h
@SkyFlyer2
Copy link

@thinkyhead

a lot has changed, a lot of bugs added.

When bed autoleveling is disabled, the servo makes retract before lift the probe.

For now, is not possible using this version Marlin.

@avluis avluis mentioned this issue Mar 24, 2015
@thinkyhead
Copy link
Member

@SkyFlyer2 Thank you for being part of the team testing the latest cutting edge code. It's good to have as much feedback as possible while trying to get these features worked out. With luck and your continued help, we should have them in full working order pretty quickly.

@avluis
Copy link
Contributor

avluis commented Mar 24, 2015

@thinkyhead @SkyFlyer2 👍

@SkyFlyer2
Copy link

@avluis

Can you check that Marlin start printing in air after bed autoleveling?

@avluis
Copy link
Contributor

avluis commented Mar 24, 2015

@SkyFlyer2 Starting a print right now, will report back.

Edit:
Print just started, I have the latests flashed on my Prusa i3v and I still have a reliable Z Offset - prints are not starting in the air for me.
Can you share your Z Offset (Slic3r configs) and your Configuration.h.

@SkyFlyer2
Copy link

@avluis

Hmm, strange. The previous Marlin with autolevel prints on test bed, with the same settings on last Marlin it start print in air.

Did you enable autoleveling with grid points? My probe z-offset is -16.31mm.

Slicer settings:
Z-offset=0
First layer=0.18
Other layers=0.24
nozzle=0.4

How I can attach the file here?

Here is slicer startup G-code:


G28 ; home all axes
M106
G29 e P3
G1 Z5 F5000 ; lift nozzle

@avluis
Copy link
Contributor

avluis commented Mar 24, 2015

@SkyFlyer2
I like to have a z offset in slic3r so this may not work for you but this is what I use (I have a dual extruder setup) - z-offset: -1.52

G-Code:
M80 ; turn on printer
M117 Homing printer
G28 ; home
G90 ; use absolute coordinates
G92 E0 ; Reset extruder distance
M117 Preheating bed
M140 S[first_layer_bed_temperature] ; Set bed temp, no wait.
M117 Leveling bed...
G29 E ; level the bed
M190 S[first_layer_bed_temperature] ; Set bed temp, wait.
G92 E0 ; reset extruder distance
M117 Now printing...

@thinkyhead
Copy link
Member

@avluis Well, actually the change I'm proposing would only affect non-allen-key-based probes. If your probe is working with all the possible probe methods, then this code probably doesn't need to be changed. I don't have a probe at all, or I would test it myself.

@maverikou
Copy link
Contributor

@thinkyhead I don't think you need to engage/retract servo based probes in the allen key code path as servo based probes are triggered directly in the probing routine.

@thinkyhead
Copy link
Member

@maverikou How is the allen key engaged/disengaged – by a special movement or a switch?

@thinkyhead
Copy link
Member

#1755 should now have z raise working before, between, and after probing. Please test and see where it may need adjustment. Also raise before homing was fixed earlier tonight.

@scotty1024
Copy link

@thinkyhead the Allen key is spring loaded with the Allen key L side up resting on a ramp mechanism. The L is moved against a belt which rotates the Allen key and the spring pushes it down the ramp deploying the Allen key as the probe with the L pushing on the micro switch. To stow the probe there is a screw mounted in an extrusion slot at a specific location. The bottom of the Allen key is pressed against the screw forcing it back up to the top of the ramp which causes the Allen key to rotate back on to the rest at the top of the ramp. Deployment energy is stored in the spring during this process.

On Mar 31, 2015, at 3:11 AM, Scott Lahteine notifications@github.com wrote:

@maverikou How is the allen key engaged/disengaged – by a special movement or a switch?


Reply to this email directly or view it on GitHub.

@SkyFlyer2
Copy link

Trying to test fixes.
After command G29 E V4 P3 it retract servo between probings. This is not correct.

If I after the command G28 slightly lowered down the extruder, this movement is not taken into account, and after the command G29 E B4 P3 Marlin tries to break the servo and a sample of the table.

@thinkyhead
Copy link
Member

@SkyFlyer2 After taking a poll, it was decided to reverse the meaning of E in G29 – for consistency with M48 and to make leaving the probe down the default behavior. So if you want the probe to remain lowered, leave out E.

I'm not sure how well it's supported to move the extruder between G28 and G29. But it should be perfectly allowable.

I'm still trying to solidify all the code that raises the Z axis, engages and disengages the probe, etc., and trying to make sure that at the end of the process, once there is a bed leveling plane, the firmware can derive the (corrected) position of the XYZ axes and continue on, having the current position and performing automatic compensation for all movement. So, for example, on a very tilted bed, after doign a leveling probe, moving Z alone will cause X and/or Y to also move to compensate.

In the probing routine I hope to get it solidly working like so…

  • Use G28 to establish the current XYZ position.
  • At the end of G28, if the probe is engaged, lift Z according to settings, then retract the probe.
  • Then, G29 starts a bed probe…
  • Before starting G29, if there is a servo probe, make sure Z is high enough before engaging.
  • At each probe point, the probe is lowered, lifted, then lowered slowly again, recording a point.
  • After probing, the Z axis is lifted based on the lift-between setting.
  • If E is included, then the probe is also retracted.
  • The carriage moves to the next point.
  • If E was included, the probe is re-deployed. (Z position assumed already high enough.)
  • And so on till all probe points are done.
  • If E was not included, disengage the probe at the end.

@SkyFlyer2
Copy link

@thinkyhead

please pay attention that the movement along the Z axis is not taken into account after executing the command G28. Before, in early commits, any such movement was taken into account

I can not imagine why movement along the Z axis cause to move the axis X and Y.
Z-axis is vertical.

Unfortunately, auto-leveling bed at the moment so inaccurate that I refused it - after manual alignment, the head is moving almost parallel to the bed. If you make auto-leveling procedure, the head in the end will not move parallel to the surface of the bed.

@thinkyhead
Copy link
Member

#1764 is the latest update to bed leveling code. Keep those helpful diagnostics coming!

@SkyFlyer2 The planner itself does the bed leveling compensation, so moving Z alone in the "abstract space" will in fact cause X or Y to change, but this would only noticeable with a very askew bed, tilted a full degree or more.

@SkyFlyer2
Copy link

@thinkyhead

Trying to understand)
Let make the bed at a slight angle of about 5 degrees. (I did this slope for the test - marlin can successfully print with auto-leveling). Next, perform the G29 command. Further, if I want to raise or lower a bit the Z axis, it will move the bed along the axes along the X/Y ? Why?
Can't understand why you need such a move. This never happened before.

@nophead
Copy link
Contributor

nophead commented Apr 1, 2015

The model is tilted to match the slope of the bed, so any move along a
single axis of the model will, in general, move all three machine axes.

For an explanation of how it is supposed to work and the correct maths, see
http://hydraraptor.blogspot.co.uk/2011/04/auto-bed-leveling.html. I don't
think any version of Marlin has got this right yet. The maths has always
had bugs.

On 1 April 2015 at 10:52, SkyFlyer2 notifications@github.com wrote:

@thinkyhead https://github.com/thinkyhead

Trying to understand)
Let make the bed at a slight angle of about 5 degrees. (I did this slope
for the test - marlin can successfully print with auto-leveling). Next,
perform the G29 command. Further, if I want to raise or lower a bit the Z
axis, it will move the bed along the axes along the X/Y ? Why?
Can't understand why you need such a move. This never happened before.

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

@boelle boelle added this to the Feature Requests Round 13 milestone Apr 1, 2015
@thinkyhead
Copy link
Member

@boelle I think the "On Hold During Bugfix" label should be removed, because this feature already exists, but should be part of the current bug-fix round.

@boelle
Copy link
Contributor

boelle commented Apr 2, 2015

but if its there should it not be marked as a bug then?

@thinkyhead
Copy link
Member

@boelle The feature was added some time after this issue was posted. This was originally a feature request, so the label has stuck, but now it's turned into one of many threads on auto bed leveling.

@thinkyhead
Copy link
Member

Maybe it makes sense to rename Z_RAISE_AFTER_PROBING to Z_RAISE_FOR_SERVO for the more general use of making clearance under the Z probe so it can deploy/stow the servo without hitting the bed. Then Z_RAISE_FOR_SERVO would apply also in-between probes when the servo is being stowed and re-deployed. Once the firmware knows how much clearance is needed for the Z probe to home, probe, deploy, and stow, it can choose which clearance value to use in each case.

For the probing values, perhaps it makes better sense to specify the Z position instead of the Z raise. Then Z_BEFORE_PROBE, Z_BETWEEN_PROBE, and Z_AFTER_PROBE will indicate the exact Z position to move to at those times. That would make the code a little smaller.

@boelle boelle modified the milestones: Feature Requests Round 4, Feature Requests Round 8_ Jun 29, 2015
@boelle
Copy link
Contributor

boelle commented Jun 29, 2015

so this should be turned in to a bug if i understand correct?

@boelle boelle added Bug: Potential ? and removed T: Feature Request Features requested by users. On Hold During Bugfix labels Jun 29, 2015
@boelle boelle modified the milestones: Bug Fixing Round 3, Feature Requests Round 4 Jun 29, 2015
@Sniffle
Copy link
Contributor

Sniffle commented Jun 29, 2015

Ill verify this, this week and let you know.
On Jun 29, 2015 5:55 AM, "Bo Herrmannsen" notifications@github.com wrote:

so this should be turned in to a bug if i understand correct?


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

@AnHardt AnHardt closed this as completed Nov 6, 2015
@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 Apr 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests