MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.33k stars 19.25k forks source link

[BUG] SKR 1.3 and ABL_BILINEAR - changes the height of the z axis. #15450

Closed komandrik closed 3 years ago

komandrik commented 5 years ago

Config.zip

At the time of writing, the latest version of Marlin 2 - bagfix is installed.

After executing the G29 command, the actual height of the Z axis changes. This leads to a poor first layer. Below is the log received in the terminal from the octoprint:

Send: G28
 X:146.00 Y:34.00 **Z:11.30** E:0.00 Count A:28800 B:17920 Z:4520
 ok
Send: M113 S2
 ok

Send: **G29**
 Bilinear Leveling Grid:
       0      1      2      3
  0 +0.095 -0.017 -0.040 +0.028
  1 +0.095 +0.018 +0.020 +0.092
  2 +0.090 +0.038 +0.065 +0.153
  3 +0.060 +0.043 +0.095 +0.207
  X:270.00 Y:129.00 **Z:11.18** E:0.00 Count A:63840 B:22560 Z:4474
 ok

Send: **G29**
 Bilinear Leveling Grid:
       0      1      2      3
  0 -0.015 -0.127 -0.150 -0.092
  1 -0.015 -0.092 -0.090 -0.017
  2 -0.020 -0.072 -0.045 +0.043
  3 -0.040 -0.058 -0.005 +0.087
 X:270.00 Y:129.00 **Z:11.29** E:0.00 Count A:63840 B:22560 Z:4518
 ok

Send: **G29**
 Bilinear Leveling Grid:
       0      1      2      3
  0 -0.023 -0.125 -0.147 -0.090
  1 -0.012 -0.100 -0.097 -0.015
  2 -0.017 -0.070 -0.043 +0.025
  3 -0.048 -0.065 -0.002 +0.090

 X:270.00 Y:129.00 **Z:11.30** E:0.00 Count A:63840 B:22560 Z:4520
ok

Offset_Z in firmware -1.3 As you can see, after the first G29 command, the Z-axis height becomes 11.18. Offset_Z is changed to 0.18. If I send the G29 command again, the offset changes to 0.01 again, I send the G29 command and get the desired Z-axis height. I have a 0.4 mm nozzle. The height of the first layer is 0.2 mm. If I do not send the G29 command twice, the first layer will be 0.18 mm higher. It will be 0.38mm and the plastic will not stick to the table. The change in the height of the Z-axis, after the G29 command, is not always the same. Sometimes the change is less than 0.1mm and then it does not affect the print.

Steps to Reproduce

  1. send the G28 command and see the height of the Z-axis
  2. send the G29 command and see the height of the Z-axis
  3. repeat the G29 command and see the height of the Z-axis

Expected behavior: [I expect to get the height of the axis Z 10mm + Offset_Z 1.3mm = 11.3mm]

Actual behavior: [I get the height of the Z-axis every time. For normal printing, I need to send the G29 command twice]

Link to configuration files and text file of terminal session octoprint: https://drive.google.com/open?id=1aWkorl8BigrBCP1FCaHMhVViqYRYAMwk https://drive.google.com/file/d/1p39olfB29Xj4qYm8yFTWILc8dkShT6dr/view?usp=sharing https://drive.google.com/file/d/1rNqWhd-X-nW-1t3UrYz2H6kVHO_5O8fa/view?usp=sharing

Link to video https://photos.app.goo.gl/ydcEcpzeSo6AgR2RA

P.S. I'm sorry, but I'm writing a translator through Google.

pfillion42 commented 5 years ago

Just tu add some weirdenestery. This is the end log of my g28. and in my config file i ask for "#define Z_AFTER_PROBING 5" not 4.85mm On the screen it's 4.85 to...

Recv: deploy: 0 Recv: >>> do_blocking_move_to X47.00 Y20.00 Z2.75 Recv: <<< do_blocking_move_to Recv: <<< homeaxis(Z) Recv: <<< home_z_safely Recv: >>> do_blocking_move_to X47.00 Y20.00 Z5.00 Recv: <<< do_blocking_move_to [...] Recv: current_position= X47.00 Y20.00 Z5.00 : sync_plan_position Recv: current_position= X46.95 Y20.00 Z4.85 : sync_plan_position Recv: X:46.95 Y:20.00 Z:4.85 E:0.00 Count X:4700 Y:2000 Z:2000 Recv: <<< G28 Recv: ok

Sorry if i bugging you, i just want to help by giving much info as possible

komandrik commented 5 years ago

@ pfillion42 your g28 is shown after g29. An amendment is made here. If you restart the printer and give g28, Z will be normal. After g29, some correction will be constantly made. So I ask that they remove this amendment.

pfillion42 commented 5 years ago

@Komandrik Thank for the explanation

pfillion42 commented 5 years ago

I found the solution to my problem of accuracy. The censor, a PNP, even if in theory it supports 5v, does not give the same quality of probe as with 12v. I've made a little homemade board for testing my théory, It send 12v in the censor from the plug of my extruder fan and I use a voltage divider to supply the Z min pin. See the difference!

