How to add user kinematics for 5 axis bridge mill?

More
14 Aug 2024 11:01 #307708 by winyk
Hello, I am a beginner trying to learn LinuxCNC. Recently, I have asked a question about custom kinematics here . With helps from Aciera, I managed to make my first (and very simple) custom kinematics model. Now, want to learn about a more complicated feature in LinuxCNC: the switchable kinematics. So, I started this new topic hoping that someone will me get started with this. I would like to point here that not only that I am new to LinuxCNC, but I am also new to CNC as well, so please bear with me if I ask dumb questions. 

Right now, I want to implement a user kinematics model for the 5axis.ini (located at /linuxcnc-2.9.1/configs/sim/axis/vismach/5axis/bridgemill
/). What I understand from the doc page on switchable kinematics  is that for any configuration, there can be up to 3 kinematics model, where type 0, 1, and 2 typically correspond to default, identity, and user-defined kinematics, respectively. Also, what I learn from the doc is that I can switch between kinematics models using these funny M codes: M428, M429, and M430.
 
I have found 5axis.ini to be a good place to experiment with because the configuration already comes with the three remapped M codes (I have no idea how to add them myself.) I have also played with the configuration a bit in AXIS, switching between default and kinematics type. From what I observed, type 0 is TCP kinematics, type 1 is the identity kinematics, and type 2 is also identity (Presumably it is not yet defined.) The problem is I don't know where the user kinematics definition is located for 5axis.ini. Peaking into the configuration file only lead me to 5axiskins.c, which I believe does not contain any information about the user kinematics.

From the User kinematics provisions section in the doc, it seems that I have to copy src/emc/kinematics/userkfuncs.c to some directory and use it as a template for my user kinematics, however, I am not sure how to do that. Can anybody give me a step-by-step walkthrough on how can I achieve this? Thank you very much.

 
Attachments:

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

More
14 Aug 2024 11:27 - 14 Aug 2024 12:17 #307709 by Aciera
Bridgemill is a somewhat dated example and does not use the 'userkins.comp' template.
For a recent example of tool side rotation kinematic and a more powerful tool-kinematic model see:
github.com/Sigma1912/LinuxCNC_Demo_Confi...ndle-rotary-nutating

To test copy the linked folder into your 'configs' folder and follow the instructions in the 'README' files.

There is also full documentation in html format as well as the Jupyther notebook files on how to derive the two kinematics included.

[edit]
The above examples use 3 kinematic models:
1. Trivial
2. ToolCenterPoint
3. ToolCoordinate

Note that if you set the 'nutation' angle to 90° you have the same kinematics as in the 'bridgemill' sim config.

The above also includes an implementation of the TiltedWorkPlane feature (ie Gcodes G68.x and related) as a python remap.
Last edit: 14 Aug 2024 12:17 by Aciera.

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

Time to create page: 0.110 seconds
Powered by Kunena Forum