Please Help - How to Configure a 5 Axis Head-Head

More
29 Jul 2023 18:01 - 29 Jul 2023 18:06 #276532 by Aciera
I would recommend using 'pncconf' to create a working new config for your 7i96S_7i85 boards. Then make sure you have all the motors and inputs (eg. estop, limit switches) working before you start worrying about kinematics. And yes all you need is to edit the [kins] section and the relevant hal files as you have it in the simulation config to get the same tcp functionality.

It is my understanding that it takes a lot of math to get a machine like this running. 
 

The math is in the '5axiskins.c' I linked above.

So the roadmap is to create a working trivial XYZABC mill and then add the specific kinematic after.
Last edit: 29 Jul 2023 18:06 by Aciera.
The following user(s) said Thank You: IronManDylan

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

More
29 Jul 2023 19:59 #276535 by IronManDylan
Interesting, I must have misunderstood what was being said on this forum then.  I was under the impression that I needed to modify bridgemill vismach configuration.  But adding 5axiskins to a .ini file seems a lot easier. 

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.

More
30 Jul 2023 06:19 - 30 Jul 2023 07:33 #276548 by Aciera
Yes, '5axiskins' is made for the head-head machine you see in the 'bridgemill' simulation config and as far as I can tell B and C in the 'bridgemill' must intersect (and must be oriented at 90°). I can't say for sure whether the '5axiskins' kinematic actually fits with your particular machine because I don't have a clear understanding of what rotates where in your design.
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.
Last edit: 30 Jul 2023 07:33 by Aciera.
The following user(s) said Thank You: IronManDylan

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

More
30 Jul 2023 07:51 #276551 by Aciera
Actually, there is a document that describes how to derive the kinematic model for an XYZBC-SRT machine using transformation matrices here. (see chapter 6)
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.
The following user(s) said Thank You: IronManDylan

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

More
31 Jul 2023 06:29 #276609 by IronManDylan
Aciera
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.

More
31 Jul 2023 08:08 - 31 Jul 2023 09:33 #276610 by Aciera
Can you post your current ini and hal files so we have something concrete to work with?

It should be trivial to switch the 5axiskins from BC to AB

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.
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.
Last edit: 31 Jul 2023 09:33 by Aciera.
The following user(s) said Thank You: IronManDylan

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

More
31 Jul 2023 11:35 #276618 by tommylight
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.
The following user(s) said Thank You: IronManDylan

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

More
31 Jul 2023 13:14 #276625 by rodw

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.

I'm not sure this is correct for a 5 axis machine with custom kinematics. Aceria will know.
The following user(s) said Thank You: IronManDylan

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

More
31 Jul 2023 14:28 #276636 by Aciera
So, I had a couple of hours of spare time today and decided to build a custom kinematics for a XYZAB-spindle-rotary-tilt setup. This way we don't have to fart around with kinematics that don't quite fit and virtual W axis:

 

File Attachment:

File Name: spindle-ro...g.tar.gz
File Size:10 KB


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:

Warning: Spoiler!


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:
The following user(s) said Thank You: IronManDylan

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

More
31 Jul 2023 14:32 #276637 by Aciera
The vismach simulation model is just a quick adaptation from another machine setup but you should get the idea.

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.
The following user(s) said Thank You: IronManDylan

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

Time to create page: 0.196 seconds
Powered by Kunena Forum