Printer Output Log ``` Recv: Bilinear Leveling Grid: Recv: 0 1 2 Recv: 0 +0.035 +0.043 -0.243 Recv: 1 +0.092 +0.102 -0.197 Recv: 2 +0.145 +0.127 -0.165 Recv: [...] Recv: Bilinear Leveling Grid: Recv: 0 1 2 Recv: 0 +0.057 +0.057 -0.227 Recv: 1 +0.107 +0.107 -0.175 Recv: 2 +0.160 +0.152 -0.150 Recv: [...] Recv: Bilinear Leveling Grid: Recv: 0 1 2 Recv: 0 +0.075 +0.082 -0.203 Recv: 1 +0.125 +0.127 -0.165 Recv: 2 +0.170 +0.170 -0.130 Recv: [...] Recv: M48 Z-Probe Repeatability Test [...] Recv: Finished! Recv: Mean: 0.126750 Min: 0.122 Max: 0.132 Range: 0.010 Recv: Standard Deviation: 0.003544 Recv: [...] Recv: M48 Z-Probe Repeatability Test [...] Recv: Finished! Recv: Mean: 0.125250 Min: 0.120 Max: 0.132 Range: 0.013 Recv: Standard Deviation: 0.003783 ```

I gained x10 accuracy

Here's a Photo ![78236591_660990324429016_8938025447774486528_n](https://user-images.githubusercontent.com/33739777/69263078-9ae43800-0b92-11ea-8ee5-d529ddabc2ba.jpg)
reloxx13 commented 5 years ago

+1, bilinear leveling just fails (first layer) whatever i do. switched back to linear and bed level is fine again.

got to a point the nozzle printed 2-3 mm over the bed after alot of print restarts caused of bad first layer.

pfillion42 commented 5 years ago

I had so much trouble doing tests on this issue and trying to find a patern ...

First of all, the problem is not always present. The printer plays yoyo with me. After several starts without problem, I try to compile a sample of 10x g29 and get the differences in%, everything seems better than I dare to imagine. Im at an average accuracy of 0.37% or 0.0037mm on 10x G29. For me it's more than perfect.

I printed some pieces. I make a new designs to test and put on thingiverse and after 15 prints, Bang !!! It starts again. I can see about 0.01,2,3xx drift after 4 or 5 G29. ans i cannot print anymore (to far from bed) if i do not reset the printer.

I try somehow to reproduce the phenomen this morning and compile some data but I can not do it. the printer is still working well now after 5 complete reset and test.

In addition, trying to reproduce the problem, I discovered another bug or after multiple G28 and G29, only 1 of my 2 Z steppers will activate on a G28 and the next G28 is the other stepper which will activate. I am checking if the bug is already declared in an issue.

I'm starting to think that this is a variable memory allocation error or something that pushes a derivation but permanently once the problem starts during the G29s.

I will try to compile data as soon as the problem returns.

pfillion42 commented 5 years ago

A good one!

Printer Output Log ``` Recv: Bilinear Leveling Grid: Recv: 0 1 2 Recv: 0 +0.732 +0.980 +0.972 Recv: 1 +0.820 +1.095 +1.027 Recv: 2 +0.850 +1.085 +1.032 Recv: [...] Recv: Bilinear Leveling Grid: Recv: 0 1 2 Recv: 0 -1.783 -1.550 -1.570 Recv: 1 -1.725 -1.478 -1.518 Recv: 2 -1.707 -1.460 -1.513 Recv: [...] Recv: Bilinear Leveling Grid: Recv: 0 1 2 Recv: 0 -4.310 -4.062 -4.115 Recv: 1 -4.253 -4.023 -4.075 Recv: 2 -4.222 -4.003 -4.070 Recv: [...] Recv: Bilinear Leveling Grid: Recv: 0 1 2 Recv: 0 -6.910 -6.677 -6.682 Recv: 1 -6.855 -6.577 -6.630 Recv: 2 -6.807 -6.575 -6.628 Recv: [...] Recv: Bilinear Leveling Grid: Recv: 0 1 2 Recv: 0 -9.435 -9.185 -9.233 Recv: 1 -9.392 -9.122 -9.177 Recv: 2 -9.352 -9.108 -9.163 Recv: [...] Recv: Error:Probing Failed Changing monitoring state from "Operational" to "Error: Probing Failed" [...] Changing monitoring state from "Error: Probing Failed" to "Offline (Error: Probing Failed)" Connection closed, closing down monitor ```
thinkyhead commented 5 years ago

@komandrik — Please do the same logging of G29, but do a G28 before every G29.

It is generally recommended to always do G28 before G29. It is also recommended to save the mesh and use M420 S1 rather than G29 for regular printing. Only do G29 when you move the printer.

komandrik commented 5 years ago

@thinkyhead Thank you for paying attention to the problem. I turned on the printer and sent the G28 & G29 commands sequentially below the terminal output and the full log in the file P.S. I’m worried about not constant values of the height of the Z axis. I have a Core_XY printer, after turning off the motors, the table falls a little. Therefore, I need to constantly give the G29 command before printing.

Log_G28-G29.txt

