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:

4th axis positioning help


Rstewart
 Share

Recommended Posts

Ok, I have a rectangular shaped part set up in the VMC on the A axis. I always try to program to the center of rotation when possible but I'm trying to figure the best way to do this one....

The part is set up fairly close to the center of rotation on a dovetail fixture, but the datum I have to touch off on is a good bit off center in Y and Z. This is a 90% completed part that just needs a series of holes drilled on the top and bottom faces with a lil milling too.

I would really like the hole locations to match close as possible from top to the bottom.

 

Slightly OT but how do guys handle 4th axis work when you can't get the part placed physically on center of rot. Especially when there's basically no rough stock left from the previous op's

 

Thanks in advance guys

Link to comment
Share on other sites

You've basically got two choices: You can draw the part in the proper position in Mastercam, so the part is rotated correctly out of the gate, or you can use your controls' work shifting features to have the control do your compensation for you.

 

The positioning one is "easier" in the fact that you don't have to worry about any special config settings on the control, but harder in the fact that you would have to get every part positioned in the same exact way each time you run one. It's generally easier for novice multiaxis guys to get their heads around as well..

 

The control side is "easier" in the fact that it doesn't matter where the part is at, your part rotations will just work. It's harder in the fact that you're relying on the control to be set up correct, which isn't always a safe assumption...

 

The easiest if you're doing randomly-placed parts that are truely 3+2, is to simply set a WCS for each face, and go off of a datum feature. The down side is this generally requires operator input or probing experience, so note that...

Link to comment
Share on other sites

We use a rotation macro for all of our 4th and 5th axis machines. Basically we program using just a G54, then as the part rotates to a new position, it recalculates the new fixture offset values and places them in G59 for use. It's actually a pretty simple macro. This allows us to program centerline regardless of where they place the part on the machine. Makes life much easier.

Link to comment
Share on other sites

Drew the part in MC as close as I could measure on the machine and It came out Great! Thanks everyone :cheers:

 

 

Ray D: I like to know more about that macro you speak of. I'm not very versed in macros but that sounds like a VERY useful one for me

 

I will insert the 5th axis macro for VMC here. This is for a trunnion style 5th axis table, but it can easily be modified for 4th. Usage is pretty simple. Program centerline, and just use the G54. This particular macro will do all of it's calculation in the G58, so the operators cannot use G58 for anything.

 

The code would look something like this

 

S2000 M3

G0 G90 G54

G65 P9998 C90. A10.

X-4.594 Y-2.3749

G43 H1 D2 Z2. M8

Z.18

........

 

As soon as the program goes into the macro, the code starts using the G58 with calculated values.

 

We've been using these type of macros for well over 15 years here, and it makes setup easier, as well as programs. Of course this will only work for positional 5th axis work.

 

 

