I am trying to use software based skew correction on my 3040 milling machine. I have tried to adjust it manually and it's just badly made and I would have to modify it by re drilling some holes etc. to get it perpendicular mechanically. Also there is usually at least a bit of extra adjustment that's hard to do mechanically, especially if all the axis need shimming etc. it really takes forever. I was hoping I could do it in software.
Worst case scenario I guess I could post process the gcode but that will lead to errors in the parts, pretty minor for my purposes, also it's best to address error sources as close as practical to the root.
This entry had me all hopeful but there are a lot of problems with it, mostly it incredibly ancient and obsolete:http://wiki.linuxcnc.org/cgi-bin/wiki.pl?ContributedComponents#millkins_trivial_kinematics_extended_by_XY_skew_correction
I spend about 6 hours digging through layer after layer of issues. comp has been replaced by halcompile, emc2-dev sounds like it was a module, linuxcnc-dev is another thing but not clear to me even now if it's a module that appends to the rest of linuxcnc or like a whole forked code base that (hopefully) shares something in common with the main user branch of linuxcnc...
I am using the .iso file from a usb drive, downloaded about 6 months ago. I think it's version 2.8.
At first I was miffed that you can't compile stuff using the iso, I thought that sort of thing was part of the open source thing, but now I see how big linuxcnc-dev is so maybe that's why...
Also very unfortunate that millkins is not included, but now I am thinking that's probably because it's not really done. It is very short, not very much code at all and skew correction is commonly needed on cheap machines so I think it would be good to include it.
Turns out millkins_xyz.c has an issue with the code where probably the guy changed the file name at the last minute before uploading it and didn't test it, after modifying millkins.c . The component names etc. in the .c file are wrong. I just changed the file name back to millkins.c before compilation and install.
So after laboriously installing linux-cnc to get halcompile, I was able to run:
sudo halcompile --install /home/anthony/Desktop/3040-1/millkins.c
Said it worked ok. I check in the folder where the hal modules are and looks good.
I modified the beginning of the 3040-1.hal file (the configuration is named 3040-1) to read:# Generated by stepconf 1.1 at Sat Aug 12 17:15:10 2023
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt [KINS]KINEMATICS
setp millkins.skew_y 0.100
setp millkins.skew_xz 0.000
setp millkins.skew_yz 0.100
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
.....
Then I modified the 3040-1.ini file to read, in the relevant section:[KINS]
JOINTS = 3
KINEMATICS = millkins
This all took many tries of course, but that's where I ended up. Sorry if the forum stuff is garbling the hard returns etc.
Now if I double click on the configuration on my desktop, it opens up ok. I can look at the hal configuration and it shows the millkins_y.skew and other variables set the way they are apparently supposed to be.
Ok. So far so good.
But when I move the axis, they all just move in a straight line. Nothing has changed. When the x axis moves the y has to move too in order to do skew correction. It's not moving. Everything is as skewed as it ever is. Ideas?
Here is the component for millkins by the way, it may only work in the exact context of the linuxcnc 2.8 from live install or something who knows but at least you don't have to go through the epic ordeal of trying to compile it:
drive.google.com/file/d/1aEv_BwgTv8Liola...dvw/view?usp=sharing