Printer Output Log ``` Send: G28 Printer seems to support the busy protocol, will adjust timeouts and set busy interval accordingly Recv: X:146.00 Y:34.00 **Z:11.20** E:0.00 Count A:28800 B:17920 Z:7224 Recv: ok Send: M113 S2 Recv: ok Send: G29 Recv: Bilinear Leveling Grid: Recv: 0 1 2 3 Recv: 0 +0.070 -0.026 -0.073 -0.079 Recv: 1 +0.076 +0.033 +0.009 +0.006 Recv: 2 +0.104 +0.067 +0.070 +0.084 Recv: 3 +0.110 +0.107 +0.144 +0.191 Recv: Recv: X:270.00 Y:129.00 **Z:11.16** E:0.00 Count A:63840 B:22560 Z:7224 Recv: ok Send: G28 Recv: X:146.00 Y:34.00 **Z:11.26** E:0.00 Count A:28800 B:17920 Z:7224 Recv: ok Send: G29 Recv: Bilinear Leveling Grid: Recv: 0 1 2 3 Recv: 0 +0.078 -0.009 -0.056 -0.082 Recv: 1 +0.095 +0.031 +0.008 +0.014 Recv: 2 +0.112 +0.074 +0.078 +0.091 Recv: 3 +0.129 +0.115 +0.152 +0.198 Recv: Recv: X:270.00 Y:129.00 **Z:11.16** E:0.00 Count A:63840 B:22560 Z:7224 Recv: ok Send: G28 Recv: X:146.00 Y:34.00 **Z:11.24** E:0.00 Count A:28800 B:17920 Z:7224 Recv: ok Send: G29 Recv: Bilinear Leveling Grid: Recv: 0 1 2 3 Recv: 0 +0.074 -0.022 -0.068 -0.085 Recv: 1 +0.081 +0.028 +0.005 +0.002 Recv: 2 +0.099 +0.073 +0.076 +0.079 Recv: 3 +0.116 +0.104 +0.130 +0.188 Recv: Recv: X:270.00 Y:129.00 **Z:11.17** E:0.00 Count A:63840 B:22560 Z:7224 Recv: ok Send: G28 Recv: X:146.00 Y:34.00 **Z:11.25** E:0.00 Count A:28800 B:17920 Z:7224 Recv: ok Send: G29 Recv: Bilinear Leveling Grid: Recv: 0 1 2 3 Recv: 0 +0.062 -0.014 -0.060 -0.078 Recv: 1 +0.079 +0.026 +0.003 +0.009 Recv: 2 +0.096 +0.070 +0.073 +0.076 Recv: 3 +0.113 +0.099 +0.136 +0.194 Recv: Recv: X:270.00 Y:129.00 **Z:11.16** E:0.00 Count A:63840 B:22560 Z:7224 Recv: ok Here is my M48 probe test: Send: M48 Recv: M48 Z-Probe Repeatability Test Recv: Finished! Recv: Mean: 0.180000 Min: 0.174 Max: 0.186 Range: 0.012 **Recv: Standard Deviation: 0.003633** Recv: Recv: ok ```
ReneRebsdorf commented 5 years ago

I am seeing a strange outcome which may be related, @komandrik perhaps you are experiencing the same? Would you mind trying M48 V3 and post your result, notice the Z increases with each probe of M48:

Printer Output Log ``` Recv: 25 of 40: z: 1.088 mean: 0.6341 sigma: 0.270648 min: 0.183 max: 1.088 range: 0.905 [...] Recv: 26 of 40: z: 1.125 mean: 0.6530 sigma: 0.281680 min: 0.183 max: 1.125 range: 0.942 [...] Recv: 27 of 40: z: 1.163 mean: 0.6719 sigma: 0.292682 min: 0.183 max: 1.163 range: 0.979 [...] Recv: 28 of 40: z: 1.200 mean: 0.6907 sigma: 0.303659 min: 0.183 max: 1.200 range: 1.017 [...] Recv: 29 of 40: z: 1.226 mean: 0.7092 sigma: 0.313946 min: 0.183 max: 1.226 range: 1.043 ... ... ... Recv: 40 of 40: z: 1.623 mean: 0.9128 sigma: 0.429442 min: 0.183 max: 1.623 range: 1.440 Recv: Finished! Recv: Mean: 0.912812 Min: 0.183 Max: 1.623 Range: 1.440 Recv: Standard Deviation: 0.429442 ```

Strangely when the M48 is done the probe is not the extra range of Z above the bed.

komandrik commented 5 years ago

@ReneRebsdorf

Printer Output Log ``` Send: M48 V3 Recv: M48 Z-Probe Repeatability Test Recv: Positioning the probe... Recv: Bed X: 135.000 Y: 105.000 Z: 0.003 Recv: 1 of 10: z: 0.006 mean: 0.0062 sigma: 0.000000 min: 0.006 max: 0.006 range: 0.000 Recv: 2 of 10: z: 0.009 mean: 0.0078 sigma: 0.001550 min: 0.006 max: 0.009 range: 0.003 Recv: 3 of 10: z: 0.002 mean: 0.0057 sigma: 0.003186 min: 0.002 max: 0.009 range: 0.008 Recv: 4 of 10: z: 0.005 mean: 0.0054 sigma: 0.002795 min: 0.002 max: 0.009 range: 0.008 Recv: 5 of 10: z: 0.008 mean: 0.0059 sigma: 0.002667 min: 0.002 max: 0.009 range: 0.008 Recv: 6 of 10: z: 0.009 mean: 0.0065 sigma: 0.002747 min: 0.002 max: 0.009 range: 0.008 Recv: 7 of 10: z: 0.002 mean: 0.0058 sigma: 0.003069 min: 0.002 max: 0.009 range: 0.008 Recv: 8 of 10: z: 0.005 mean: 0.0056 sigma: 0.002894 min: 0.002 max: 0.009 range: 0.008 Recv: 9 of 10: z: 0.008 mean: 0.0059 sigma: 0.002810 min: 0.002 max: 0.009 range: 0.008 Recv: 10 of 10: z: 0.000 mean: 0.0053 sigma: 0.003192 min: 0.000 max: 0.009 range: 0.009 Recv: Finished! Recv: Mean: 0.005271 Min: 0.000 Max: 0.009 Range: 0.009 Recv: Standard Deviation: 0.003192 Recv: Recv: X:146.00 Y:34.00 Z:11.21 E:0.00 Count A:28800 B:17920 Z:7224 Recv: ok ```
ReneRebsdorf commented 5 years ago

