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:

Method for calculating workoffsets for 4th axis?


Sticky
 Share

Recommended Posts

I am wondering what you guys are doing for calculating workoffsets for new planes in MC.

 

I am programming a hmc TOP/FRONT style.

 

I am getting an increasing amount of low volume work that involves machining and blending lots of angles, and my current method is much too slow.

 

What I am doing now is probing out my part on the machine, and calculating the distance from my center of rotation to my part as located in the machine. I then shift my part in MC the same distance, so that my part is sitting in MC space the same distance from my center of rotation (top plane) as it is in my machine. I then create custom WCS for all of the different planes I need, and use the value in the WCS manager for the new planes to calculate my machine coordinates, and then do a MNP to enter the workoffsets via G10 at the beginning of the program.

 

It does work, but I can't help but think there is a better way.

 

IIRC in another cam system I could just enter my center of rotation, part location (machine coordinates) and either the program or the post would calculate all my offsets.

  • Like 1
Link to comment
Share on other sites

Why make it so hard?

 

If you know where center of rotation is to your part then why not use one Offset one WCS and then use the T-C Planes for what they were designed for which IMHO is indexing. I love WCS and for down and dirty work will use it on 3 axis. For anything else I use one WCS and done.

 

FYI Mastercam can do the very thing you just mentioned thing is have you talked to your dealer about your needs or just do like a lot of people assume Mastercam can't?

  • Like 2
Link to comment
Share on other sites

Lots of different ways to do it. A lot of people just put the machine center of rotation as the only offset for the entire program. Your part just has to be placed accurately in the machine, and away you go.

 

There's a nice thread in the post forum about having MC calculate and output your G10s based on the Tplane angles and origins, which is something I plan to implement, but haven't got around to it.

 

Other people have pretty nifty macros for rotating the coordinate system. I've seen some that recalculate G54 at every B rotation, which I don't like - and I've seen others that take G54 and populate the other offsets based on the angles and desired work offset number you input during the macro call.....which is pretty awesome.

 

 

What I've been doing lately because I'm lazy, is just placing a block of G10 calls that set all of the offsets I'm going to use at the center of rotation, on the top of the pallet. Then I have a block of incremental G10s that shift each of those to the actual origin that's desired. This just happens to be the exact same XYZ numbers that come up when you use "Analyze>Distance", and select the center of your pallet - and the origin of your part while in that particular tool plane. Not exactly automated, but it's better than finding stuff at the machine.

Link to comment
Share on other sites

I agree with one WCS but still like to use different work offsets for all my planes (rotations) so the numbers in my program match my print. (Granted you need all dimensions to come off a similiar datum point). For setting my COR I find out where the center of the table is comparative to machine zero multiply that by 2 than subtract where my datum lies on the machine. This gives me the shift needed to set all other co-ordinates no matter what the plane is.

 

I hear you can change your machine zero to your COR but never attempted it, was always to worried how that would effect tool change position so I just do the math.

Link to comment
Share on other sites

 

 

If you know where center of rotation is to your part then why not use one Offset one WCS and then use the T-C Planes for what they were designed for which IMHO is indexing.

 

The guy that trained me on 4th axis work taught me to do it this way. :unworthy:

Link to comment
Share on other sites

Its several ways to do it, this is one of the easiest if you prefer having the system keep up with the origin. If you set it up in Mastercam with the center of rotation like it is on the machine, This method you will have to change your post to output the tool plane origin (tox, toy, toz) in a G10 format at tool change and null tool change, you will end up with the new tool plane origin every time you rotate. this way you can keep the same workoffset number for each part as you rotate and use the same part zero as you rotate.

 

Example: This is machining load 1 G54 at B315., then machine load 2 G55 at B45. and B225.

 

N38T9038(INSERTED MILL)

M6

G10L2P1X8.086Y16.677Z-.73(WORK OFFSET ROTATION)

M11

G0G90G54B315.M8

M10

G0G90G54X.2854Y1.7016S1653M3T9009

G43H99Z5.0025

G1Z4.9025F13.

Y.7567F26.

Y-.3308

X1.8602

Z5.0025

G0X.2854Y1.7016

G1Z4.88F13.

Y.7567F26.

Y-.3308

X1.8602

Z4.98

G0Z5.0025

Z6.88

Z12.

G10L2P2X-8.081Y16.77Z-.326(WORK OFFSET ROTATION)

