Using the Z probe to set bed hight rather than just bed level

Either I am missing something fundamental or this is a bug of some long standing. Tried it with stock 1.12.1 and 1.11.4 and the both report different X and Y target positions for a G30 probe and the actual positions probed. The target position is correct, the actual position probed is wrong. In all cases including my version of the firmware where I have changed the Probe offset values the difference is X19 Y10.
@Edwin is there any chance you could get one of the software developers to have a look at this as there seems to be something odd going on.

Firmware 1.12.1
G30 X200 Y200
Move to X: 187.00, Y: 180.85, Z: 334.00
Fits with stock offset of X13 Y19.15
Resulting position
X:168.00 Y:170.85 Z:10.80 E:0.00 Count X:74800 Y:72340 Z:4319 B:0
M114
X:168.00 Y:170.85 Z:10.80 E:0.00 Count X:74800 Y:72340 Z:4319 B:0
G1 X168 Y170.85
Head does not move.

Firmware 1.11.4
G30 X200 Y200
Move to X: 187.00, Y: 180.85, Z: 334.00
Fits with stock offset of X13 Y19.15
Resulting position
X:168.00 Y:170.85 Z:10.80 E:0.00 Count X:74800 Y:72340 Z:4322
M114
X:168.00 Y:170.85 Z:10.80 E:0.00 Count X:74800 Y:72340 Z:4322
G1 X168 Y170.85
Head does not move.

1 Like

Does it work correctly if you use the firmware default offsets in X and Y?

Did those checks with stock firmware, no changes at all.

Thank you for you update, but I did not know which issue is yours. Could you please send me the link of the issue you reported on the GitHub?

https://github.com/Snapmaker/Snapmaker2-Controller/pulls

Edwin

First, please set up the development environment for Snapmaker2-Controller codes with Visual Studio Code and Platform IDE.

Here is the tutorial GitHub - Snapmaker/Snapmaker2-Controller: Snapmaker2-Controller is the firmware for Snapmaker 2.0 3-in-1 3D Printers.

You need to change the probe offset in line 869 to line 870 in file configuration.h.

Hi @Edwin

  1. This is the GitHub entry: Changes not reflected in firmware · Issue #111 · Snapmaker/Snapmaker2-Controller · GitHub
    There are two things that can be done:-
    a) Add a comment into the readme instructions about creating a custom firmware that you refer to above that any new firmware has to have a new version string. If the version string is the same as the existing version it will be ignored during the update process. That should be an easy and quick thing to do.
    b) When a firmware update is attempted with a version string that is the same as the existing firmware this should be reported on the console and in the log file rather than reporting success as happens today. As Brett commented this probably needs a pull request.

  2. I had already found where to update the Probe offset thanks and built a revised firmware in accordance with the instructions.
    After I did this I wanted to check that it was working correctly and noticed the unexpected behaviour explained in my post above. Thinking there may be somewhere else I had to make a change I reverted to the stock firmware 1.12.1 and found that the issue was in the stock firmware and was nothing to do with what I had done. When you probe the bed with a G30 command the bed is being probed in the wrong place, it’s X19 Y10 out. I also checked with firmware 1.11.4 and it’s the same, the wrong location is being probed.
    If I am correct this is a serious issue and could impact all bed leveling.

1 Like

Sorry for the late reply.

It is the first time that we know the probe sensor on the glasses. I will PM later after consulting our engineer.

Sorry for the inconvenience.

Edwin

OK will respond to any PM but this is nothing to do with probe on glass. I noticed it when checking changes made for my sensor but after finding it I reverted back to each of the last two stock firmware releases and the issue was there is both.

Hello Everyone and thanl you for yoir effort @stewl.

I had problems when using octoprint where the Z height I got from calibration on the machine would somehow not ttansfer over and prints from octoprint were too high, where it worked perfectly through luban.
Sometimes it worked, sometimes it didnt, so I found your macro as a possible solution.

Sadly this setup does not seem to work anymore now.
I followed your guide, my measured Z Offset was 1,65,
so I changed the macro gcode to: “G0 Z-1.65”

When running the macro it seemed the print head was a bit too high up during leveling, but I tried to print a test square anyways.

When moving next to the build plate to start the wipe command, the extruder already touched the build plate though, so the nozzle was even below it. I then turned off the printer.