Not the same problem then. Nice probe!

boelle commented 4 years ago

@komandrik since 2.0 was just released a few days ago has this changed this issue at all?

salacpavel commented 4 years ago

I hate to be a dick about it, but really I think devs should really answer this question. We gave as much information and data as we could. Do you agree?

boelle commented 4 years ago

partly agree, but devs can only answer if they have the same hardware

its 1000 faster if the user do the testing

InsanityAutomation commented 4 years ago

I've got the hardware on a bench. I also haven't had a day off from the day job aside from Thanksgiving in almost 2mo.... Annual crunch leading to the holiday shutdown in automotive.... There are quite a few on the list to get to but they take time like anything else.

komandrik commented 4 years ago

@boellethe problem with the height of the Z axis after the G29 command is present on any printer and is not dependent on electronics. I noticed this problem on Mega2560 RAMPS1.4 and on MKS Gen_L and on 32bit boards. Anyone can repeat this fault. You need to send the G29 command twice and look at the height of the Z axis after executing the G29 commands. I have the impression that this problem is not interesting for developers and they do not solve it. The problem has already been open for 2 months and no reaction. I'm tired of waiting. I switched to Klipper. In klipper there is no such problem. I am disappointed in the support of Marlin and the lack of interest from the developer in solving the problem.

boelle commented 4 years ago

I'm tired of waiting. I switched to Klipper. In klipper there is no such problem. I am disappointed in the support of Marlin and the lack of interest from the developer in solving the problem.

you are perfectly in your right to use klipper, just remember:

and yes i use G29 too and i dont have a problem with it, i can run as many G29's i like and the outcome is the same every time: perfect first layer

komandrik commented 4 years ago

@boelle do not be lazy and run M114, write down the Z axis reading. Then two more times G29 and after each test M114. And write down the height Z each time. Write the result here. P.S. I do not require developers to execute immediately! I see in the topic only your comments about the changes. Every day I monitored the status of my problem and fix in the main Marlin branch. I do not see changes. How many reviews of people who have the same problem?

shitcreek commented 4 years ago

They're spot on for me: Marlin 2.0.x - SKR 1.3 - BLTouch

Printer Output Log ``` **G28** X:178.00 Y:159.00 Z:10.45 E:0.00 Count X:14240 Y:12720 Z:4180 **G29** Bilinear Leveling Grid: measured_z = [ [ +0.218, -0.039, -0.286 ], [ +0.151, -0.022, -0.297 ] ]; X:296.00 Y:278.00 Z:10.75 E:0.00 Count X:23680 Y:22240 Z:4180 **G29** measured_z = [ [ +0.216, -0.036, -0.282 ], [ +0.154, -0.022, -0.302 ] ]; X:296.00 Y:278.00 Z:10.75 E:0.00 Count X:23680 Y:22240 Z:4180 **G29** measured_z = [ [ +0.213, -0.048, -0.289 ], [ +0.148, -0.024, -0.302 ] ]; X:296.00 Y:278.00 Z:10.75 E:0.00 Count X:23680 Y:22240 Z:4180 **G29** measured_z = [ [ +0.240, -0.030, -0.272 ], [ +0.168, -0.017, -0.292 ] ]; X:296.00 Y:278.00 Z:10.75 E:0.00 Count X:23680 Y:22240 Z:4180 ```
salacpavel commented 4 years ago

@shitcreek could yoo please do 10 G29s in a row and post results?

shitcreek commented 4 years ago
Printer Output Log ``` G28 X:178.00 Y:159.00 Z:10.45 E:0.00 Count X:14240 Y:12720 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.207, -0.030, -0.328 ], [ +0.109, -0.035, -0.378 ], [ +0.122, -0.036, -0.288 ] ]; X:296.00 Y:278.00 Z:10.74 E:0.00 Count X:23680 Y:22240 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.197, -0.030, -0.308 ], [ +0.117, -0.035, -0.387 ], [ +0.130, -0.033, -0.287 ] ]; X:296.00 Y:278.00 Z:10.74 E:0.00 Count X:23680 Y:22240 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.178, -0.033, -0.306 ], [ +0.111, -0.036, -0.387 ], [ +0.126, -0.036, -0.291 ] ]; X:296.00 Y:278.00 Z:10.74 E:0.00 Count X:23680 Y:22240 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.171, -0.039, -0.313 ], [ +0.105, -0.044, -0.394 ], [ +0.120, -0.042, -0.293 ] ]; X:296.00 Y:278.00 Z:10.74 E:0.00 Count X:23680 Y:22240 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.165, -0.044, -0.317 ], [ +0.098, -0.044, -0.395 ], [ +0.115, -0.047, -0.294 ] ]; X:296.00 Y:278.00 Z:10.74 E:0.00 Count X:23680 Y:22240 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.166, -0.047, -0.320 ], [ +0.100, -0.052, -0.392 ], [ +0.114, -0.052, -0.294 ] ]; X:296.00 Y:278.00 Z:10.74 E:0.00 Count X:23680 Y:22240 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.163, -0.054, -0.320 ], [ +0.098, -0.052, -0.396 ], [ +0.111, -0.060, -0.294 ] ]; X:296.00 Y:278.00 Z:10.74 E:0.00 Count X:23680 Y:22240 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.162, -0.057, -0.319 ], [ +0.094, -0.051, -0.395 ], [ +0.108, -0.060, -0.296 ] ]; X:296.00 Y:278.00 Z:10.74 E:0.00 Count X:23680 Y:22240 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.159, -0.062, -0.319 ], [ +0.095, -0.050, -0.396 ], [ +0.106, -0.058, -0.296 ] ]; X:296.00 Y:278.00 Z:10.75 E:0.00 Count X:23680 Y:22240 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.179, -0.038, -0.317 ], [ +0.112, -0.041, -0.387 ], [ +0.122, -0.039, -0.287 ] ]; X:296.00 Y:278.00 Z:10.75 E:0.00 Count X:23680 Y:22240 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.157, -0.061, -0.317 ], [ +0.094, -0.045, -0.398 ], [ +0.108, -0.060, -0.299 ] ]; X:296.00 Y:278.00 Z:10.75 E:0.00 Count X:23680 Y:22240 Z:4180 G29 Bilinear Leveling Grid: measured_z = [ [ +0.158, -0.066, -0.325 ], [ +0.090, -0.046, -0.396 ], [ +0.105, -0.063, -0.296 ] ]; X:296.00 Y:278.00 Z:10.75 E:0.00 Count X:23680 Y:22240 Z:4180 ```
salacpavel commented 4 years ago

