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 Offset is not saved/applied correctly in printer.cfg #1758

Closed
radry opened this issue Jan 28, 2024 · 7 comments
Closed

Z Offset is not saved/applied correctly in printer.cfg #1758

radry opened this issue Jan 28, 2024 · 7 comments
Labels
not an Issue User need Support ⚡ Type: Bug Something isn't working

Comments

@radry
Copy link

radry commented Jan 28, 2024

Mainsail Version:

v2.9.1

Browser:

Firefox

Device:

Mobile device (Phone, Tablet or similar)

Operating System:

Android

What happened?

Changed the Z offset with the UI elements either before or during a print and press "save". Then after the print finished or is canceled press save config on top of the screen (as instructed) to apply the new Z offset to the printer.cfg and to restart klipper.

After the restart the new Z offset is not applied but instead reset to 0. Starting a print again confirms this as the offset is clearly wrong during the first layer.

When looking in the (new) printer.cfg it just automatically commented out "position_endstop" of the Z axis but didn't apply a new one.

What did you expect to happen instead?

Adjust position_endstop of the Z stepper in printer.cfg to the new value.

How to reproduce this bug?

  1. Change the Z offset with the UI elements either before or during a print and press "save".
  2. (After the print finished or is canceled) Press "save config" on top of the screen (as instructed) to apply the new Z offset to the printer.cfg
  3. Wait for restart
  4. Check Z offset by either starting the print again, paper method and observe that the Z Offset is wrong.
    5) Look at printer.cfg -> position_endstop was commented out but no new position_endstop or other way of offest was applied.

Additional information:

I use manual bed leveling. No Probe, just endstop.

@radry radry added the ⚡ Type: Bug Something isn't working label Jan 28, 2024
@meteyou
Copy link
Member

meteyou commented Jan 28, 2024

Thanks for your bug report, but Mainsail only send the G-Code to Kipper. The calculation and config editing happens only in Klipper. So this could only be a Klipper issue.

@meteyou meteyou closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2024
@radry
Copy link
Author

radry commented Jan 28, 2024

Are you sure it sends the correct gcode though?

@meteyou
Copy link
Member

meteyou commented Jan 28, 2024

you dont upload a log or a screenshot from your console, but i think so, because you wrote, that it comment out the original offset:

When looking in the (new) printer.cfg it just automatically commented out "position_endstop" of the Z axis but didn't apply a new one.

but i think more it is an issue with your config file itself. klipper is very strict with the SAVE_CONFIG part in the config. if you just need help, feel free to use our discord or our discussions area.

@meteyou meteyou added the not an Issue User need Support label Jan 28, 2024
Copy link
Contributor

Ahoi!

It looks like this ticket is a request for help (or similar).
Many helpful people will not see your message here and you are
unlikely to get a useful response.

We use the Github Issue-Tracker only for development related
topics, like feature requests, bug reports etc. To get help,
please join our Discord-Server or ask in Github Discussions:

This ticket will be automatically closed.

Fair wind and a following sea!
~ Your friendly MainsailGithubBot

PS: I'm just an automated script, not a real sailor.

@TMTYD
Copy link

TMTYD commented Nov 22, 2024

If you correct the z-offset during printing, it will be saved incorrectly or not at all.

If you go to + 0.005 for the z-offset, then this value is not added but subtracted. And if you go to -0.005, then this is added.

Assuming you have a Z-offset on the end stop of 4.220, if you go to +0.005, it becomes 4.215, if you go to -0.005, it becomes 4.225

In other words, it leads to confusion if you adjust the z-offset during printing.

In addition, if you have set the z-offset and you click Save Config after printing, this value is not saved in the printer.cfg.

You have to click on Save in the Z-Offset window or enter this command in the console,
Z_OFFSET_APPLY_ENDSTOP: Adjust the z endstop_position

then the Z-offset will also be saved in the Printer.cfg

Screenshot 2024-11-22 174418
Screenshot 2024-11-22 174441
Screenshot 2024-11-22 174503
Screenshot 2024-11-22 174526

@meteyou
Copy link
Member

meteyou commented Nov 22, 2024

If you go to + 0.005 for the z-offset, then this value is not added but subtracted. And if you go to -0.005, then this is added.
Assuming you have a Z-offset on the end stop of 4.220, if you go to +0.005, it becomes 4.215, if you go to -0.005, it becomes 4.225

Thats right. you dont change the "hardware offset", because you just change the "gcode offset" and if you add your "gcode offset" to the "hardware offset", it looks wrong at the first moment, but its right. A higher endstop position is a lower nozzle.

In addition, if you have set the z-offset and you click Save Config after printing, this value is not saved in the printer.cfg.
You have to click on Save in the Z-Offset window or enter this command in the console,
Z_OFFSET_APPLY_ENDSTOP: Adjust the z endstop_position
then the Z-offset will also be saved in the Printer.cfg

Thats normal, because you have to click on the "save" button in the offset panel (it just execute the Z_OFFSET_APPLY_ENDSTOP gcode, nothing more) and then you have to click on SAVE_CONFIG (or just use the button in the overlay to execute the SAVE_CONFIG command). if you just hit the SAVE_CONFIG button without clicking or typing the Z_OFFSET_APPLY_ENDSTOP command, it will not change the offset in your config. maybe you use a bed_mesh or something else, that the SAVE_CONFIG button is active, but its not the offset.

@TMTYD Mr. Yel told you the exact same things already on the Mainsail Discord. So please don't waste our time! We are doing all these things in our spare time!

@TMTYD
Copy link

TMTYD commented Nov 23, 2024

Ok thanks for the answer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not an Issue User need Support ⚡ Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants