Q: Uneven table compensation with 2.7.11
- LinuksGuru
- Offline
- Junior Member
Less
More
- Posts: 29
- Thank you received: 2
20 Sep 2017 22:10 #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.
23 Sep 2017 10:52 #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.
03 Oct 2017 12:37 #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
- Offline
- Junior Member
Less
More
- Posts: 29
- Thank you received: 2
03 Oct 2017 18:32 #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
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.
03 Oct 2017 19:01 - 03 Oct 2017 19:02 #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
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: 03 Oct 2017 19:02 by andypugh.
The following user(s) said Thank You: LinuksGuru, LAUSCH
Please Log in or Create an account to join the conversation.
- LinuksGuru
- Offline
- Junior Member
Less
More
- Posts: 29
- Thank you received: 2
03 Oct 2017 19:33 #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
It would look a bit like this:
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.
03 Oct 2017 19:37 #99839
by andypugh
Replied by andypugh on topic Q: Uneven table compensation with 2.7.11
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)
github.com/LinuxCNC/linuxcnc/blob/master/src/rtapi/rtapi_math.h
(And halcompile can find those automatically)
The following user(s) said Thank You: LinuksGuru
Please Log in or Create an account to join the conversation.
- LinuksGuru
- Offline
- Junior Member
Less
More
- Posts: 29
- Thank you received: 2
03 Oct 2017 19:40 #99840
by LinuksGuru
OK, great, thanks, now picture is clear. pow(x, y) is there.
I'll try to setup and report back.
Replied by LinuksGuru on topic Q: Uneven table compensation with 2.7.11
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 or Create an account to join the conversation.
- amenshikov
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
12 Feb 2020 15:36 #157187
by amenshikov
Replied by amenshikov on topic Q: Uneven table compensation with 2.7.11
Hi, LinuksGuru!
What about your plan to write your ow compensation kins?
What about your plan to write your ow compensation kins?
Please Log in or Create an account to join the conversation.
- LinuksGuru
- Offline
- Junior Member
Less
More
- Posts: 29
- Thank you received: 2
08 Mar 2020 20:07 #159504
by LinuksGuru
Replied by LinuksGuru on topic Q: Uneven table compensation with 2.7.11
Hi !
I left it as is, without any mods for uneven table compensation.
I left it as is, without any mods for uneven table compensation.
Please Log in or Create an account to join the conversation.
Time to create page: 0.102 seconds