Hmm looks promossing! This is with 2.0.1 or later, I assume?

shitcreek commented 4 years ago

The build was from 3 days ago.

komandrik commented 4 years ago

@shitcreek I see that you did not understand the essence of the problem. According to your data, after G28, the nozzle height with offset is 10.45mm Offset_Z = -0.45 After the G29 command, the height of the Z axis changes by 10.75mm. Offset_Z became -0.75 The height of the first layer decreases by 0.3mm I can assume that you have a problem with coating the first layer and skipping the extruder. For printing, you increase the height of the first layer to 150%

boelle commented 4 years ago

Hmm looks promossing! This is with 2.0.1 or later, I assume?

no he use bugfix 2.0.x, that is always newer than 2.0.1 as its updated daily

boelle commented 4 years ago

@komandrik btw i use bi-linear too and i get baby smooth first layers

i just adjust my Z offset until i get the first layer like i want, sometimes i have to adjust in steps of 0.05

boelle commented 4 years ago

so what i do is

G28 to home all axis print a 25x25x0.2mm cube check if Z is to high up (filament lines have gab in them or the nozzle makes track marks) then i adjust z offset i do another G29 i repeat test print again

once i have a perfect first layer i save the G29 result to eeprom and i dont do G29 again before my first layers are bad

boelle commented 4 years ago

if first layers result change from print to print then something is wrong, endstop not solid or something like that

komandrik commented 4 years ago

@boelle I have a hypercube. The table lowers and rises. The prints are even and I have no complaints about the mechanics. In the documentation for Marlin there is an instruction on how to set offset Z correctly. I did everything according to the instructions. The accuracy of the probe is 0.003mm. In print, I use different types of plastics. To do this, you need a different table temperature. My table has different curvatures at different temperatures. Therefore, I give the G29 command before each print and wait for the correct operation from the firmware. Instead, we observe for each user a change in the height of the Z axis after the G29 command. Those users whose axis height changes upwards do not feel the problem with poor adhesion of the first layer, since they, in fact, the first layer is reduced. Those users whose height changes in a smaller direction are experiencing a problem like mine. Very high first layer. This causes the part to lag behind the table during printing. If the firmware and offset Z are configured according to the instructions, then when printing the first layer with a height of 0.2 mm, we should get exactly 0.2 mm plastic layer. Not 0.1, not 0.15, not 0.3, but 0.2 mm! From your post above, I see the same problem with which you are struggling with the selection method, which means that you ignore the instructions and firmware rules. I'm tired of repeating the same thing in every answer. Maybe the Google translator does not correctly convey my thoughts and my conclusions to you. I dont know.

boelle commented 4 years ago

i dont struggle at all, its quite simple for me to understand

i did not even have to read any documentation to make it work for me

The-slunk commented 4 years ago

It looks like the issue was traced back to having RESTORE_LEVELING_AFTER_G28 enabled in the firmware. Just wondering if everyone who reported the issue here has it enabled? I'm having the same issue, and can confirm mine is enabled in latest 2.0.x. I'll try changing it after work today and see if the issue persists.

komandrik commented 4 years ago

RESTORE_LEVELING_AFTER_G28 included

boelle commented 4 years ago

mine is also enabled, no issues

The-slunk commented 4 years ago

mine is also enabled, no issues

I meant for those who are having the issue, to check if the setting is defined. Sorry for the randomness/confusion, my reply wasn't aimed towards finding the root cause so much as it was towards finding a way to alleviate the issue for the time being. Any way to narrow down the issue seems like a plus at the moment.

Edit: I've reviewed the config files from the duplicate issues, and don't see a consistent RESTORE_LEVELING_AFTER_G28 so I'm scrapping that. Only consistent thing I can find between the files is ENABLE_LEVELING_FADE_HEIGHT so I'll play with that after work. Otherwise, I'm giving up on digging through the configs and will wait for someone smarter than myself to dig through the leveling libraries.

The-slunk commented 4 years ago

So it seems like my issue slightly differs from @komandrik in that his Z position would change after the G29 command, and mine would change after every G28 command. I first started going through terminal commands to reproduce the original issue with my Firmware unchanged:

