Millkins.c doesn't seem to do anything
25 Sep 2020 14:43 - 25 Sep 2020 14:52 #183724
by Esa
Millkins.c doesn't seem to do anything was created by Esa
Hi
I'm running 2.7.15 on Debian 9 Stretch (from the precompiled .ISO) and trying to get millkins (one contributed component for xy skew correction). It was working awhile ago with my previous setup, but now I can't get it working. I'd remember it was Ubuntu 10 or 12 with Mesa 7i43, a parallel port card. I'm now running 7i93, ethernet.
Millkins.c compiles ok, starts ok, but no y movement related to x movement. I would appreciate any input to this.
I do have these lines in the .hal file
loadrt millkins
setp millkins.skew -0.000224
Kind regards, Esa
I'm running 2.7.15 on Debian 9 Stretch (from the precompiled .ISO) and trying to get millkins (one contributed component for xy skew correction). It was working awhile ago with my previous setup, but now I can't get it working. I'd remember it was Ubuntu 10 or 12 with Mesa 7i43, a parallel port card. I'm now running 7i93, ethernet.
Millkins.c compiles ok, starts ok, but no y movement related to x movement. I would appreciate any input to this.
I do have these lines in the .hal file
loadrt millkins
setp millkins.skew -0.000224
Kind regards, Esa
Last edit: 25 Sep 2020 14:52 by Esa.
Please Log in or Create an account to join the conversation.
27 Sep 2020 09:55 #183956
by Esa
Replied by Esa on topic Millkins.c doesn't seem to do anything
Got the issue solved, sort of user error.
I was probing my Y axis (table) edge and I was expecting a change in Y value related to X value. Millkins.c is written so, that X position is changed related to Y position change. As my Y was always zero, the skew correction parameter didn't affect my measurements.
I changed the code so that Y changes related to X. Works in simulated machine, so I'm now hoping to get my machine straightened also.
'Esa
I was probing my Y axis (table) edge and I was expecting a change in Y value related to X value. Millkins.c is written so, that X position is changed related to Y position change. As my Y was always zero, the skew correction parameter didn't affect my measurements.
I changed the code so that Y changes related to X. Works in simulated machine, so I'm now hoping to get my machine straightened also.
'Esa
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
03 Oct 2020 17:48 - 03 Oct 2020 17:49 #184709
by Esa
Replied by Esa on topic XY - Skew correction based on millkins.c
Hi all
I realized that as the axis is skewed, it's not enough to simply add an offset related to the other axis movement. As there is an angle between the axis, there skewed axis is always moving too little compared to the commanded motion.
In my case the angle, even is small, causes 0.03 mm error on my Y axis whole movement of 380 mm. I thought this could have been corrected by adding a distance factor to the kins.
So I changed the code as follows:
Forwards kins:
pos->tran.y = joints[1]*(*(haldata->xy_factor)) + joints[0]*(*(haldata->xy_skew));
Inverse kins:
joints[1] = pos->tran.y*(*(haldata->xy_factor)) - pos->tran.x*(*(haldata->xy_skew));
The xy_factor is calculated from the skew: 1 / cos( atan(xy_skew) * 180 / pi). In my case it's 1.00008226.
When both skew and factor is in place, "g0 y380" ends up AXIS showing 380.063, which is double of what I expect.
I'm trying to figure out how to make AXIS show 380.000 as with the command "g0 y380" would expect to show, and also why the error/correction is double from calculated.
I'd appreciate any help, as programming (or mathematics) is not my forte. I don't assume neither to be correct in my code .
Kind regards, Esa
I realized that as the axis is skewed, it's not enough to simply add an offset related to the other axis movement. As there is an angle between the axis, there skewed axis is always moving too little compared to the commanded motion.
In my case the angle, even is small, causes 0.03 mm error on my Y axis whole movement of 380 mm. I thought this could have been corrected by adding a distance factor to the kins.
So I changed the code as follows:
Forwards kins:
pos->tran.y = joints[1]*(*(haldata->xy_factor)) + joints[0]*(*(haldata->xy_skew));
Inverse kins:
joints[1] = pos->tran.y*(*(haldata->xy_factor)) - pos->tran.x*(*(haldata->xy_skew));
The xy_factor is calculated from the skew: 1 / cos( atan(xy_skew) * 180 / pi). In my case it's 1.00008226.
When both skew and factor is in place, "g0 y380" ends up AXIS showing 380.063, which is double of what I expect.
I'm trying to figure out how to make AXIS show 380.000 as with the command "g0 y380" would expect to show, and also why the error/correction is double from calculated.
I'd appreciate any help, as programming (or mathematics) is not my forte. I don't assume neither to be correct in my code .
Kind regards, Esa
Last edit: 03 Oct 2020 17:49 by Esa.
Please Log in or Create an account to join the conversation.
04 Oct 2020 11:20 #184800
by Esa
Replied by Esa on topic Millkins.c doesn't seem to do anything
It's funny how the answers usually come right after the question has been formed into a sentence .
I'm going to try to fix this by changing the INPUT_SCALE in the .INI file. Simulation and calculation shows it should be more than enough accuracy wise.
Kind regards, Esa
I'm going to try to fix this by changing the INPUT_SCALE in the .INI file. Simulation and calculation shows it should be more than enough accuracy wise.
Kind regards, Esa
The following user(s) said Thank You: Stormholt
Please Log in or Create an account to join the conversation.
Time to create page: 0.066 seconds