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:

5 AXIS PROGRAMMING


motofan91
 Share

Recommended Posts

Hoping someone can shed some light on my brain-melting confusion of 5 axis programming...

Machine is a Mazak VC-500. B axis table rotates about Y and C is Z.

We run these parts in another 5 axis (Doosan, A is along X axis) using G68.2 coordinate rotation. I did not write the original program, so I am still trying to understand how the G68.2 is defined.. Due to some tight true position tolerance, we also probe each part when loaded on the fixture for X/Y pos. and rotational error in the C axis. Part is programmed from the common origin regardless of rotary position.

Original code:

A-90.C90.
G68.2X0Y0Z0I90.J-90.K0 (A pos. is 90, why I90.?, C is 90 / why J-90. and not K90.?)

G53.1
X0Y-.7
G43Z1.6265H06M8

When we bought the machine, we were told to program using G54.2 dynamic work offset and also sold the G54.4 WSEC option ($900.00) and we wouldn't need to use G68.2?

The apps guy took our original Doosan program and modified it calling up G54.2 after positioning the rotary:

G90G54G00G69
B-90.C90.
G54.2 P1 X0.7000 Y-0.0000 Z10.
Z1.6265 M08

Once he came in and assisted in getting this running, he changed the program to use a DIFFERENT style of G68.2 programming because he said it had to be that way because we probe the parts??G0B-90.C90.
S2838M03

B-90.C90.
G68.2 P3 Q1 X0 Y0 Z0 I0. J0. K1.
G68.2 P3 Q2 I0. J-1. K0
G53.1
X0.7000 Y-0.0000 Z10.

Z1.6265 M08

Once again, confusing me as the explanations I have found are confusing.

if anyone can explain, it would be appreciated as I haven't yet found a complete description of the tilted workplane or if the part can be programmed using G54.2/G54.4 using the probing cycles. I have also seen talk about a macro to probe the part, calculate the difference from COR and populate the G54.2 or G54.4 but haven't seen a complete or proven example for the Mazak.

 

Thanks in advance.

If the simple way is to position the rotary, Call up G54.2 and program off the origin of the part, then that sounds like the most logical approach...

  • Huh? 1
Link to comment
Share on other sites

Think of the G54.4 as a fine tuning of the G54 original work offset. You write your probing routines to update your standard workoffset. Yes I still recommend using G68.2 and using of G54.4 OR if they are configuring the machine to use G54.2 in place of the G68.2 that is fine, but without a programming manual to reference going to be hard to know if it does the same as G68.2 on that machine. Need to know the probing process you doing. Are you doing a C and B axis alignment for rotations? Are you doing only positional alignments while in a plane? Are you doing feature checks and then adjusting those features to size using the probe? Are you doing positional checks to then dial in a true position? Not a simple use G54.4 answer as it is really meant to fine tune an existing offset and not replace it.

  • Thanks 1
  • Like 1
Link to comment
Share on other sites

Caveat, my definition is for a VMC with a table/table configuration type machine. 

 

Biggest difference between G54.2 and G68.2 is G54.2 requires 2 offsets to be used; 1) The Work Offset itself - which must be the center of rotation, and 2) The Dynamic offset - which is the distance from the center of rotation to the workpiece datum. This is how the positions are calculated by the control.

G68.2 uses a group of 6 parameters in the machine. One defines the distance in X from machine home to center of rotation relative to the primary rotary axis, one defines the distance in Y from machine home to center of rotation relative to the primary rotary axis, one defines the distance in Z from machine home to center of rotation relative to the primary rotary axis, one defines the distance between the center of rotation to the center of the secondary rotary axis in X - known as 1/2 offset X, one defines the distance, one defines the distance between the center of rotation to the center of the secondary rotary axis in Y - known as 1/2 offset Y, and the last parameter defines the distance from the center of rotation of the primary rotary axis to the top of secondary rotary axis table - known as 1/2 offset Z. 

