- Posts: 29
- Thank you received: 0
Q: Uneven table compensation with 2.7.11
- LinuksGuru
- Topic Author
- Offline
- Junior Member
-
I run into problem with uneven table compensation (or minuscule X / Y cemented shaft bending under weight of the portal).
After googling, found that I should use either probekins or trivkins.
Mach3 has formula setup for this purpose, however, it didn't work correctly and produced bizarre unusable results.
A ready to use receipt (in Russian) with probekins described here:
www.cnc-club.ru/forum/viewtopic.php?f=15&t=1909&start=20
However, this receipt is dated back to 2012, and additionally, this download link is now dead.
git.mah.priv.at/gitweb/emc2-dev.git/shor...refs/heads/probekins
Probekins seem to use STL file generated from matrix to get offset, which is not very optimal (and as someone stated, not always work correctly).
I have quite complex polynomial formulas which calculate Z height adjustments over given X and Y points.
Formulas are 100% OK for sure because they show correct results in Excel / LibreOffice Calc.
Anyone can suggest how to properly implement such feature in LinuxCNC 2.7.11 for simple 3D milling router ?
I would prefer some kind of callback and use my Z=f(X) and Z = f(Y) polynomial formulas instead of awkward STL.
Thanks in advance for any suggestion(s).
Please Log in to join the conversation.
you can write it as .c file and use math you like in there to calculate offsets.
I run multi point linear interpolation to correct rotary axis non-linearity.
Deviation is really small ... but leads further from rotating center to 0.2mm error.
Same principle could be used to correct thermal expansion and ball screw lead deviations.
Use some ready kinematic file for basis and write you own corrections there.
Install it with :
sudo halcompile -- install kinematisfilename.c
at the HAL setup just call your own kinematis and that basically it.
Please Log in to join the conversation.
An alternative, for small offsets, would be a simple HAL component that has inputs for X Y and Z and outputs an offset value for Z.
You could also consider using the external-offsets feature branch. But that might not get updates indefinitely, though my hope would be that it makes it into the main branch.
Please Log in to join the conversation.
- LinuksGuru
- Topic Author
- Offline
- Junior Member
-
- Posts: 29
- Thank you received: 0
andypugh wrote: kinematics is certainly one way.
An alternative, for small offsets, would be a simple HAL component that has inputs for X Y and Z and outputs an offset value for Z.
OK, thanks a lot, this is what I'm looking for. Do you have any examples of such HAL component ?
Unfortunately, I can't get enough info from online docs n order to properly construct compensation function z=f(x,y).
linuxcnc.org/docs/html/hal/tutorial.html
Please Log in to join the conversation.
linuxcnc.org/docs/2.7/html/hal/comp.html
Please Log in to join the conversation.
- LinuksGuru
- Topic Author
- Offline
- Junior Member
-
- Posts: 29
- Thank you received: 0
andypugh wrote: It would look a bit like this:
Code:component wobbly_table; pin in float x-in; pin in float y-in; pin in float z-in; pin out float z-out; function _; ;; FUNCTION(_){ zout = z_in + 0.1 * x_in + 0.2 * y_in + 0.01 * x_in * y_in; }
Am I correctly understood that this HAL module will be interpreted into C code and compiled by halcompile?
Does it mean its possible to use all standard C functions like pow(x, y) ?
#include <math.h> still necessary ?
Please Log in to join the conversation.
github.com/LinuxCNC/linuxcnc/blob/master/src/rtapi/rtapi_math.h
(And halcompile can find those automatically)
Please Log in to join the conversation.
- LinuksGuru
- Topic Author
- Offline
- Junior Member
-
- Posts: 29
- Thank you received: 0
andypugh wrote: You only get to use functions included in rtapi_math.h
github.com/LinuxCNC/linuxcnc/blob/master/src/rtapi/rtapi_math.h
(And halcompile can find those automatically)
OK, great, thanks, now picture is clear. pow(x, y) is there.
I'll try to setup and report back.
Please Log in to join the conversation.
- amenshikov
- Offline
- New Member
-
- Posts: 1
- Thank you received: 0
What about your plan to write your ow compensation kins?
Please Log in to join the conversation.
- LinuksGuru
- Topic Author
- Offline
- Junior Member
-
- Posts: 29
- Thank you received: 0
I left it as is, without any mods for uneven table compensation.
Please Log in to join the conversation.