#define EXTRAPOLATE_BEYOND_GRID
#define RESTORE_LEVELING_AFTER_G28
//#define ENABLE_LEVELING_FADE_HEIGHT
Printer Output Log ``` Send: G28 Recv: X:158.00 Y:93.00 Z:5.00 E:0.00 Count X:6320 Y:3720 Z:2000 Send: G29 Recv: Bilinear Leveling Grid: Recv: 0 1 2 3 4 Recv: 0 -0.677 -0.486 -0.366 -0.359 -0.449 Recv: 1 -0.404 -0.269 -0.199 -0.193 -0.231 Recv: 2 -0.184 -0.127 -0.093 -0.092 -0.107 Recv: 3 -0.104 -0.057 -0.026 -0.031 -0.033 Recv: 4 -0.056 -0.003 +0.022 -0.005 -0.060 Recv: Recv: X:235.00 Y:185.00 Z:5.00 E:0.00 Count X:9400 Y:7400 Z:1962 Send: G29 Recv: Bilinear Leveling Grid: Recv: 0 1 2 3 4 Recv: 0 -0.693 -0.511 -0.392 -0.390 -0.471 Recv: 1 -0.435 -0.310 -0.244 -0.238 -0.270 Recv: 2 -0.211 -0.152 -0.116 -0.114 -0.126 Recv: 3 -0.124 -0.084 -0.058 -0.059 -0.055 Recv: 4 -0.064 -0.023 -0.002 -0.027 -0.072 Recv: X:235.00 Y:185.00 Z:5.00 E:0.00 Count X:9400 Y:7400 Z:1962 Send: G29 Recv: Bilinear Leveling Grid: Recv: 0 1 2 3 4 Recv: 0 -0.722 -0.546 -0.430 -0.422 -0.495 Recv: 1 -0.479 -0.352 -0.286 -0.277 -0.307 Recv: 2 -0.248 -0.187 -0.150 -0.145 -0.153 Recv: 3 -0.151 -0.111 -0.083 -0.082 -0.081 Recv: 4 -0.092 -0.047 -0.027 -0.048 -0.095 Recv: Recv: X:235.00 Y:185.00 Z:5.00 E:0.00 Count X:9400 Y:7400 Z:1959 Homed X: Recv: X:0.00 Y:185.00 Z:4.99 E:0.00 Count X:0 Y:7400 Z:1950 Homed Y: Recv: X:0.00 Y:-29.00 Z:5.85 E:0.00 Count X:0 Y:-1160 Z:1950 Homed X (again): Recv: X:0.00 Y:-29.00 Z:5.85 E:0.00 Count X:0 Y:-1160 Z:1950 Send: G28 Recv: X:158.00 Y:93.00 Z:5.17 E:0.00 Count X:6320 Y:3720 Z:2000 ```

(Z value changed after running G28 again)

Re-load Firmware (2.0.x) with the following commented:

//#define EXTRAPOLATE_BEYOND_GRID
//#define RESTORE_LEVELING_AFTER_G28
//#define ENABLE_LEVELING_FADE_HEIGHT (I believe I had this off initially anyway)

followed by an M502 and M500 command just for good measure. Then repeated steps to reproduce issue:

Printer Output Log ``` Send: G28 Recv: X:158.00 Y:93.00 Z:5.00 E:0.00 Count X:6320 Y:3720 Z:2000 Send: G29 Recv: Bilinear Leveling Grid: Recv: 0 1 2 3 4 Recv: 0 -0.637 -0.443 -0.328 -0.345 -0.461 Recv: 1 -0.364 -0.231 -0.171 -0.198 -0.257 Recv: 2 -0.136 -0.077 -0.044 -0.068 -0.108 Recv: 3 -0.043 -0.006 +0.017 -0.013 -0.041 Recv: 4 +0.012 +0.050 +0.060 +0.002 -0.072 Recv: Recv: X:235.00 Y:185.00 Z:5.00 E:0.00 Count X:9400 Y:7400 Z:1973 Send: G29 Recv: Bilinear Leveling Grid: Recv: 0 1 2 3 4 Recv: 0 -0.655 -0.471 -0.361 -0.373 -0.464 Recv: 1 -0.393 -0.268 -0.212 -0.231 -0.280 Recv: 2 -0.168 -0.107 -0.073 -0.096 -0.126 Recv: 3 -0.062 -0.026 -0.002 -0.032 -0.053 Recv: 4 -0.012 +0.031 +0.045 -0.011 -0.076 Recv: Recv: X:235.00 Y:185.00 Z:5.00 E:0.00 Count X:9400 Y:7400 Z:1973 Send: G29 Recv: Bilinear Leveling Grid: Recv: 0 1 2 3 4 Recv: 0 -0.668 -0.488 -0.383 -0.393 -0.479 Recv: 1 -0.408 -0.290 -0.237 -0.256 -0.299 Recv: 2 -0.182 -0.126 -0.097 -0.118 -0.144 Recv: 3 -0.079 -0.048 -0.032 -0.058 -0.073 Recv: 4 -0.021 +0.017 +0.025 -0.031 -0.093 Recv: Recv: X:235.00 Y:185.00 Z:5.00 E:0.00 Count X:9400 Y:7400 Z:1971 Homed X: Recv: X:0.00 Y:185.00 Z:4.91 E:0.00 Count X:0 Y:7400 Z:1964 Homed Y: Recv: X:0.00 Y:-29.00 Z:4.91 E:0.00 Count X:0 Y:-1160 Z:1964 Homed X (again): Recv: X:0.00 Y:-29.00 Z:4.91 E:0.00 Count X:0 Y:-1160 Z:1964 Send: G28 Recv: X:158.00 Y:93.00 Z:5.00 E:0.00 Count X:6320 Y:3720 Z:2000 Send: G29 Recv: Bilinear Leveling Grid: Recv: 0 1 2 3 4 Recv: 0 -0.595 -0.440 -0.340 -0.353 -0.437 Recv: 1 -0.358 -0.251 -0.198 -0.211 -0.250 Recv: 2 -0.151 -0.106 -0.078 -0.095 -0.116 Recv: 3 -0.058 -0.032 -0.012 -0.032 -0.041 Recv: 4 +0.001 +0.023 +0.029 -0.016 -0.069 Recv: Recv: X:235.00 Y:185.00 Z:5.00 E:0.00 Count X:9400 Y:7400 Z:1964 ```

