Hello
I have an old Mori Seiki MV jr retro fitted with linuxcnc, nikken 5-axis table and indramat servos.
5 axis and its kinematics has been on and off in my mind.
I would like to run linuxcnc in TCP (tool center point) mode, in linuxcnc this is I think called kinematic.
But I would like to run machine in two different modes while its running a program.
First mode would be independent axis X is X and so on, in this mode rotating rotary axis wont affect XYZ movement or position.
Second mode is TCP, in this mode tool center point and coordinate system rotates along with rotary axis.
Switching between these modes would be done with M128 and M129 commands.
This far I have got:
I can make and compile my own kinematic code.
M128 and M129 custom command controls hal pin from my kinematic module (True/false).
My idea was just to switch between two different setups in linuxcnc kinematics
pseudo code:
Code:
inverse kinematics {
hal pin TCP;
if(TCP==True){
joint 0 = cos(B)*cos(C)*X-cos(B)*sin(C)*Y+sin(B)*Z+cos(B)*Vx+sin(B)*Vz
joint 1 = sin(C) * X + cos(C) * Y + Vy;
joint 2 = -sin(B) * cos(C) * X + sin(B) * sin(C) * Y + cos(B) * Z - sin(B) * Vx + cos(B) * Vz;
joint 4 = B;
joint 5 = C;
}
else {
joint 0 = X;
joint 1 = Y;
joint 2 = Z;
joint 4 = B;
joint 5 = C;
}
}
Same goes for forward kinematic.
I been testing this switching between different kinematics with sim--> axis --> maxkins simulation setup.
results are promising , but I would need help from those that has deeper understanding of how exactly Linuxcnc kinematics works
and how this switching should be done correctly.
So comments and help please.