G68.2 is superior to G54.2 in that you can compensate for things that you cannot compensate for like the 1/2 offsets which are most easily defined as the amount of axis intersection error when they assemble the rotary tables. Most builders' values are very small.

 

G54.4 is used to compensate not only for linear error but rotary axis error. G54 is a linear compensation method not taking into account all the degrees of freedom. Yeah you can hack stuff, using the work offset but it's not the right way. G54.4 is the right way to comp or error. 

G54.4 is mainly used for machining castings or reworking already machined components. It can slash setup time dramatically. So instead of shimming, tapping, indicating, etc... throw it up there, measure the errors, put the values in the correct table location and go. 

 

HTH

  • Like 4
Link to comment
Share on other sites

We only probe the part when we mount it on the fixture, for C orientation (typically within ±1°) and then a bore for X0/Y0 work offset. i am confuse to the G68.2 and the different types I have seen it use in our programs.

I was under the impression by using G54.2 dynamic work offset, as the part is rotated either in B or C, it would "track" the origin of the part regardless orf table orientation? keep in mind, all toolpaths are programmed from the same datum location on all sides of the part. We were also told to purchase the G54.4 option as this is the "newest" version of G54.2.

G0 G54.1P1 X0.7 Y0.0 
B-90.C90.
G54.2 P1 X0.7 Y0.0 Z10.
Z1.6265 M08
*MACHINE FEATURES*
G0G53Z0
B-45. C180.
X0.7 Y0.0
*MACHINE FEATURES*
G0G53Z0
G54.2P0

Is that correct?

 

 

Link to comment
Share on other sites
3 minutes ago, motofan91 said:

We were also told to purchase the G54.4 option as this is the "newest" version of G54.2.

G54.4 is NOT the newest version of G54.2. They are two completely different and separate functions. See my explanation above. 

G54.2 does track. It tracks differently than G68.2 though. 

There are 6 possibilities for G68.2; 

  1. Euler's Angles
  2. Poll Pitch Yaw Angles
  3. Three Points
  4. Two Vectors
  5. Tool Axis Direction

Items 1 and 2 are by far the most commonly used. 

At a glance, that format does not look quite correct to me. 

	T11M06
M08 (COOLANT ON)
M50 (THRU SPINDLE COOLANT ON)
G131R0 (HIGH SPEED MODE ACTIVATE)
S4500M03 (SPINDLE ON)
M22 (UNCLAMP ROTARY AXIS)
G00G90G54B-90.0 (ACT. WK. OFFSET & PRE-POSITION ROTARY AXIS)
G54.2P1X0.898Y3.002B-90.0 (ACT. RTDFO AND POSITION X, Y, & ROTARY AXIS)
M21 (CLAMP ROTARY AXIS)
G43Z7.5651H#517 (ACT. TOOL LENGTH OFFSET)
…… (BEGIN MACHINING)
…… (END MACHINING)
…..M05 (CANCEL ANY RELEVANT FUNCTIONS & SPINDLE OFF)
G00G90 (SET MACHINE TO RAPID & ABSOLUTE POSITIONING)
G49 (CANCEL TOOL LENGTH OFFSET)
G54.2P0 (CANCEL RTDFO)
G130 (CANCEL HIGH SPEED MODE)
M22 (UNCLAMP ROTARY AXIS)
G49G53Z0.0M08 (SEND Z TO MACHINE ZERO & SHUT OFF COOLANT)
(INSERT BROKEN TOOL DETECTION IF DESIRED)
M01 (OPTIONAL STOP)
	

 

Link to comment
Share on other sites

I appreciate the help, not sure why my brain can't completely absorb how it all works. I always like to look at the code and understand what it is doing before heading to the machine and want the easiest way for myself and others to understand what the machine will do.

I see the mistakes with my code once you posted your example... What I posted is exactly how the Mazak apps guy wrote it... Now that has been changed since he couldn't get the code to run simulation in the machine so he changed it to use G68.2P3... like I said, he said it won't run with G54.2 because we probe the part?? We were explained that by probing each part, we could compensate for the "error" both in XY and C as we position the part so we purchased the G54.4 option to compensate for this. 

 

Link to comment
Share on other sites
48 minutes ago, cncappsjames said:

G54.4 is NOT the newest version of G54.2. They are two completely different and separate functions. See my explanation above.

I'm not sure this is true on a mazak control.  In my experience, G54.2 on a mazak is more functional that it is on a Fanuc, much closer to Fanuc G54.4.

Link to comment
Share on other sites
2 minutes ago, cncappsjames said:

Please disregard. My information pertains to FANUC.

Upon further reading the post was really about both, so no need to disregard.

Someday, I'd love to get my hands on three or four different machines all with different control makes, but similar kinematics and do some of these things and document methods on how to accomplish tasks like these with the simplest methods possible.  We lack means of translation from platform to platform.

Link to comment
Share on other sites

I run a Kitamura with a Fanuc 16i control using G54.2 and can probe the part in X,Y,Z, and C axis.  G54 is set to the machine center of rotation.  I probe the part position into another offset and I have a macro program that does the math and transfers the correct values into the dynamic fixture offset.  I have my post setup to call the macro program at each toolchange.  On my machine I need to use G54.2 for 2 and 3 axis toolpaths but for full 5 axis I need to use TCP (G43.4).   For G43.4 I can simply probe the value into a offset.  I have my post setup to post out G54.2 or G43.4 depending on the toolpath being used.  The way I'm setup I can probe the part position into any offset between G55 and G58 and run the program as posted out of Mastercam. 

  • Like 2
Link to comment
Share on other sites
6 hours ago, huskermcdoogle said:

Upon further reading the post was really about both, so no need to disregard.

Someday, I'd love to get my hands on three or four different machines all with different control makes, but similar kinematics and do some of these things and document methods on how to accomplish tasks like these with the simplest methods possible.  We lack means of translation from platform to platform. 

Throw in a Heidenhain to really get your head spinning.

 Plane Spatial is equivalent to G68.2 with the the added twist of Plane Relative to get the G54.4  work piece correction factor accounted for.

Just to be completely nutty, If you have an A/B machine and a B/C machine in the same shop, Heidy don't care. Program with any two angles specified SPA SPB SPC and kinematics will figure out the rest. In other words, and A/B post will work for a B/C machine.:ermm:

Link to comment
Share on other sites
11 minutes ago, mkd said:

Throw in a Heidenhain to really get your head spinning.

No head spinning required....

I haven't done much with the anything built in the last 30 years, but with Heidenhain, my experience is "If it can't be that simple, it just is."

If I were to buy a 5ax machine today, I think HH would be very high on the list.  My priority would be to favor the control options over many other things.  But I guess at the end of the day it would depend on what that machine was needed for.  All of the control builders have gotten pretty good over the last decade.  It's mostly the machine tool builders making things difficult and holding back progress on standardization.

Link to comment
Share on other sites
19 minutes ago, mkd said:

Just to be completely nutty, If you have an A/B machine and a B/C machine in the same shop, Heidy don't care. Program with any two angles specified SPA SPB SPC and kinematics will figure out the rest. In other words, and A/B post will work for a B/C machine.:ermm:

Program with Vector output  (I,J and K) as opposed to Rotary Angle (A, B, C) and FANUC doesn't care either. So take that program you wrote for your A/B HMC and drop it in your B/C VMC :D and #SendIt 

:hrhr:

  • Like 2
Link to comment
Share on other sites
33 minutes ago, cncappsjames said:

Program with Vector output  (I,J and K) as opposed to Rotary Angle (A, B, C) and FANUC doesn't care either. So take that program you wrote for your A/B HMC and drop it in your B/C VMC :D and #SendIt 

:hrhr:

HH don't need a vector format for this but it is preferred.

:spell::harhar:

:harhar:

Link to comment
Share on other sites
18 hours ago, Ben Wood said:

I run a Kitamura with a Fanuc 16i control using G54.2 and can probe the part in X,Y,Z, and C axis.  G54 is set to the machine center of rotation.  I probe the part position into another offset and I have a macro program that does the math and transfers the correct values into the dynamic fixture offset.  I have my post setup to call the macro program at each toolchange.  On my machine I need to use G54.2 for 2 and 3 axis toolpaths but for full 5 axis I need to use TCP (G43.4).   For G43.4 I can simply probe the value into a offset.  I have my post setup to post out G54.2 or G43.4 depending on the toolpath being used.  The way I'm setup I can probe the part position into any offset between G55 and G58 and run the program as posted out of Mastercam. 

Thanks for the info. Can you share your macro program for me to reference? variables would be different but it will give me a place to start.

You can e-mail it, [email protected]

Still looking for "tilted workplane explanation for dummies" Basically how to determine by B/C rotary position values what the I/J/K would be?

21 hours ago, cncappsjames said:

There are 6 possibilities for G68.2; 

  1. Euler's Angles
  2. Poll Pitch Yaw Angles
  3. Three Points
  4. Two Vectors
  5. Tool Axis Direction

Thanks again to everyone that has helped.

Link to comment
Share on other sites

Yes and no.. What I guess I am looking for is if I position the part to a specific B/C position, what should the G68.2 I/J/K values be? especially confused at having to rotate the coordinate system around X when the table tilts along Y using euler... maybe the "dumbest" way is to use roll/pitch/yaw?

Euler: B-90. C90.

G68.2 X0 Y0 Z0 I__ J__ K__??

Roll/pitch/yaw: B-90 C90.  G68.2 P1 X0 Y0 Z0 I0 J-90. K90. Correct?       B-45. C120. I0 J-45. K120. Correct?

In our other machine, table tilts along X, it's much easier for my brain to process..

A-90. C0.  G68.2 X0 Y0 Z0 I0 J-90. K0 Easier to comprehend because we match the C to the I value, A position to the J value. 

 

Once again, thanks for the help.

Link to comment
Share on other sites

Using Euler's Angles

B/C Kinematic

	G00G90G54.1 P11B-90.0C90.0
G54.4 P1
G68.2 X0.0 Y0.0 Z0.0 I180.0 J-90.0 K-90.0
G53.1
	.......
	G00G90G54.1 P11B-90.0C-180.0
G54.4 P1
G68.2 X0.0 Y0.0 Z0.0 I-90.0 J-90.0 K-90.0
G53.1
	......
	G00G90G54.1 P11B-90.0C-90.0
G54.4 P1
G68.2 X0.0 Y0.0 Z0.0 I0.0 J-90.0 K-90.0
G53.1
	.....
	G00G90G54.1 P11B-90.0C0.0
G54.4 P1
G68.2 X0.0 Y0.0 Z0.0 I90.0 J-90.0 K-90.0
G53.1
	

 

A/C Kinematic

	G00G90G54.1 P11A-90.0C90.0
G54.4 P1
G68.2 X0.0 Y0.0 Z0.0 I90.0 J-90.0 K0.0
G53.1
	....
	G00G90G54.1 P11A-90.0C-180.0
G54.4 P1
G68.2 X0.0 Y0.0 Z0.0 I-180.0 J-90.0 K0.0
G53.1
	.....
	G00G90G54.1 P11A-90.0C-90.0
G54.4 P1
G68.2 X0.0 Y0.0 Z0.0 I-90.0 J-90.0 K0.0
G53.1
	.....
	G00G90G54.1 P11A-90.0C0.0
G54.4 P1
G68.2 X0.0 Y0.0 Z0.0 I-0.0 J-90.0 K0.0
G53.1
	
Link to comment
Share on other sites

I think it's worth noting that the K value in a ZXZ Euler can be anything provided the points are mapped to that XY orientation.  I only bring this up because I think ZXZ is the default rotation order on a Fanuc.

Also roll pitch yaw (Tait–Bryan angles) are very similar to Euler angles; the difference is that Euler's repeat an axis (ZXZ, XYX, ZYZ, you get the idea...), and roll pitch yaw angles don't(XYZ, YZX, YXZ, etc.)

  • Like 1