So it seems like the issue I had (G28 to home, then adjust Z offset, then G28 again to see that .1mm to .3mm was added to Z pos.) is related to RESTORE_LEVELING_AFTER_G28, whereas the issue of Z pos changing after every G29 command may be related to ENABLE_LEVELING_FADE_HEIGHT since I had that disabled and did not see varying Z position even in my initial attempt to reproduce the output komandrik was seeing.

I'll try printing something now to see if I get a decent first layer and report back.

Edit: still getting adhesion problems printing from SD, but I got something going well with Octoprint. I did use a raft due to my patience running out , but FWIW the raft lines went down perfectly. Kind of a roundabout way of doing it, but I'll test more tomorrow after work.

flankerzo commented 4 years ago

i had, past tense, problem, after G29 i have Z in 5mm more than i desired, and was ,,printing,, in air. how i solve this ? reduced Z - offset in firmware to 0, and in slicer i settet it to mine -0.3mm. if i try to use anything more than -0.7 no change. I had previosly looong time ago on 1.1.9 marlin, solved with re configuring firmware too. My setup, TMC2130, sw spi, no fancy stuff, only silent mode and hybrid treshold, MKS SGEN L., induction fixed probe to Z min after re configuring in firmware (downloaded i think second week of 2020) to Z offset 0, no problems. My before print : G28, waiting for bed heated, G29, print

komandrik commented 4 years ago

@flankerzo it's called a crutch. These are not our methods. The firmware should work correctly. @ The-Force disabling #define ENABLE_LEVELING_FADE_HEIGHT will distort the print geometry.

InsanityAutomation commented 4 years ago

@flankerzo it's called a crutch. These are not our methods. The firmware should work correctly. @ The-Force disabling #define ENABLE_LEVELING_FADE_HEIGHT will distort the print geometry.

Quite the opposite actually. If the bed is tilted, that on will distort what would have been fine. If it's warped and bulged, the base is distorted regardless but it smooths it before it gets to the top.

The-slunk commented 4 years ago

@flankerzo it's called a crutch. These are not our methods. The firmware should work correctly. @ The-Force disabling #define ENABLE_LEVELING_FADE_HEIGHT will distort the print geometry.

I figured that, but that's a price I'm willing to pay in order to print at all haha. And agreed, in a perfect world it would work flawlessly but I don't have the knowledge to fix it and I hate wasting time getting upset at something I can do nothing about. Hence putting time into finding a roundabout way to make it work in the meantime. It's a free firmware after all so if I can just get it to work consistently I'll be happy. And if I can help someone else get it working that's a big plus. I'm gonna try a few more settings today after work.

kramer04 commented 4 years ago

I've similar issue with AUTO_BED_LEVELING_BILINEAR Each time I launch a print when the G29 command ends my nozzle is always above the plate by about 0.5mm So i tried this with pronterface to set z-offset

  1. Perform the origin of the printer axes via G28
  2. M851 Z0 - Initialize the offset in Z to 0 (reset to Z of the Zoffset if there was one)
  3. M500 - Store this setting in EEPROM
  4. M501 - Retrieve the parameters from the EEPROM to make them active
  5. M503 - Display the current parameters to verify that they have been taken into account
  6. G28 Z - Originating the Z axis
  7. G1 F60 Z0 - Move the nozzle to Z0
  8. M211 S0 - Deactivate the limit switches (to be able to go below 0)
  9. Slowly descend (0.01mm step) the Z axis until rubbing the sheet of paper (or the shim used)
  10. Note the displayed value of the position of the Z on the screen of the box (add this value (without taking the negative sign into account) to the thickness of the shim used)
  11. M851 Zx.xx (x.xx being the offset in Z calculated in point 10 (negative value))
  12. M211 S1 - Reactivate the limits of the limit switches
  13. M500 - Save settings in EEPROM
  14. M501 - Retrieve the parameters from the EEPROM to make them active
  15. M503 - Check one last time that everything has been taken into account

I launch a print and my first layer sticks well. But i think FW is bugged, because i must able to do same thing from LCD menu

shitcreek commented 4 years ago

@komandrik My Z homing is in the middle of the bed and so the G28 returns the coordinates for the middle:

X:178.00 Y:159.00 Z:10.45 E:0.00 Count X:14240 Y:12720 Z:4180

G29 returns the last probe point's coordinates which in my case is back right corner:

X:296.00 Y:278.00 Z:10.75 E:0.00 Count X:23680 Y:22240 Z:4180