M11

G0G90G55X-1.6113Y-2.8191B45.

Z.833

M10

G1Z.733F13.

X-.6664F26.

Y3.5261

Y4.471

Z.833

G0Z2.833

Z12.

G10L2P2X8.081Y16.77Z.326(WORK OFFSET ROTATION)

M11

G0G90G55B225.

M10

X.6664

Z.407

G1Z.307F13.

Y3.5261F26.

Y-2.8191

X1.6113

Z.407

G0Z2.407

M5

G0G91G30Z0.M9

G0G91G30X0.Y0.

M30

 

Link to comment
Share on other sites

It may be a little different for your post, but this way the offset that is output as the G10 is calculated from the pallet centerline and pallet surface.

 

Add this near the format section

# --------------------------------------------------------------------------

# Custom / NC output Variable Formats for G10 work offsets

# --------------------------------------------------------------------------

fmt P 4 pnum #G10 P Number for work offset

fmt P 4 plnum #G10 P Number for extended work offset

fmt X 2 tox$ #G10 work offset X position output

fmt Y 2 toy$ #G10 work offset Y position output

fmt Z 2 toz$ #G10 work offset Z position output

 

# --------------------------------------------------------------------------

 

Add this at tool change and Null tool change

 

pbld, n$, "G10", p_num, *tox$,*toy$,*toz$, "(WORK OFFSET ROTATION)", e$

 

 

Add this near the pwcs section

#------------------------------------------------------------------------------

# WKORK OFFSETS G10 OUTPUT

#------------------------------------------------------------------------------

p_num #G10"P" Number

if wcstype = two | wcstype > three,

[

pnum = workofs$

if sav_mi8 = 1, workofs$ = sav_pnum

]

if pnum < 6,

[

pnum = workofs$ + 1

"L2", *pnum

]

else,

[

plnum = pnum - 5

"L20", *plnum

]

 

#------------------------------------------------------------------------------

 

Link to comment
Share on other sites

We run the 1x wcs and use new T/C planes for each rotation.

But we have a separate G# for each face (ie TOP A0 G54, Front A270 G55 etc). This allows for fixtures not exactly on centre of rotation or backlash in rotary or whatever.

We also move the Z zero to the top of the part on each face (using OPS manager). This works best for us as it allows us to easily work out clearances and retracts for index moves etc.

Link to comment
Share on other sites

Why make it so hard?

 

If you know where center of rotation is to your part then why not use one Offset one WCS and then use the T-C Planes for what they were designed for which IMHO is indexing. I love WCS and for down and dirty work will use it on 3 axis. For anything else I use one WCS and done.

 

FYI Mastercam can do the very thing you just mentioned thing is have you talked to your dealer about your needs or just do like a lot of people assume Mastercam can't?

 

If anything is down and dirty its just using COR as single workoffset, which isn't always a bad thing. But this hmc is in a large FMS, we need the control of extra work offsets for mutli plane work, as we are doing more castings and forgings, and these features aren't always in the same position, and aren't always tied back to features on a different plane. Not too mention how much it sucks proving out a 8 hour program that is programmed COR only, and making any small adjustments often requires reposting etc.

 

Flame suit on :)

 

I think its pretty obvious I wasn't just assuming Mastercam couldn't do it, as you are suggesting. I am her eto find out HOW I can make Mastercam do what I want ;)

 

 

Lots of different ways to do it. A lot of people just put the machine center of rotation as the only offset for the entire program. Your part just has to be placed accurately in the machine, and away you go.

 

There's a nice thread in the post forum about having MC calculate and output your G10s based on the Tplane angles and origins, which is something I plan to implement, but haven't got around to it.

 

Other people have pretty nifty macros for rotating the coordinate system. I've seen some that recalculate G54 at every B rotation, which I don't like - and I've seen others that take G54 and populate the other offsets based on the angles and desired work offset number you input during the macro call.....which is pretty awesome.

 

 

What I've been doing lately because I'm lazy, is just placing a block of G10 calls that set all of the offsets I'm going to use at the center of rotation, on the top of the pallet. Then I have a block of incremental G10s that shift each of those to the actual origin that's desired. This just happens to be the exact same XYZ numbers that come up when you use "Analyze>Distance", and select the center of your pallet - and the origin of your part while in that particular tool plane. Not exactly automated, but it's better than finding stuff at the machine.

 

