- Posts: 29
- Thank you received: 2
Q: Uneven table compensation with 2.7.11
- LinuksGuru
- Topic Author
- Offline
- Junior Member
-
Less
More
9 years 1 month ago #99185
by LinuksGuru
Q: Uneven table compensation with 2.7.11 was created by LinuksGuru
Hi !
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).
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 or Create an account to join the conversation.
9 years 1 month ago #99320
by jsskangas
Replied by jsskangas on topic Q: Uneven table compensation with 2.7.11
Make your own Kinematic model that calculates Z offsets.
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.
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 or Create an account to join the conversation.
9 years 4 weeks ago #99808
by andypugh
Replied by andypugh on topic Q: Uneven table compensation with 2.7.11
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.
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.
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.
The following user(s) said Thank You: LinuksGuru, LAUSCH
Please Log in or Create an account to join the conversation.
- LinuksGuru
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 29
- Thank you received: 2
9 years 4 weeks ago #99831
by LinuksGuru
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
Replied by LinuksGuru on topic Q: Uneven table compensation with 2.7.11
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 or Create an account to join the conversation.
9 years 4 weeks ago - 9 years 4 weeks ago #99833
by andypugh
Replied by andypugh on topic Q: Uneven table compensation with 2.7.11
It would look a bit like this:
linuxcnc.org/docs/2.7/html/hal/comp.html
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;
}
linuxcnc.org/docs/2.7/html/hal/comp.html
Last edit: 9 years 4 weeks ago by andypugh.
The following user(s) said Thank You: LinuksGuru, LAUSCH
Please Log in or Create an account to join the conversation.
- LinuksGuru
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 29
- Thank you received: 2
9 years 4 weeks ago #99837
by LinuksGuru
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 ?
Replied by LinuksGuru on topic Q: Uneven table compensation with 2.7.11
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 or Create an account to join the conversation.
Time to create page: 0.063 seconds