Z level compensation

  • matti.juntunen
  • Away
  • New Member
  • New Member
More
11 Apr 2025 15:00 #326070 by matti.juntunen
Z level compensation was created by matti.juntunen
Hi all!

I have been trying to get a Z compensation thingy working for a while. 

github.com/scottalford75/LinuxCNC-3D-Pri.../master/compensation

I have gotten the script working, in the way that it is incorporated in LinuxCNC, and it reads my probe data, sorta. I have two problems with it.

First problem: It doesnt read negative coordinates in X and Y. It only understands lower left corner being zero in the gcode. Which is a problem, since my machine zero is in center of worktable, and i make all my gcode with zero in center. I have worked like that for ages, and i dont feel like changing my workflow. 

Second problem: The outputed coordinates only work from machine zero. It doesnt follow if i have a work offset active. 

Has anyone had the same problems? This is over my skill level, and i cant get it to work.

I am attaching a number of files. Compensation.py is the script i am using now. probe-results.txt has only positive coordinates and works. probe-results2.txt has both negative and positive, and does not work. Or, it works for a while if i only move in positive area, but after a while the whole compensation just dies and i have to restart LinuxCNC. Z_level_compensation.py is a file i found in another thread here, that i believe morley(?) has modified. It is based on the script i am currently using, but it looks like work offset has been fixed. I have not gotten this script to work on my system, but maybe someone can tell me how to fix my problems based on that. 


 
Attachments:

Please Log in or Create an account to join the conversation.

More
11 Apr 2025 16:15 - 11 Apr 2025 16:16 #326078 by zmrdko
Replied by zmrdko on topic Z level compensation
hello,

this topic is quite complex if you dive in it.
First of all, the mentioned github repo is intended for 3d printing, so maybe thats why it works with positive coordinates, which is usual for 3d printers.

i would recommend checking out DauntlessAq fork and PR, where he corrected some issues:
github.com/scottalford75/LinuxCNC-3D-Printing/pull/8

There is description of the issues.
 
Last edit: 11 Apr 2025 16:16 by zmrdko.

Please Log in or Create an account to join the conversation.

  • matti.juntunen
  • Away
  • New Member
  • New Member
More
11 Apr 2025 16:49 - 11 Apr 2025 17:25 #326086 by matti.juntunen
Replied by matti.juntunen on topic Z level compensation
Thanks! I will look there and see if i can get any wiser.

Edit: Look at that. Now the compensation follows work offset with those changes. Cool. Only the positive coordinates thing left then.
Last edit: 11 Apr 2025 17:25 by matti.juntunen.

Please Log in or Create an account to join the conversation.

Time to create page: 0.238 seconds
Powered by Kunena Forum