Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Coding with G68.2


KevinMSC
 Share

Recommended Posts

Hi, I was wondering of someone could help me out with the coding of G68.2 in mastercam. So I am currently trying to machine a part on an OKK table-table machine that the back side of the part sits just outside of the machining area. My plan was to machine half the part then rotate the table so the back is in the front and accessible by the cuter. So my G54 is set to the center of rotation on the A and C axis, then I have my second Rotated coordinate system in the same location just rotated around Z at 180 deg. When I create any tool paths with this rotated coordinate system it does not actually rotate anything A and C stay at 0 instead of posting A0 C180. However if I do the same process and rotate the coordinate system around the A axis 90 deg it will and post A90 and C0 which would be correct. If anyone knew what I was doing wrong with the 180 degree rotation I would appreciate the help. I posted Pics of my 2 coordinate systems and the posted code. Thanks for any help I can get.

G00 G17 G20 G40 G80 G90
G91 G28 Z0.
G28 X0. Y0.
M79
M11
G90 A0. C0.
N1
T1 (0.75 FLAT ENDMILL)
M06
G54 G17 G90
G00 A0. C0.
G05 P10000
G68.2 X0. Y0. Z0. I180. J0. K0.
G53.1
M78
M10
X-10.325 Y.1874 S448 M03
G43 H1 Z10.9679
G94
Z9.4679
G01 Z8.9679 F25.
X9.95 F5.99
Y-.3991
X-9.95
Y-.9856
X9.95
Y-1.5722
X-9.95
Y-2.1587
X9.95
Y-2.7452
X-9.95
Y-3.3317
X9.95
Y-3.9183
X-9.95
Y-4.5048
X9.95
Y-5.0913
X-9.95
Y-5.6778
X9.95
Y-6.2644
X-9.95
Y-6.8509
X9.95
Y-7.4374
X-10.325
G00 Z10.9679
M05
G69
G05 P0
G91 G28 Z0.
G28 X0. Y0.
M79
M11
A0.
C0.
M78
M10
M30

Center of Rotation WCS.jpg

Center of Rotation Rear.jpg

Link to comment
Share on other sites

Frist very important question have you tried to run this code on the machine? Your G68.2 has the 180 that is all you need for the rotated plane to work if the machine has been setup correctly. If the part is symmetrical you may or may or see a difference in code posting the Zero position with a C0 plane or a C180 plane. What I will do to test that the post is outputting correctly is copy my C0 plane and C180 plane and shift them 1.000 in X and Y. Then just change the T and C planes to them and repost the code. If the values change then the post is respecting the correct G68.2. The biggest thing with G68.2 is are you using one base point to control all of your G68.2 outputs or are you using shifted G68.2 positions where your using reference features or other things? I for years programmed G68.2 from one point because most machines couldn’t handle the complex shifting, but as the builders have done a better job of setting up the machines I have done more shifted G68.2 programming. The code output changes drastically when the T-C plane are feature based from the part verses one point. The beauty of using mapped G68.2 is a setup person or operator can see code from that Zero point even though your G54 workoffset  is the same for 50 features on your part. I have had well over a 100 different planes on one part in the past and all the code came from that one point. With using mapped 68.2 I can still have the same amount of planes, but the code  zero can be from a feature that I am machining zero verses the part zero. With G54.2 or G54.4 you now have the ability to fine tune a specific details without needing to have 100’s of work offsets on the part. You can still go about creating 100’s of workoffsets if that is your preferred method. 

Now that Methods has taken over the importing of OKK machines I am not sure whom you need to speak to. I have had to go into several shops with OKK machines and help dial in the parameters to get G68.2 working correctly. Had one customer get a machine with G68.2 and never use it. Then crashed their machine and started having quality issues with their parts. Since it was such a bad crash it was impossible to get the kinematics back to factory specs. The machine builder begged them to try G68.2 to show them if they used them in the machine correctly they could make good parts again. Since it was already built into the post they just had to make the change and do a little implementation work and they were back to holding .0002” tolerances on their parts like they were before the crash. 

Sorry for the lengthy response no power so just killing time on my IPad. Have a good day.

  • Like 1
Link to comment
Share on other sites

