5 Axis Kinematics problems.

More
12 Apr 2012 16:17 #19148 by Dave3891
I am having some problems setting up my kinematics for a 5 axis plasma system.
I am attaching my .c file for the kinematics.
The problems I am having is that when the A axis rotates (this is the torch angle) it offsets the X as it should, only it is doing it at a X10 value (shows as 35.9 instead of 3.59) and I can't seem to figure out why it is doing this. It gets the torch length from a HAL pin and I have triple checked this value.

The other problem is when I switch from MDI mode to JOG mode.
It changes the position values by a small amount every time I switch back and forth.

File Attachment:

File Name: 5axisplasma.c
File Size:2 KB

I think it might have something to do with how I am calculating the kin values.

Also I don't really understand what the forward and inverse sections represent in the kin program file. So any in site into this would be appreciated.

The kinematics should be pretty simple for this system.
I have a torch length value that represents the distance from the tip to the A axis rotation point, this sets the angle of the torch cut. When I change the A angle, it should lower the torch (with the Z) and move the X (using Torch offset value calculated with the trig angle) to keep the tip in the same position.

When I rotate the C axis this changes the direction of the torch angle, so I can cut bevels on any direction. When this value changes, it should use the Torch Offset to move the X and Y offsets.


Any help would be appreciated.

Dave
Attachments:

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

More
12 Apr 2012 17:06 #19151 by Dave3891
Well I found a little bug in my calculations, here is the fixed file.

File Attachment:

File Name: 5axisplasm...144906.c
File Size:3 KB



This works perfect in MDI mode, but I am still getting following errors when I try to switch to JOG mode.

I also don't have any calcs in the inverse section of the code, only joints[0] = pos->tran.x; for each of the axis / joints.

Does this part have something to do with the JOG mode?


Dave
Attachments:

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

More
12 Apr 2012 18:07 #19153 by Dave3891
I think I have it figured out now.

All I had to do was basically remove the offsets that were set in the forward section by subtracting them in the inverse section.
Now when I do a MDI of a A or C axis only those axis appear to move in the DRO, but when I move back to JOG and look at the joint DRO it shows that the axis's have moved as they should.
And this makes sense since you don't want the motion to show up as movement with in the code.

I will attach the file for anyone to look at or use for a machine.


Dave



File Attachment:

File Name: 5axisplasm...69b94f.c
File Size:2 KB
Attachments:
The following user(s) said Thank You: Maher2013

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

More
27 Jun 2012 15:45 - 27 Jun 2012 15:52 #21391 by viesturs.lacis
Hello!

Sorry for nobody replying such a long time.

A little explanation at first:
Forward kinematics basically take the existing tool position in terms of joint positions (that is easy for trivial machines, but not that easy for non-trivial kinematics, like robotic arms, hexapods etc) and calculates, where is it in Cartesian space.
Inverse kinematics do the opposite - they take Cartesian position and calculate, what the joint positions have to be to get the tool in required point.

Kinematics module calculate both of them to ensure that tool is in the required place.
However You can change that with these particular lines:

KINEMATICS_TYPE kinematicsType()
{
return KINEMATICS_IDENTITY;
}

Usually it is return KINEMATICS_BOTH;

For example, take a look at trivkins module:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...fs/heads/v2.5_branch

It has it that way. One of the sideffects is that with KINEMATICS_IDENTITY You cannot switch machine to joint mode.
So what it seems to do is calculate only inverse kinematics (although I am not programmer so I do not know, where to look in the code to make sure).


I looked at Your kinematics modules and yes - the first two had the mistake that is fixed in the last version.
In simple words: If You add something in forward kins, You have to subtract it in inverse kins.

BTW, if You are interested, You can easily set the machine up to do a constant bevel angle along the path You cut simply by calculating the direction of the XY movement and feeding this value to joint[5].
See the attached kinematics module.
Oh, and that machine has AB head, which made it little more difficult for the kinematics formulas.


I see that You implemented torch length as a HAL pin.
I have a suggestion - if You have some kind of THC, You can adjust the thc module (in the same way You created the kinematics module) so that it adds/subtracts its offset to torch length value. Since kinematics module reads the HAL pin value each servo cycle, You will have the torch height adjusted along the central line of the torch, which is crucial for 5 axis cutting.
In my version of kinematics module I have separated the torch length offset and the thc offset (I called them nozzle and nhc as I plan to use this module not only for plasma, but also for waterjet) in 2 pins, but it does not really make much of difference.
I just have yet to figure out, how to remove thc offset to 0 each time the torch is turned off. Repeatable torch touch off to material before piercing the material is little easier - if nothing else, add a little ring (basically the same as used for capacitance sensors), which is isolated from the machine and which triggers input pin each time it touches material.

Let us know, if there are any other questions or You need some more help. I will try to follow up on this thread.

File Attachment:

File Name: taperkins.c
File Size:4 KB
Attachments:
Last edit: 27 Jun 2012 15:52 by viesturs.lacis.
The following user(s) said Thank You: Maher2013

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

More
20 Oct 2013 07:34 #40072 by Maher2013
Hi Dave,
so what's new with your machine? up and running? Did you figure out all the kinematics?

Maher

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

Time to create page: 0.132 seconds
Powered by Kunena Forum