Note the different X and Y coordinates.

If you compared all my G29 results, Z's only gone up by 0.01 - this is negligible in my case and was probably due to me fidgeting with the machine.

I print with 100% first layer and if I get the Z offset dialed in, I can expect good consistent adhesion print after print. And I am using 2.0.1 for this one, not bugfix - I normally use bugfix though.

Also, bed leveling is off on startup and thus G28 would return the unleveled Z height. If I turned on bed leveling M420 S1 before homing, I'd get the leveled Z height.

boelle commented 4 years ago

that is how i do it, RESTORE_LEVELING_AFTER_G28 enabled

then at start of every print

sismo99 commented 4 years ago

I have the same issue and i dont know how to resolve it please can you help i let here my log you can se how the grid measures increase in every g29 Example:

Printer Output Log ``` Recv: 0 1 2 Recv: 0 -0.027 -0.067 -0.130 Recv: 1 -0.027 -0.056 -0.119 Recv: 2 -0.026 -0.053 -0.140 Recv: 0 1 2 Recv: 0 +0.043 +0.018 -0.052 Recv: 1 +0.050 +0.028 -0.044 Recv: 2 +0.053 +0.013 -0.080 Recv: 0 1 2 Recv: 0 +0.150 +0.123 +0.056 Recv: 1 +0.158 +0.133 +0.065 Recv: 2 +0.158 +0.128 +0.041 ```

i am in latest bugfix (29-01-2020) with an SKR E3 Mini 1.2 Probe EZABL Standar Deviation: 0.001350

My Config Files Config Files.zip My Log 6 Bed Levels.txt

ymanyin commented 4 years ago

Hi everyone, I do have this same issue on my Prusa clone. I am running skr 1.3 with marlin 2.0. I have tried 2.0.1/2.0.2/2.0.3/bugfix-2.0.x. All of them give the same result. I need to babystep adjust the z offset at the beginning of all prints. This is quite annoying because I need to spend 10 mins waiting for the printer to run all the leveling and adjust the Z. I do have a Ender 3 Pro and it does not have this issue. It gives me the confident that I just need to press start print and leave. I do not need to worry about adjusting anything. The only difference between my Ender 3 Pro and Prusa clone is that Prusa clone is equipped with a probe as a z min endstop. I am guessing the probe is affected by heat/magnet and gives different value every time it probes. Z Home position changes every time it do a G28. Please let me know if you have any ideas. Definitely need some help. Appreciated. here is my start of gcode

g28
g29
m500
m420 s1
The-slunk commented 4 years ago

Reporting back after 2 weeks of printing with ENABLE_LEVELING_FADE_HEIGHT and RESTORE_LEVELING_AFTER_G28 both commented out. First layers have been consistently good, and actually the best I've printed with, to the point where I've not had to monitor first layer at all. To be honest this is actually the most confident I've been walking away after starting a print but YMMV. And getting no skewing of prints with ENABLE_LEVELING_FADE_HEIGHT commented either, but that may be more dependent on how warped ones bed is.

ymanyin commented 4 years ago

Reporting back after 2 weeks of printing with ENABLE_LEVELING_FADE_HEIGHT and RESTORE_LEVELING_AFTER_G28 both commented out. First layers have been consistently good, and actually the best I've printed with, to the point where I've not had to monitor first layer at all. To be honest this is actually the most confident I've been walking away after starting a print but YMMV. And getting no skewing of prints with ENABLE_LEVELING_FADE_HEIGHT commented either, but that may be more dependent on how warped ones bed is.

Thanks for the result man. I am gonna try your method but one quick question: Do you do a M420 S1 before G28 or after G29?

thinkyhead commented 4 years ago

Quite the opposite actually. If the bed is tilted…

It is still better to use fade. Bilinear interpolation will keep that Z axis moving up and down throughout the print, and that will tend to introduce artifacts. Mesh leveling is not a good way to deal with a tilted bed. For pronounced tilt you are better off with a matrix like you get from the LINEAR version of bed leveling, which will tilt the whole model. Bilinear mesh on a tilted bed will give you a trapezoidal distortion.

thinkyhead commented 4 years ago

Thanks for your reports @The-slunk. You are maybe the one individual in this thread who tried things and brought us real data to show that some things had effects. I suspect that some interaction between Z fade and certain meshes may be involved, but truly I am not certain. I'm going to take your example as inspiration and try different combinations of settings to see if I can force the issue to appear.

I do know that if you do several G29 passes on a heated bed while it is heating up, they will tend to differ by a lot, so I hope that this is not throwing some people off.

The-slunk commented 4 years ago

Reporting back after 2 weeks of printing with ENABLE_LEVELING_FADE_HEIGHT and RESTORE_LEVELING_AFTER_G28 both commented out. First layers have been consistently good, and actually the best I've printed with, to the point where I've not had to monitor first layer at all. To be honest this is actually the most confident I've been walking away after starting a print but YMMV. And getting no skewing of prints with ENABLE_LEVELING_FADE_HEIGHT commented either, but that may be more dependent on how warped ones bed is.

Thanks for the result man. I am gonna try your method but one quick question: Do you do a M420 S1 before G28 or after G29?

I do not, I use bilinear and assumed it was enabled when G29 runs. I use it it my start G-code per print.

And @thinkyhead I believe this issue was in the actual z-offset changing after G28/G29 commands, which would of course change the mesh points as well.

EDIT: I always waited for my bed to heat up fully between the G28/G29 commands while testing, if that helps