Hey thanks for the reply. So I am using all of my rotational planes from a single point that is my G54. When I try and run this code on our machine it will run it but it will not rotate the C axis it just cuts as it would if the G68.2 was not there. I have tried to contact Methods a few times for OKK support but I guess they are still learning about the machines because it usually didn't lead to any answers to my questions.

Link to comment
Share on other sites

So heres what is really throwing me off. If I rotate the tool plane in a direction that changes the Z it will post out and run fine but if I rotate around Z like in my example above it will not rotate. Attached is a picture of the rotation that worked along with the posted code, 

G00 G17 G20 G40 G80 G90
G91 G28 Z0.
G28 X0. Y0.
M79
M11
G90 A0. C0.
N1
T1 (0.75 FLAT ENDMILL)
M06
G54 G17 G90
G00 A-90. C-180.
G05 P10000
G68.2 X0. Y0. Z0. I0. J90. K0.
G53.1
M78
M10
X-10.25 Y10.8385 S448 M03
G43 H1 Z10.25
G94
Z8.25
G01 Z7.25 F25.
Y10.0885 F5.99
G03 X-9.5 Y9.3385 I.75 J0.
G01 X9.5
G03 X10.25 Y10.0885 I0. J.75
G01 Y10.8385
Z8.25 F50.
G00 Z10.25
M05
G69
G05 P0
G91 G28 Z0.
G28 X0. Y0.

TEST Plane.jpg

Link to comment
Share on other sites

You might need to have logic added to the post to handle rotations around Z when the tool axis has not changed from the normal (TOP WCS) z+ tool axis. Most posts will use the tool axis only and not the actualy Co-ordinate system (XYZ) to figure out rotations for the machine and code. In your 180 example the WCS may be different but the actual tool axis is still the same.

What post are you using and where did you get it?

Hopefully someone more knowledgeable than I will chime in and help.

HTH!

Link to comment
Share on other sites

What your running into is a singularity issue on the machine itself and not the code. Something you can try is go to the last option in your toolpath and use the rotate option and see if that will spin the C Axis for posting code. The other option you can do it not use G68.2 when in top plane you post should have the option to it off if you have a table table 5 Axis as I think you do. Then all of your top plane work will be G54 no G68.2 and all of your 3+2 work will be G68.2. The machine will run find like that until you can sort out the issue. The other option is to us a G54 for one side and G55 for the other and put a C180 in your G55 work offset to trick it in to get the part done. As long as you track your work and operation with that understanding then not a big deal.

Link to comment
Share on other sites
  • 4 weeks later...

When I was programming BC head/table Integrexes I always just set a new offset.  If you are indicated to center then there is nothing more than setting C angles.  If you are not on center I have a macro I use to set as many angles as I need in new offsets.  More than one way to skin this cat.

  • Like 1
Link to comment
Share on other sites

I prefer Euler, as James pointed out.  It's about X, about Y and about Z.

 

Are you inditcated on center or are you wanting to use G68.2 to offset for CoR deviation?  You can also use G54.2 or G54.4 to handle deviation from CoR but use it as tilted planes.  You would set CoR to an offset, the probe your "offset" on your part and set all of your planes there.  Then let the machine handle the rest.  Again, so many ways to skin this cat...

Link to comment
Share on other sites
9 hours ago, 5th Axis CGI said:

Does it make me a geek that I got it and have explained it almost word for word to people? 🤨

I hope you don't think that was aimed at you Ron. Because it wasn't. Though I get the impression I was taking a dig at you. But I wasn't...

I just thought that image was funny in general.

Link to comment
Share on other sites
11 hours ago, Mick said:

I hope you don't think that was aimed at you Ron. Because it wasn't. Though I get the impression I was taking a dig at you. But I wasn't...

I just thought that image was funny in general.

Never Mike your not that kind of person. I was making a bad joke. :no

Besides I know you understand this stuff like the back of your hand. 😉

  • Like 2
Link to comment
Share on other sites
8 hours ago, 5th Axis CGI said:

Never Mike your not that kind of person. I was making a bad joke. :no

Besides I know you understand this stuff like the back of your hand. 😉

The back of my hand is a little hairy, and worn out. Does that signify anything? 😂

  • Haha 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...