Hello Guest it is April 19, 2024, 07:43:33 AM

Author Topic: G68 Rotation point?  (Read 15586 times)

0 Members and 1 Guest are viewing this topic.

G68 Rotation point?
« on: April 06, 2011, 12:24:06 PM »
When a G68 rotation is active, there are interfaces to
1) know that this is is the situation (a LED)
2) get the Rotation angle (a DRO)

What I'm not finding is an interface to get the XY point that is the rotation axis...

Does anyone know how to get the rotation point?

Dave
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G68 Rotation point?
« Reply #1 on: April 07, 2011, 07:02:30 PM »
Well if you did not specify a point then it is the current xy point.I will look to see IF there is a set of points available in mach hidden away.

HIYA DAVE, (;-) TP
Re: G68 Rotation point?
« Reply #2 on: April 07, 2011, 08:08:53 PM »
Hi Terry,
The situation I'm trying to deal with is one where when the script starts up, it looks and finds that G68 is active.
The Rotation may have been set by the operator via MDI or something before the script is started.

I can tell G68 is active, & I can get the rotation angle from Mach - but I need to be able to find the point the WC was rotated about in order to do the math.

I even went looking into EMC docs to see if it was stashed in a gcode var someplace in the early EMC days and then  might still be hanging around in mach.... I didn't find any such thing - but I'm not sure I knew where to look.

Dave
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com
Re: G68 Rotation point?
« Reply #3 on: April 08, 2011, 12:03:28 AM »
Dave

Would it not simply be the active  X0Y0

Maurice
Re: G68 Rotation point?
« Reply #4 on: April 08, 2011, 12:26:17 AM »
Alas, no - it could be any point.
The syntax is G68 X<coord> Y<coord> R<angle in degrees> (there is also an optional I param - not relevant to this issue)  - so the XY plane WC can be rotated about any arbitrary point -

The problem I have is that the rotation could have been applied long before the script/button/ etc is invoked.
A user may have rotated things days before (say via MDI) - so to do the right thing when I find myself with a rotated WC, I need to find out what the rotation parameters are - but it appears that mach only provides a way to get the angle and not the rotation point.

This is part of a list of issues I'm finding about Mach's handling of rotated WC. IF I can get the rotation point, I can do the transform to compensate for what mach doesn't do correctly - as with the point known I can do the matrix math - but I'm stuck as I'm missing the rotation point's location.


Dave

Would it not simply be the active  X0Y0

Maurice
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com
Re: G68 Rotation point?
« Reply #5 on: April 08, 2011, 12:37:28 PM »
Dave

Just to analyse a little further:    I agree with you that the axes could have been or could be rotate at any time but the X0Y0 of the part, is the only point that is common to the rotated or non- rotated axis.   So it is always a known center point of rotation and it doesn't matter when the rotation was setted.

Maurice
Re: G68 Rotation point?
« Reply #6 on: April 08, 2011, 01:01:46 PM »
Maurice,

I'm not sure I am following you - Are you assuming that the rotation is always around the origin?
If so, that's not a valid assumption.
Example: It's valid to do G68 X1 Y1.414 R45 - in this case the rotation point is (1, 1.414).
To do the transformation to/from the rotated/non-rotated coordinate system you have to know the rotation point and the rotation angle.

Dave
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G68 Rotation point?
« Reply #7 on: April 08, 2011, 04:28:00 PM »
HIYA DAVE I looked back throught all the notes and did not see a solution for you sorry. Also checked the EMC2 code as well, no luck.

I can tell you from past experiences IF you are trying to incorporate the G68 into a macro you are in for a treat. The G68 does not play well in MACH a lot of things do not work when in G68 mode and from inside a macro you may not get ANY error codes from mach telling why it quits.

Best to test IF it is active and simply turn it off OR IF you insist (;-) just reset it to a known CR base coor on the fly.

Let me know if I can help test for you (;-) TP
Re: G68 Rotation point?
« Reply #8 on: April 08, 2011, 07:48:55 PM »
Thanks for looking Terry.

I was afraid that was the case. You're right about G68 - I've concluded that it's implementation is rather incomplete in Mach. I've accumulated a list of multiple verified bugs related to g68 rotations. I'm guessing that not very many people use G68 - as some of the bugs are really obvious once you try it.

I was really hoping to find a way to find the rotation point - one of the bugs is that the mach's touch vars ignore any active rotation. If you rotate the WC 45 degrees and then try G31 X1 – well, the movement is done in the correct direction, but the touch vars ignore the rotation and report an incorrect touch location. If I had the rotation point I could do the transformation to correct for the bug - but w/o knowing where the rotation is centered that's not possible.  I was actually considering having to do this:
   1) see if a rotation is active
   2) get the rotation angel and axis point
   3) cancel the rotation
   4) do the probe “non-rotated” (as the only way mach works correctly for G31)
   5) get the non-rotated touch location
   6) convert that back to the orig rotated WC
   7) restore the rotation
   8 ) report the “rotated” touch point
That would have been a royal PITA – but I could be done – if I just had the rotation point…

This all means I probably have to decide to disallow any active coordinate rotations when probing - which is a bummer as that creates a whole class of situations that can't be handled with Mach.   :'(

Dave
Author of the MachStdMill Extensions for Mach3
www.CalypsoVentures.com

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G68 Rotation point?
« Reply #9 on: April 09, 2011, 11:37:08 AM »
The reason Art disallowed the G31 in a rotated state was everyone at the time only used it for 3d probing a surface. And to 3d probing it is simply points in 3d space it had no relation to a known setpoint or point of origin.

In 2.5D and CMM probing a known setpoint is vital to the process. It took a while to convince Art to allow the A axis (rotary) to be probed with G31(;-)

I think a lot more people would be using it now IF it were a bit more stable. It can be a blessing to plasma and router work where it is NOT easy to rotate the full size sheet on the work table(;-).  BUT it is what it is.

As a reference in 35 yrears I have never had to probe a part in rotated space (;-) .  I have probed parts and then corrected rotation alignment in CAD. But that was just a convenence not a neccesity.

Just a thought, (;-) TP  
« Last Edit: April 09, 2011, 11:40:55 AM by BR549 »