Link to comment
Share on other sites

I appreciate you guys' help, I think my brain has finally processed this especially with the examples cncappsjames provided and holding the part in my hand doing the rotations, it makes some sense now... maybe I can finally sleep tonight!

1st rotation I= Rotate part about machine Z axis (basically position face where it would be facing Z+ on the next rotation along X.

2nd rotation J= Rotate part along machine X axis (virtual because table tilts in Y, but looking at it as if the entire trunnion rotated about Z in the first move)

3rd rotation K- Rotate about machine Z axis again (rotate part and trunnion back to where it would be.)

Not sure why i couldn't wrap my head around using B/C, but it was always easier in our Doosan because the A tilt axis rotates about X..

 

Only other question.. for cncappsjames... I see you are calling up G54.4 P1 before the G68.2..Our Mazak apps guy has talked us out of using that because we probe the part for C orientation and X/Y position and just use G54. He assured us that the machine would track any errors in positioning from COR when calling up the G68.2? is that correct? Kinda funny because they sold us that option but now tell us not to use it.... 

These parts have true position tolerance of .001/.002 on several rotated features and he told me I have to adjust the G68.2 X/Y/Z to compensate for the errors. 

 

Link to comment
Share on other sites

I always have G54.4 in my programs. Doesn't necessarily mean it is actually being used though. It's there just in case. When I do castings or re-machining, it comes in really handy because then I don't have to even think about setup position, orientation or rotation. Slap it on the table and send it. :) 

Honestly, they are probably telling you not to use it because they themselves don't understand it.  :rofl: :coffee:

If you only need to track your secondary rotary axis (β) -  usually C on a VMC and/or your linear axes then it's fine to use the normal work offsets. When you need to comp for your primary tilt axis (α) - usually A or B on a VMC, or you need to comp for your theoretical rotary axis (γ) , then you MUST use G54.4.

If you need to cheat on your G68.2 code line then your center of rotation is off. On a FANUC machine it's parameters #19700 - #19705. Get that squared away. Putting values there is a hack, or band aid. It's easy, I get it, but do it right. Your part tolerances will thank you. 

HTH

Link to comment
Share on other sites
On 4/23/2020 at 8:58 AM, cncappsjames said:

Caveat, my definition is for a VMC with a table/table configuration type machine. 

 

Biggest difference between G54.2 and G68.2 is G54.2 requires 2 offsets to be used; 1) The Work Offset itself - which must be the center of rotation, and 2) The Dynamic offset - which is the distance from the center of rotation to the workpiece datum. This is how the positions are calculated by the control.

G68.2 uses a group of 6 parameters in the machine. One defines the distance in X from machine home to center of rotation relative to the primary rotary axis, one defines the distance in Y from machine home to center of rotation relative to the primary rotary axis, one defines the distance in Z from machine home to center of rotation relative to the primary rotary axis, one defines the distance between the center of rotation to the center of the secondary rotary axis in X - known as 1/2 offset X, one defines the distance, one defines the distance between the center of rotation to the center of the secondary rotary axis in Y - known as 1/2 offset Y, and the last parameter defines the distance from the center of rotation of the primary rotary axis to the top of secondary rotary axis table - known as 1/2 offset Z. 

G68.2 is superior to G54.2 in that you can compensate for things that you cannot compensate for like the 1/2 offsets which are most easily defined as the amount of axis intersection error when they assemble the rotary tables. Most builders' values are very small.

 

G54.4 is used to compensate not only for linear error but rotary axis error. G54 is a linear compensation method not taking into account all the degrees of freedom. Yeah you can hack stuff, using the work offset but it's not the right way. G54.4 is the right way to comp or error. 

G54.4 is mainly used for machining castings or reworking already machined components. It can slash setup time dramatically. So instead of shimming, tapping, indicating, etc... throw it up there, measure the errors, put the values in the correct table location and go. 

 

HTH

That's as good of a description as I have ever seen.

👍

<cheers>

  • Like 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...