G10 rotations

More
5 years 3 weeks ago #222404 by rgb
G10 rotations was created by rgb
I've been reviewing the interpreter code in some detail with respect to xy rotations specified via G10 R parameters. I think there may be a few problems. The code in some cases appears to assume that the results of an translation followed by a rotation about the translated Z axis is the same as a rotation about the current Z axis followed by a translation. In other cases the (g28, g30) the code doesn't take the rotations into account.

The purpose of this note is to tie down the semantics. Here's what I think they are, using the G5x code as a "gold standard".

1) Tool x, y offsets are relative to the machine coordinate system.
2) G10 xy rotations should be around the G5x translated axis. Ie, first you translate then you rotate.
3 G92, G52 offsets are relative to the current G5x coordinate system

Comments please. I'm deep enough into this now that I can probably come up with a set of proposed patches for people to play with. There are dragons out there though given that  persistent parameters (g28 saved positions, for example) may be interpreted differently after the changes.

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

More
5 years 3 weeks ago #222410 by andypugh
Replied by andypugh on topic G10 rotations
You are unlikely to get many of those who understand the deep level stuff reading your posts on the forum. It is probably worth taking this to the developers mailing list.

Chris Radek added rotation back in 2009:
github.com/LinuxCNC/linuxcnc/commit/c72e...e312e9e340fe8abd6163

Chris has rather moved on, I haven't heard from him for quite some time.

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

More
5 years 3 weeks ago #222412 by rgb
Replied by rgb on topic G10 rotations
Thanks Andy. I'll give that a try.

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

More
5 years 3 weeks ago #222417 by cmorley
Replied by cmorley on topic G10 rotations
If you are in the code could you modify it to work with lathes (XZ only)?

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

More
5 years 3 weeks ago #222467 by rgb
Replied by rgb on topic G10 rotations
Can you say a bit more about applications for such a change?

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

More
5 years 3 weeks ago #222505 by cmorley
Replied by cmorley on topic G10 rotations
Sorry, I should have done that.

In a lathe, back tool machining is much easier if you mirror the coordinate system.
Rotating the system does this nicely.
It seems G10 requires XYZ to be present to work.
In 2.7 all axis were defined in the background by linuxcnc even in an XZ machine, so it just worked.
in 2.8 + (because of joint/axes work) you must define XYZ for a lathe to use rotation.
Most code assumes with a lathe only X and Z are used.
It also not intuitive to get Y axes errors on a XZ lathe (if you configure something wrong)
and finally it complicates GUI code between joints and axes conversion.

I'm hoping it not too bad to allow rotation around Z with only X.
It's not very often we get someone willing to dig deep into the code to do this kind of work.

Chris

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

Time to create page: 1.490 seconds
Powered by Kunena Forum