Please Help - How to Configure a 5 Axis Head-Head
The math is in the '5axiskins.c' I linked above.It is my understanding that it takes a lot of math to get a machine like this running.
So the roadmap is to create a working trivial XYZABC mill and then add the specific kinematic after.
Please Log in or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
- Posts: 115
- Thank you received: 19
So just to be clear, 5axiskins is designed for a head-head, BC, 5 axis machine? I assume with the assumption that both axis intersect? So I can just plop this in as my kinematic model in my ini, set up the switchkins in the GUI, and I should be good to go?
Please Log in or Create an account to join the conversation.
Vismach is just the virtual graphical representation of the machine and as such not really needed to run a physical machine. For the virtual simulation to make any sense the vismach model has to fit the kinematic model. So changing one usually requires changing the other as well.
[edit]
Note that the name '5axiskins' may imply that it is somehow generic for any 5axis machine but that is not the case. A better name would be 'XYZBC-srt' for spindle rotary tilting.
Please Log in or Create an account to join the conversation.
forum.linuxcnc.org/media/kunena/attachme...5-axis-machines2.pdf
In contrast the model in '5axiskins.c' uses the 'posemath' library which is powerful but scantly documented.
Please Log in or Create an account to join the conversation.
- IronManDylan
- Offline
- Premium Member
- Posts: 115
- Thank you received: 19
My machine has intersecting head axis' at 90 degrees. It was designed as an AB machine, but I have flipped around the linear axis so that I can use it as a BC machine to work with 5axiskins. This isn't ideal with the way gcode posts z retracts at the end of an op (my original z is now my x, and what should be y is now the z) but it will work.
Posemath, interesting. It should be trivial to switch the 5axiskins from BC to AB, as it should literally just be changing the names of axis around (the reverse of what I did to make my machine work with 5axiskins). Buttt.. IDK how to do that. Have any ideas? If it is easy enough I may take a stab at it.
Okay, so I am in the process of making my .ini and .hal file right now and I have a question. I started with a base from pncconf and then have been editing it from there. Tommy, you're right its not too terrible. But, 5axiskins has a w axis, I don't know how to "wire" that in HAL. For example I have the line of code
setp hm2_7i96s.0.stepgen.01.dirsetup [JOINT_2]DIRSETUP
.01. is the pin for my z axis. But, there isn't a pin for the W axis because its like a virtual retract along the vector of the tool, so it doesn't have a motor or any physical hardware. So what should I put for these lines of code? Should I just delete the lines of code with the above form that are for the W axis or? I don't necessarily need the W axis, but I'm sure it would be useful from time to time. And pncconf is of no help here since it only sets up a 4 axis machine at most.
Please Log in or Create an account to join the conversation.
I'm not familiar with posemath but I will have a look. Changing 5axiskins.c may require building LinuxCNC from source though to recompile the file, so it may just be easier to build your own kinematic using the method I mentioned earlier using transformation matrices.It should be trivial to switch the 5axiskins from BC to AB
This would also give you a kinematic that offers the ability to compensate for geometrical offsets/misalignments in the rotary assembly.
[edit]
I can't tell from looking at the picture of your machine setup but the rotational axis of the tool must intersect the B-axis (ie there is no offset along the rotary A axis) otherwise '5axiskins' will not work at all.
Note that even if you have designed the machine to not have the spindle offset from the b-rotary there are inevitably going to be inaccuracies from the machining process which will be magnified depending on the a-axis position.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19188
- Thank you received: 6432
Stepgen.0 = joint.0
Stepgen.1 = joint.1
Makes editing much easier.
If you already have 5 axis set in hal and ini, changing from say C to W is easy, just ini file in Display, Traj, and AXIS W.
If you need to add another axis/joint, copy an existing one in hal and ini, add it to Display, Traj sections and paste and edit axis letter, joint number and stepgen number and joint number in hal.
Please Log in or Create an account to join the conversation.
I'm not sure this is correct for a 5 axis machine with custom kinematics. Aceria will know.Try to keep things simple
Stepgen.0 = joint.0
Stepgen.1 = joint.1
Makes editing much easier.
If you already have 5 axis set in hal and ini, changing from say C to W is easy, just ini file in Display, Traj, and AXIS W.
If you need to add another axis/joint, copy an existing one in hal and ini, add it to Display, Traj sections and paste and edit axis letter, joint number and stepgen number and joint number in hal.
Please Log in or Create an account to join the conversation.
Extract the compressed folder into the '~/linuxcnc/configs/' folder.
Then open a terminal to install the kinematic file:
$ sudo halcompile --install ~/linuxcnc/configs/spindle-rotary-tilting/xyzab_srt.comp
You should get an output like this:
Linking xyzab_srt.so
cp xyzab_srt.so /home/user/linuxcnc-dev-march/rtlib/
If that went ok you can start the simulation config from the terminal:
$ linuxcnc ~/linuxcnc/configs/spindle-rotary-tilting/xyzab-srt.ini
Once the config is running:
- Activate the machine
- Home the machine
- Run the preloaded demo gcode
Attachments:
Please Log in or Create an account to join the conversation.
Note that the offsets and pivot lengths can be adjusted using the sliders in the right hand panel of the GUI and are graphically indicated in the vismach model.
Also there is no virtual W axis in this kinematic instead it uses a dedicated Tool kinematic model.
Please Log in or Create an account to join the conversation.