2012/11/17 Martin Lederhilger <martin.lederhil...@gmx.at>:
> Hello,
>
>  I have upgraded my 3-axis cartesian machine with a 4th rotatory axis,
> which looks along the X-axis. In my g-code programs I want to use X, Y
> and Z for the position of the tool's tip on the workpiece and A for the
> angle between the z-axis and the axis of the tool - which is always in
> the yz-plane.
>
> Therefore I have written a kinematics module, but it seems that I have
> problems with the tool length compensation. Now I have the following
> questions:

AFAIK currently there is no 5 axis tool length compensation in
LinuxCNC. I hope that I am wrong :)

Could You, please, share Your kinematics module?
The way I have been compensating for the tool length from tool tip to
pivot point (in 5 axis plasma and waterjet machine kinematics), is:
1) create a HAL pin in kinematics module to feed in the tool length
value (which can be changed during the operation and machine will
adjust to that, just limit the rate of the change for this value so
that machine can move accordingly);
2) in inverse and forward kinematics add calculations of the offset
along Y and Z as the tool is tilted. For Y that would be "tool_length
* sin(A)", for Z that would be "tool_length*(1-cos(A))"
note that the difference between inverse and forward kins is the sign
before these new additions, for example:
joints[1] = tran.pos->y + tool_length*sin(A);
tran.pos->y = joints[1] - tool_length*sin(A);
3) since pos->a is in degrees, but all the angle calculations need
radians, You simply need to define a new variable, in this example
this is A, to get from degrees to radians:
A = pos->a*PM_PI/180;
see pumakins module for examples, how that is done.

-- 
Viesturs

If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to