I calibrated again (using the “normal” way on the touchscreen, and again had to move the print head down 1.65.mm.

I then printed through luban and everything worked fine.

Hopefully its an oversight on my side and someone can help me, even any help why the z-height is different when using octoprint would be great.

But the macro of course would be even better, to avoid manual calibration.

Thats odd, I don’t actually use my old scripts now as I I replaced the build surface with glass and converted my print head to use an IR probe. The replacement script still uses the same G1029 levelling approach though. I have just got the 10W laser so am just trying to sort that out but will check once I put the print head back on.
Have you any Z offset set on the console?
Can you post the macro that you are using.

Thank you for your quick reply.
I don’t have any Z offset set in the console.

Here is my macro: (Note the additional M140 after G1029, because I don’t want to edit the firmware just now to keep the bed from cooling down. Maybe the problem has something to do with that.)

;bed level script bed heated to 60c
;bed heat is left on as usually doing a print after this.
G21 ;set units to millimetre
G90 ;set absolute positioning
M425 X0.02 Y0.02 Z0.02 F1 S0 ; set backlash to 0.02mm
M140 S60 ; set bed temp for bed level, heat while homing
G28 ;do this now, done in G1029 but takes ages
M190 S60 ; wait for bed temp
;Auto Level
G1029 A ;start levelling
M140 S60;
G91; relative positioning for Z offset move
;*****************
G0 Z-1.65; Device specific Z offset, reduce to bring print closer to the bed ;(bigger minus number).  (equivalent to M851)
;*****************
G1029 S ;save data
G1029 D0 ;end levelling
G90; restore absolute positioning
G28; home all for safety

I have changed the bed back to print. My firmware is now the latest 1.14.2 version.

I have done a screen level and lowered the head down 3.5mm (my IR sensor senses much higher than the stock one). Stuck that value in my macro, ran it then did a small test print. All worked as expected, the test was slightly squished so i moved the leveling mesh up 0.05mm using G1029 D 0.05.
Second print was spot on.
So the macro works with the latest firm ware just as it did before. The current firmware version has also removed the line that turned off the heaters in the G1029 A routine so inserting G140 after you start levelling with G1029 A is not required.

Just out of interest I noted my mesh with M420V. I then ran your version of the macro with the heater command after the G1029 A and it was the same with only slight probe variations.

You could try something similar.
Do a touch screen level, check the mesh with M420 V, copy the first part detailing the probed point results. Put your Z lower number into the macro and do a macro level, repeat the M420 V and compare the results. You can then make sure the mesh isn’t a lot lower and avoid a bed crash. Note that the M420 report has the front left of the bed in the top left of the report so point 0,0 is the front left first probe point. The bigger the reported number the higher the nozzle is. The stock sensor also isn’t very consistent so you will get some variation.

If this is all OK, for safety put a number smaller than your measured Z offset in your macro and do another macro level. Do a small test print, if this is OK and the head is high as expected, gradually bring it down using G1029 D -x here x is a small number. Repeat until you get a good print then adjust the Z figure in your macro. Note that each G1029 D changes the mesh height by the amount after D, so each is cumulative add you will need to add all the adjustments you make together to adjust your Z number in the macro.
Sorry if you already knew most of this.

I checked if I’m on the same FW as you, which I am. Thats already strange because my bed starts to cool after G1029 A.

Did the steps as you described them, here are my results:

screen calibration:

0 +6.085 +6.241 +6.358
1 +6.283 +6.403 +6.385
2 +6.219 +6.240 +6.164

macro:

0 -0.474 -0.239 -0.199
1 -0.151 +0.001 -0.051
2 -0.317 -0.242 -0.382

0 -0.474 -0.239 -0.199
Recv: 1 -0.151 +0.001 -0.051
Recv: 2 -0.317 -0.242 -0.382

Very strange. For now I’ll just do the manual calibration, its ok to do every now and then.

Well those numbers don’t look at all right, good job you checked the M420V values as thats a bed crash avoided. Now why I don’t know, makes no sense. The macro logic is sound, all it’s doing is replicating what you do with the touch screen and works fine every time I use it. So sorry, I don’t have an explanation.

I do have one for the bed heat though. When I changed my firmware to work correctly with my modified IR sensor I downloaded the latest main branch from GitHub. It has the command to turn off heaters on a G1029 A command removed though there is no reference that I could find to that being done in the issues, indeed one that asks for that to be done is marked as required for safety and with the developer with no further comment. Checking the code for the current release, it’s still there. So hopefully it will be gone in the next release.

1 Like

Ok, at least now I know the bed heat issue will be fixed soon without the need to fiddle with the firmware myself. For the rest, I too have no idea why these numbers are completely different. For now I’ll just use conventional calibration, but your macro would have been very convenient for sure. Maybe I’ll try it again after a future firmware update, if I have some time.

Generally I’m very happy with the print quality of my machine, after I made some optimizations it got even better.

Thank you very much for the support even after such a long time!