Joe, I am assuming this is the thread you are referring to:

http://www.emasterca...showtopic=60341

 

I came across that one about this time last year, and just haven't hounded In House enough to get it done for me. My reseller emailed me yesterday saying he got it working, and we are going to try it out next week. I'm hoping we can also get all my extended offsets working and with a ton of luck maybe even get the view manager to use my actual offset numbers instead of -1 and up etc.

 

I agree with one WCS but still like to use different work offsets for all my planes (rotations) so the numbers in my program match my print. (Granted you need all dimensions to come off a similiar datum point). For setting my COR I find out where the center of the table is comparative to machine zero multiply that by 2 than subtract where my datum lies on the machine. This gives me the shift needed to set all other co-ordinates no matter what the plane is.

 

I hear you can change your machine zero to your COR but never attempted it, was always to worried how that would effect tool change position so I just do the math.

 

Center of the pallet is not center of rotation...

 

But I am with you on having my display numbers matching the numbers on the print, particularly on parts with lots of features or long cycle times.

 

When I got this machine it was setup with the machine zero set at COR, and it was programmed mostly in a combination of Macro and C or C+, but I had to dumb it down to something I actually understood. It was the first time I had worked on a milling machine that had been programmed in C language.

 

 

 

FNMI, thanks for the post blocks. I think this is what my reseller will be using to get me up and going.

Link to comment
Share on other sites

No flame suit needed, but you have a process you need some adjustable process with. Still think it could be made easier and sounds like a probe or something to make measurements and then apply the differences to your situation could be taken into account. Need to narrow done how to give flexibility, ease of programming and then ways to get what you need done. Way it was put let me to think you had not reached out so apologize I understood it that way. Be interested in seeing how your process could be maximized with allowing the flexibility you are looking for. Many different thoughts already have come from the thread which I find encouraging. Be interesting to see where to goes and how it can help move this in the right direction for you.

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

I Have used this for the last 15 years on Fanuc and Haas. It can be used with a probe or stand alone. I wouldnt use one WCS unless its full 4th work.

 

basically you pick up G54 xyz and adjust the macro var to G55, G56, G57 ect angles. the macro writes the positions in the background and its fully adj for XYZ inc shifts so you can really dial in blends adn true pos.

 

contact your local machine reller for more info. I belive Hennry Larier from selway in union city wrote this version.

 

 

 

(****G10 INFORMATION START****)

G90

M98 P9002

G10 L2 P1 X-4. Y-4.5475 Z6. A0.

G65 P9018 A54. B-41.559 C55.

G65 P9018 A54. B80. C56.

(****G10 INFORMATION END****)

 

 

example of shift

 

(****G10 INFORMATION START****)

G90

M98 P9002

G10 L2 P1 X-4. Y-4.5475 Z6. A0.

G65 P9018 A54. B-41.559 C55. X.001 Z.003 ( X SHIFTED .001 AND Z BACKED OFF .003)

G65 P9018 A54. B0. C56. Y.0005 ( Y SHIFTED UP .0005)

(****G10 INFORMATION END****)

Dynamic Work Offset Rotation Manual.doc

Link to comment
Share on other sites

I set X and Z to pallet center and Y off the pallet surface and calculate my G10 offsets from there.

 

Ok so if the post is calculating the Y offset from the pallet surface that would mean when I set my part in Mastercam the Y axis orgin on my part needs to be offset the distance from the pallet center to the machine coordinates for the part?

 

IE, top of pallet in Y-25.62", the Y orgin I want to use on the part is located in the machine at Y-10.00", I would need to shift my wcs in MC Y+ 15.62"?

Link to comment
Share on other sites

We use a rotation macro inside the machine that calculates where the zero is in relationship to the zero on the part. Then at every rotation, the macro does the simple trig, and puts the new offset numbers into G59. This way we program everything assuming the part zero is always at centerline of rotation. Makes things very simple to program and to setup.

 

But this will only works with positional rotations, not full 4th axis.

Link to comment
Share on other sites

Ok I spoke a little too soon. The actual coordinates posted in G10 are correct, but the wcs values and G10 extension don't jive. Right now if my WCS is set to "1" my G10 will call "P1" (which writes to G54), but the posted code is still calling G55.

 

This is one thing that has always drove me nuts about the WCS. I don't understand why they start with 0-5 for G54-59, when every Fanuc control out there uses 1-6 for G54-59.

 

One option is to have the WCS and post output 1 outputs 54, 3 outputs 56 etc. OR actually just entering the actual offset in the WCS, G54 outputs G54 etc But I'm not sure what is best, opinions?

 

Then from there for option one, extended offsets could be 102 outputs G54 J/P2 304 outputs G56 J/P4 etc

 

And the other way you could just physically type in the extension, G54J/P2 outputs G54J/P2 etc.

 

Curious to know what you guys are doing :)

Link to comment
Share on other sites

Well by way of an update, we now have the wcs and post outputting the way I think it should be ;)

 

1=54

2=55

3=56

4=57

5=58

6=59

 

I'm really quite happy about that, saves confusion because now the values equal G10 commands and probe writing commands:)

It was quite easy to change too, just needed to go into the post and tell it to start counting from G53 instead G54.

 

And the G10 output is so kick@ss. I really love being able to just position my part in MC the distance from COR and have it automatically calculate and post all my new work offsets for me. What a time saver, should make for quicker setups too because it probably won't fat finger an extra number in an offset or put something in backwards...

 

I have a few jobs coming up in the next couple weeks though that are going to need between 20-80 offsets, so I really need to get my extended offsets going. So if anyone has any recommendations there I would love to hear them.

Link to comment
Share on other sites
  • 1 month later...

So I have a problem, I am assuming its the way my post is setup, but maybe you guys can clarify?

 

I have two parts sitting on a tombstone, they are the same part #, one part is setup for Op1 on B0, the other part is setup for Op2 on B180.

 

These parts are weldments, and are not flat or square in any direction.

 

My intent, is to probe each face and write the new work offset (because they will be different for each part), and then perform the work on that plane.

 

What I have done is setup new WCS' for each B axis index, which I created by geometry to associate them to the model, so that I could have the parts fully programmed before actually mounting them to a tombstone and finding their positions on the machine.

 

Now I have found their positions on the machine, and offset the two parts from my center of rotation in Mastercam so that my post can create the correct offsets for each plane.

 

Here is my Op1 part mounted on B0:

 

post-40824-0-16114100-1399168054_thumb.jpg

 

And the Op2 part that is mounted on B180, but this wcs is on B90:

 

post-40824-0-02545100-1399168068_thumb.jpg

 

And the same Op2 part mounted on B180, but now the B270 wcs:

 

post-40824-0-45366000-1399168080_thumb.jpg

 

On all of my tool paths I have "Working coordinate system" set to TOP, and the Tool plane and Construction plane set to what custom wcs I made for the plane.

 

The problem is that the G10 values that are being output are only correct for the part at B0. If I create any additional wcs's for doing side work on my B0 part my G10 offsets are fine.

 

The post output G10 X and Z values are out to lunch for the part on B180, for both the B90 and B270 offsets.

 

I am wondering how I am supposed to have parts not in the FRONT space, and set ups wcs' for them, and get this G10 output to work :)

Link to comment
Share on other sites

I'm assuming the control doesn't have DFO (Dynamic fixture offset) capability? If it does then DFO solves most of the problems as the machine control calculated everything on the fly, even full 4th machining. I probe to the part then enter the probed values in my program header. These post automatically and are set to B-axis center of rotation and Y0. by default so if the part isn't programmed to COR I need to edit. I usually only have to do this once and the program resides on the machine for future runs. If it is on another face of the tombstone or there is a minor shift I just edit the header (B-axis is #583) and hit cycle start. I also have an input for the program's pallet assignment so it will not mistakenly run with the wrong pallet in the machine. The header inputs all of the G10 information for the work offset and the dynamic work offset to reduce operator headache. Some of the M-codes call macros that verify pallets etc...

 

#575=1 (PROGRAM PALLET ASSIGNMENT)
M556 (PROGRAM PALLET VERIFY)
#580=-1.86693 (PART X POSITION)
#581=-11.05348 (PART Y POSITION)
#582=-19.49435 (PART Z POSITION)
#583=.004 (PART B POSITION)
#584=0 (PART C POSITION)
G53
G90 G10 L2 P1 X0. Y-14.17260 Z-29.13385 B#583 C#584
G90 G10 L21 P1 X#580 Y[#581+14.17260] Z[#582+29.13385] B0.0 C0.0

 

 

5-axis DFO example.

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