:9998(MORI 5TH AXIS)
(CHANGED Z FROM -16.8484)
(9/11/13   P.H. )
( G65 P9999 C A )
( A = ROTATION )
( C = ROTATION )
( MACHINE USING G58 )
(CHECK ZEROS)
#500=-23.9885( IS CENTER LINE IN X )
#501=-11.9326( IS CENTER LINE IN Y )
#502=-16.8554( IS CENTER LINE IN Z )
#100=#3( TRANSFERS THE C TO 100)
#103=#3
#100=[#100]*[-1.0]
#130=#1( TRANSFERS THE A TO 130)
#133=#1
IF[#4014EQ58.]GOTO5
#121=#4014( FINDS THE CURRENT OFFSET )
N05
#110=#4003
#111=#5005( FIND CURRENT C )
#112=#5004( FIND CURRENT A )
IF[#121LT54.]GOTO950
IF[#121GT57.]GOTO950
IF[#121EQ58.]GOTO960
IF[#121EQ59.]GOTO960
IF[#121EQ54.]GOTO11
IF[#121EQ55.]GOTO12
IF[#121EQ56.]GOTO13
IF[#121EQ57.]GOTO14
GOTO970
N11
#140=[#5221-#500]( IS X AXIS )
#141=[#5222-#501]( IS Y AXIS )
#142=[#5223-#502]( IS Z AXIS )
#143=#5224( IS A AXIS )
#144=#5225( IS C AXIS )
GOTO20
N12
#140=[#5241-#500]( IS X AXIS )
#141=[#5242-#501]( IS Y AXIS )
#142=[#5243-#502]( IS Z AXIS )
#143=#5244( IS A AXIS )
#144=#5245( IS C AXIS )
GOTO20
N13
#140=[#5261-#500]( IS X AXIS )
#141=[#5262-#501]( IS Y AXIS )
#142=[#5263-#502]( IS Z AXIS )
#143=#5264( IS A AXIS )
#144=#5265( IS C AXIS )
GOTO20
N14
#140=[#5281-#500]( IS X AXIS )
#141=[#5282-#501]( IS Y AXIS )
#142=[#5283-#502]( IS Z AXIS )
#143=#5284( IS A AXIS )
#144=#5285( IS C AXIS )

N20
(***********************************)
(********** CACLULATIONS ***********)
(***********************************)
N60( ANGLE, HYP. )
#101=ATAN[#140]/[#141]( CALCS ANGLE )
#101=[#101]-360.
#102=SQRT[[#140*#140]+[#141*#141]]( CALCS HYPS LEG )
N70( INCREMENTAL ROTATION )
IF[#110EQ90]GOTO80
GOTO980
(#103=[#111]+[#100])
(#133=[#112]+[#130])


N80( ABSOLUTE ROTATION )
N300
N90( NEW VALUES C,X,Y )
#104=[#100]+[#101]( ADD 2 ROTATIONS TOGETHER )
#105=[sIN[#104]]*[#102]( RECALCS X )
#106=[COS[#104]]*[#102]( RECALCS Y )
#137=[#500]+[#105]( RECALCS X FROM HOME)
#138=[#501]+[#106]( RECALCS Y FROM HOME)
#145=[#137]-[#500]
#146=[#138]-[#501]
N300
(***************************)
(**FOR A CALC **)
#131=ATAN[#146]/[#142]( CALCS ANGLE )
#132=SQRT[[#146*#146]+[#142*#142]]( CALCS HYPS LEG )
N300
N90( NEW VALUES A,Y,Z )
#134=[#133]-[#131]( ADD 2 ROTATIONS TOGETHER )
#135=[sIN[#134]]*[#132]( RECALCS Y )
#135=[#135]*[-1.0]
#136=[COS[#134]]*[#132]( RECALCS Z )
N300



(*********UPDATES OFFSETS **************)
N100( UPDATE G58 )
#5301=#137( UPDATES X )
#5302=[#501+#135]( UPDATES Y )
#5303=[#502+#136]( UPDATES Z )
#5304=#143( UPDATES A )
#5305=#144( UPDATES C )



GOTO1000
( **** THESE ARE ALARMS ****)
N950#3000=151( NO WORK CORD.SPECIFIED )
N960#3000=152( THIS WORK CORD. IS RES. )
N970#3000=153( A VALUE IS NOT PROPER )
N980#3000=154( NO G91 ALLOWED )
N1000
M69
G0G90G58C#103
G1C[#103-3.]F100.
C#103
M68
M11
G0G90G58A#130
G1A[#130-1.]F100.
A#130
M10
G00
N1100M99
M30

  • Like 2
Link to comment
Share on other sites

Ok, so I think I have this re-done for something pretty close to what you want. BUT IT HAS NOT BEEN PROVEN ON THE MACHINE YET.

 

SO what I would do is load it in the machine then MDI the G65 P9998 A45, and then your G59 should be re-calculated to your current X, Y, Z zero on your part. You can use a tooling ball and an indicator to verify that it is calculating correctly.

 

Macro information:

  • With this macro there is no need to set zero at center of rotation
  • Used for the 4th axis rotating around the -X-
  • Uses G59 so operator cannot use that offset
  • When the macro run you will be in G59, so DON’T RECALL any other offset in your code until tool change.
  • You do not need to cancel the macro, just G65 P9998 to your next position
  • Macro is for positional ONLY, it’s won’t work for full 4
  • You must set variable #501 and #502 in the macro so that the macro knows where true center line is ( and if you move the 4th axis indexer, you’ll need to find those positions and modify them in the macro again)
  • This macro assumes A- is clockwise and vise-versa, if your -A- axis is opposite, you’ll need to correct the math to flip the sign for the calculated -Y- and -Z-
  • You must re-position in X, Y, and Z after macro runs to move to the correct position.

PLEASE, PLEASE, PLEASE, double check my math and make whatever corrections are needed. I have not tested these changes on the machine.

 

 

%
O9998(MORI 4TH AXIS)
( G65 P9998 A )
( A = ROTATION )
( MACHINE USING G59 )
(CHECK ZEROS)
#501=-10.( IS CENTER LINE OF ROT IN Y )
#502=-12.( IS CENTER LINE OF ROT IN Z )
#130=#1( TRANSFERS THE A TO 130 AND 133 )
#133=#1
#135=0 (INIT TO ZERO 135)
IF[#4014EQ59.]GOTO5 (I BELIEVE THIS LINE NEEDS TO BE KILLED )
#121=#4014( FINDS THE CURRENT OFFSET )

N05
#110=#4003( FIND G90 OR G91)
#112=#5004( FIND CURRENT A )
IF[#121LT54.]GOTO950
IF[#121EQ54.]THEN#135=5220
IF[#121EQ55.]THEN#135=5240
IF[#121EQ56.]THEN#135=5260
IF[#121EQ57.]THEN#135=5280
IF[#121EQ58.]THEN#135=5300
IF[#121EQ59.]GOTO960
IF[#110EQ91]GOTO980 (G91 ERROR)


#141=[#[#135+2]-#501]( IS Y AXIS )
#142=[#[#135+3]-#502]( IS Z AXIS )
#143=#[#135+4]( IS A AXIS )

N20
(***********************************)
(********** CACLULATIONS ***********)
(***********************************)
N60( ANGLE, HYP. )
#101=ATAN[#141]/[#142]( CALCS ANGLE )
#101=[#101]-360.
#102=SQRT[[#141*#141]+[#142*#142]]( CALCS HYPS LEG )

N90( NEW VALUES A,Y,Z )
#134=[#133]-[#101]( ADD 2 ROTATIONS TOGETHER )
#135=[sIN[#134]]*[#102]( RECALCS Y )
#135=[#135]*[-1.0] (FLIP SIGN)
#136=[COS[#134]]*[#102]( RECALCS Z )



(*********UPDATES OFFSETS **************)
N100( UPDATE G59 )
#5321=[#[#135+1]( TRANSFERS X - NO NEED TO MODIFY )
#5322=[#501+#135]( UPDATES Y )
#5323=[#502+#136]( UPDATES Z )
#5324=#143( UPDATES A )
GOTO1000
( **** THESE ARE ALARMS ****)
N950#3000=151( NO WORK CORD.SPECIFIED )
N960#3000=152( THIS WORK CORD. IS RES. )
N970#3000=153( A VALUE IS NOT PROPER )
N980#3000=154( NO G91 ALLOWED )
N1000
M11(UNLOCK)
G0G90G59A#130
G1A[#130-3.]F100. ( TO REMOVE BACKLASH)
A#130 ( TO REMOVE BACKLASH)
M10 (LOCK)
G00
M99
M30%

 

Good luck, and let me know if I can help with anything else.

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