Skew correction/perpendicularity correction (millkins or millkins_xyz)

More
14 Sep 2023 16:33 - 14 Sep 2023 16:45 #280757 by Aciera
What version of linuxcnc are you running?

My comp will need 2.9 so if you are running lower then I'm afraid it's not going to be as helpful as I thought.
Last edit: 14 Sep 2023 16:45 by Aciera.

Please Log in or Create an account to join the conversation.

More
19 Sep 2023 14:39 #281165 by adouglas89
it's 2.8.2, still good that things are compatible with the latest and greatest, I will try to upgrade. I have not put a lot of work into this configuration yet so I should upgrade before I do in case I loose stuff.

just gotta make note of my settings on paper first just in case.

Also I think I might roll with mechanical adjustment for the next short while, it is true as others have noted that is the best way, but it is also true that last bit is quite hard to mop up on cheap machines so I will still be wanting it for that last bit, but the current parts I require do not need that tight tolerance.

I will keep working on it. But thanks for the contribution, this is something important that others are bound to need indeed it surprises me that it had not been done along time ago, I guess it was but that stuff wasn't brought along for the ride as the system was improved/changed. Fortunately the fundamental system is well enough designed that this module can be prepared by someone relatively easily like this, so at least it's here now (apparently, still gotta test on a real machine of course)

Please Log in or Create an account to join the conversation.

More
19 Sep 2023 14:49 #281166 by adouglas89
Wait a second, 2.8.4 is the latest stable release, I don't even know where I would get 2.9 and if it's not stable I can't use that for a practical machine.....

Please Log in or Create an account to join the conversation.

More
22 Sep 2023 12:21 #281367 by rodw

Wait a second, 2.8.4 is the latest stable release, I don't even know where I would get 2.9 and if it's not stable I can't use that for a practical machine.....


You coul dtry my experimental ISO 
forum.linuxcnc.org/9-installing-linuxcnc...or-linuxcnc-x86-only
Yuo can also look at the getting linuxcnc page in the 2.9 docs

Today a user advised that 2.9 is broken. Its fixed in master branch but not backported
It is possible to edit some files to get master branch if it does break for you

Please Log in or Create an account to join the conversation.

More
31 Aug 2024 16:34 #309100 by itsbrian
I know this thread is old, but it shows up at the top in Google search when you're looking for "LinuxCNC skew". I'd like to say that the millkins.c works for me in LinuxCNC 2.8.4.

Steps:
  1. Download the millkins.c file here: wiki.linuxcnc.org/cgi-bin/wiki.pl?Contri...y_XY_skew_correction
  2. In LinuxCNC open up the terminal to compile/install the file. Replace code block below to where actual millkins.c file is located.
    sudo halcompile --install /path/to/millkins.c
  3. The command above compiles and creates a millkins.so file located at /usr/lib/linuxcnc/modules
  4. You can go ahead and close the terminal and now open up your hal file. Find the line (should be at the top) "loadrt [KINS]KINEMATICS" and replace with millkins info. Replace #.### in example below with your actual skew factor.
    # Comment out the kinematics in case you want to roll back and add the two lines after installing millkins.so
    #loadrt [KINS]KINEMATICS
    loadrt millkins
    setp millkins.skew #.###
  5. That's it, but here is the big gotcha: This skew factor will not work when you are jogging! If you actually do a gcode command you should see it work.
Hope this helps for anyone searching this! This has been working great for me as I have a 4'x8' gantry and it is quite difficult to get this perfectly mechanically square. I have been squaring by offsetting the home position of my dual steppers on a single axis, but this is a nice alternative.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
04 Oct 2024 20:56 #311309 by upplib
I downloaded the file and compiled millkins.so and i see that it was installed in the /usr/lib/linuxcnc/modules.

However If i remove #loadrt [KINS]KINEMATICS and replace with
loadrt millkins
setp millkins.skew #.###
i get an error during startup and will not load.
Any ideas why? version 2.9.3

Debug file information:
Note: Using POSIX realtime
motmod: dlopen: /usr/lib/linuxcnc/modules/motmod.so: undefined symbol: kinematicsSwitch
./test.hal:13: waitpid failed /usr/bin/rtapi_app motmod
./test.hal:13: /usr/bin/rtapi_app exited without becoming ready
./test.hal:13: insmod for motmod failed, returned -1
2932
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime



/***************************HAL FILE********************/
Generated by PNCconf at Mon Sep 30 13:53:42 2024
# Using LinuxCNC version: Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again



#loadrt [KINS]KINEMATICS

loadrt millkins

setp millkins.skew 0.005


loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10" config="num_encoders=1 num_pwmgens=0 num_stepgens=5 sserial_port_0=0xxxxxxx"
setp hm2_7i96.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.s
loadrt mux4 names=jogincr

Please Log in or Create an account to join the conversation.

More
05 Oct 2024 05:49 - 05 Oct 2024 05:50 #311322 by Aciera
That kinematic file needs to be updated due to the integration of the switchable kinematic feature in 2.9:

You can try and add 'KINS_NOT_SWITCHABLE' to the kinematics file like this and recompile using 'halcompile':

KINEMATICS_TYPE kinematicsType()
{
return KINEMATICS_IDENTITY;
}

KINS_NOT_SWITCHABLE
EXPORT_SYMBOL(kinematicsType);
EXPORT_SYMBOL(kinematicsForward);
EXPORT_SYMBOL(kinematicsInverse);
MODULE_LICENSE("GPL");
Last edit: 05 Oct 2024 05:50 by Aciera.

Please Log in or Create an account to join the conversation.

More
05 Oct 2024 11:07 #311345 by upplib
Thanks ACIERA.

I get a compiler warning: data definition has no type or storage class. type defaults to INT any idea what data type i have to use?

Also I need to have both lines for in hal file otherwise it gives the same errors as before
loadrt [KINS]KINEMATICS
loadrt millkins

Please Log in or Create an account to join the conversation.

More
05 Oct 2024 11:22 #311348 by Aciera
Looks like I already ported this kinematic so maybe try the one attached to this earlier post:
forum.linuxcnc.org/49-basic-configuratio...s-xyz?start=0#280714
The following user(s) said Thank You: abdulasis12

Please Log in or Create an account to join the conversation.

More
05 Oct 2024 14:43 #311353 by upplib
I did the whole thing again and millkins now works. Thanks Aciera.
Thanks itsbrian!!

added
KINS_NOT_SWITCHABLE
to the instructions provided by itsbrian. Version 2.9.3

I was able to see the skew in halconfiguration, able to make some tweaks to skew and it looks it is running square to x-axis.

Please Log in or Create an account to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum