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 post help


Recommended Posts

Well I went to my reseller and asked for some help setting up a new post for my horizontals. It's a straight forward 4 axis horizontal with an aftermarket indexer bolted onto the B axis and run from a controller box. They were helpful to the point where I started getting some pretty serious errors in certain programs. Then they asked for cash for a custom post. I think that this post is close to working correctly so I have been doing a little investigation in my spare time. This is what I have found. If I am working from B0 or B90 everything seems to work great, I can rotate the indexer with either a custom view or transform equally well. If however I rotate the B axis and the indexer to a compound angle and then post multiple toolpaths at the same time the code seems to be rotated about the z axis and my rotary axis values are bogus. Below is a example of the output. I'm hoping that one of you wizards out there can help point me in the correct direction. BTW this post is based on the generic Mastercam 5 axis post.

 

N4(      3/4 DIA. X .030 RAD STUB VARIMILL |TOOL - 4|DIA. OFF. - 4|LEN. - 4|TOOL DIA. - .75)
M11(UNLOCK)
T4
M6
M8
G0G57G90X1.0253Y-.9812B45.(A0.)
S713M3
M10(LOCK)
G43H4Z.5
Z.3121
G1Z.1414F50.
Y.7812F8.56
G0Z.5
M11(UNLOCK)
B315.M20(A324.)    ********THIS POSITION AND CODE SHOULD LOOK LIKE N400 BELOW
M10(LOCK)
X-1.1253Y.9812
Z.3121
G1Z.1414F50.
Y-.7812F8.56
G0Z.5
M9
M5
G0G28G91Z0.
G0G28X0.Y0.
M11(UNLOCK)
M30
%


N400 POSTED BY ITSELF

N400(      3/4 DIA. X .030 RAD STUB VARIMILL |TOOL - 4|DIA. OFF. - 4|LEN. - 4|TOOL DIA. - .75)
M11(UNLOCK)
T4
M6
M8
G0G57G90X1.1253Y-.9812B45.M20(A144.)
S713M3
M10(LOCK)
G43H4Z.5
Z.3121
G1Z.1414F50.
Y.7812F8.56
G0Z.5
M9
M5
G0G28G91Z0.
G0G28X0.Y0.
M11(UNLOCK)
M30
%
 

  • Like 2
Link to comment
Share on other sites

I used the Mastercam generic 5 axis post in the past.  The first thing you need to do is check the matrix settings. 

 

#Machine base matrix (Base matrix to map positions into)
matb1       : 1          
matb2       : 0         
matb3       : 0          
matb4       : 0          
matb5       : 1          
matb6       : 0          
matb7       : 0          
matb8       : 0          
matb9       : 1 

 

Matrix values depend on your axis combinations, I set one up like this before:

#Machine base matrix (Base matrix to map positions into)
matb1       : 0          
matb2       : 1          
matb3       : 0          
matb4       : -1          
matb5       : 0          
matb6       : 0          
matb7       : 0          
matb8       : 0          
matb9       : 1 

 

Make a simple program to test if all angles in 90 degree increments are correct.

 

One thing to note is that with the generic 5x post, it will flip things around on you.  The machining may be correct but the code will appear wrong.  Case in point, if I was to post 3 toolpaths individually, they all look good.  Say B0C0, B-90.C90., B0C0.  Now post them together and get B0C0, B-90.C90., B0C90.  If you dig a little deeper, you should find that your X and Y values are rotated 90 degrees.  This is because the post is calculating for the most efficient cycle and eliminating that one C axis index.  Just a little background info.  It looks like in your case, based on your sample code, that this would all be solved with your matrix settings.

Link to comment
Share on other sites

One thing I forgot to mention...

matb1-matb3  - only one of these can be a 1 or -1, the other two need to be 0, unless you have a really wild axis config

matb4-matb6 - what ever digit was not 0, needs to be

matb7-matb9 - which ever one has not had any value other than 0 needs it now.

 

Think of as if 1-3 represents which axis is your programmed X

4-6 which axis is your programmed Y

7-9 which axis is your programmed Z

Link to comment
Share on other sites

This is what I currently have in my post settings

 

matb1$       : 1
matb2$       : 0
matb3$       : 0
matb4$       : 0
matb5$       : 0
matb6$       : 1
matb7$       : 0
matb8$       : -1
matb9$       : 0
 

 

I checked in help and found nada about machine base matrix. I'm actually surprised that this is in the post and not set in the machine definition. are there any reference materials  out there for me to read?

Link to comment
Share on other sites

I had to figure it out years ago, with no support from my reseller, and no forums to go to.  A little  (lot) of trial and error and I found what worked.  The biggest thing was having a test program to post and check the results to get what I needed.  If your rotating about the X and Y then the standard set up should work.

 

I have two posts that are this way, on a vertical mill rotating about X and Y:

#Machine base matrix (Base matrix to map positions into)
matb1$       : 1
matb2$       : 0
matb3$       : 0
matb4$       : 0
matb5$       : 1
matb6$       : 0
matb7$       : 0
matb8$       : 0
matb9$       : 1

 

The previous that I posted was for a vertical mill rotating about the Y and Z:

#Machine base matrix (Base matrix to map positions into)
matb1       : 0          
matb2       : 1          
matb3       : 0          
matb4       : -1          
matb5       : 0          
matb6       : 0          
matb7       : 0          
matb8       : 0          
matb9       : 1 

 

Hope this points you in the right direction.

Link to comment
Share on other sites

Well, dang it. I got my reseller to send me the 5 Axis Power Point Presentation in hopes of fixing this post. The entire section about the matrix is 2 pages long with NO detail about how the darned thing is setup, just a vertical and a horizontal example. BTW the example that I posted matches the horizontal example in the power point. However, the illustration therein gives me a possible clue. It shows the indexer facing to the left at B axis home position. I have always set up the indexer with the indexer spindle facing the Z axis.  

Link to comment
Share on other sites

The matrix is pretty simple. You get 9 ordered variables, that describe the endpoints of 3 different vectors; X, Y, and Z.

 

I think the reason they don't give much detail on these variables is that there are really only two possible settings; either VMC or HMC. The Machine Base Matrix only controls the relationship of your machine Spindle, relative to your WCS "TOP" setup. (Let's assume for this discussion that we have moved the part to the SYSTEM TOP WCS, and we aren't working out in space somewhere with a local WCS. It just makes the visualization easier.)

 

The rotary settings are setup independently from the Machine Base Matrix, so don't worry about those yet.

 

Here are the typical settings for both a VMC and an HMC setup in the Gen Fan 5X Mill Post. Note that you would only have ONE matrix defined inside your post, and would switch the settings if you wanted to go from VMC to HMC, or vise-versa:

#Machine base matrix (Base matrix to map positions into)
#COMMON SETUP FOR A HMC-STYLE 5X Machine. (Spindle is aligned to the FRONT TOOLPLANE VIEW FOR ROTARY ZERO)
matb1$       : 1
matb2$       : 0
matb3$       : 0
matb4$       : 0
matb5$       : 0
matb6$       : 1
matb7$       : 0
matb8$       : -1
matb9$       : 0

#Machine base matrix (Base matrix to map positions into)
#COMMON SETUP FOR A VMC-STYLE 5X Machine. (Spindle is aligned to the TOP TOOLPLANE VIEW FOR ROTARY ZERO)
matb1$       : 1
matb2$       : 0
matb3$       : 0
matb4$       : 0
matb5$       : 1
matb6$       : 0
matb7$       : 0
matb8$       : 0
matb9$       : 1

When you look at the Matrix values, the first three variables define the orientation of the X Axis. Notice that for all three axes, the setting for each variable is either 1 or 0. The matrix is designed to have you use orthogonal axis definitions. (Each axis must be 90 degrees to the other two axes being defined.)

 

So the X axis would be:

matb1$       : 1
matb2$       : 0
matb3$       : 0

Notice that it is the same for both the VMC and HMC matrix settings. Only the Y and Z axes swap.

 

For a VMC, the Y axis is aligned with the positive Y axis of the SYSTEM TOP VIEW. Same for the Z axis.

 

Y for VMC:

matb4$       : 0
matb5$       : 1
matb6$       : 0

Z for a VMC:

matb7$       : 0
matb8$       : 0
matb9$       : 1

Note that the vector in each case points from the origin, towards the Positive axis direction

 

So for the HMC Z axis, we are saying that Positive Z points from the origin towards -Y. In other words, the Z axis of the SYSTEM FRONT View is aligned with the Z axis of the Machine Base Matrix.

 

Z for a HMC:

matb7$       : 0
matb8$       : -1
matb9$       : 0

Greg was right that HMC 5X definitions aren't as common as VMC's, but I've always used '-1' for matb8$. Otherwise, if we use '1' instead, it would make the SYSTEM BACK View the Positive Z axis direction.
 

So unless you've got a machine where +Z motion is towards the origin, a setting of '-1' for 'matb8$' is recommended.

 

Once you've got the Machine Base Matrix setup, you then need to make sure you are programming using the Front Plane as the base for your Rotary Zero.

 

To configure the Rotaries, you need to set the vector values for the Primary and Secondary axes. In your case, the Primary is the Rotary table (M-code activated), and the secondary would be the B axis table.

 

Normally when I'm setting up a 5X post, the axis with the most rotary travel is given the "primary" status.

 

Check out the PowerPoint for tips on setting the vector directions for the rotary. You will either be rotating about X, Y, or Z. The biggest hint I can give you is that you use two vectors that are perpendicular to the axis you are describing.

 

So to rotate about "X", you would not see 'vecx' in either 'rotaxis1$', or 'rotdir1$'. It would be a combination of 'vecy' and 'vecz'. (+ or -, i.e., -vecy, -vecz, or vecy, vecz).

 

The rotary vector directions are also described in terms of the SYSTEM TOP WCS view, and are not related to the Machine Base Matrix settings!!! That is really important to understand.

 

So for a primary "A" address that is a rotary, facing the spindle, it would rotate about the SYSTEM TOP WCS Y Axis. That means typically you would have:

 

rotaxis1$ : vecz

rotdir1$: vecx

 

(If the rotation direction is backwards, change the sign of the 'rotdir' variable. So 'vecx' becomes '-vecx')

 

Then the "B" axis rotates about the SYSTEM TOP WCX Z Axis, so it would be something like:

 

rotaxis2$ : vecy

rotdir2$ : vecx

 

Note that it might very well be '-vecy' for the 'rotaxis2' setting.

 

When you are doing 3+2 work, and switching from Tool Plane to Tool Plane, there are always two different rotary solutions to every position. Because of this, the post was built with 'bias' settings (mi4$ and mi5$) that allow you to pass some different settings to the rotary addresses, and have the post attempt to use those settings instead. (make sure 'bias_null' is turned on!!!)

 

If that fails, often you can use 'mi10$' to temporarily restrict the secondary axis travel range, which can help force a specific combination of rotary position values.

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

The matrix is pretty simple. You get 9 ordered variables, that describe the endpoints of 3 different vectors; X, Y, and Z.

 

I think the reason they don't give much detail on these variables is that there are really only two possible settings; either VMC or HMC. The Machine Base Matrix only controls the relationship of your machine Spindle, relative to your WCS "TOP" setup. (Let's assume for this discussion that we have moved the part to the SYSTEM TOP WCS, and we aren't working out in space somewhere with a local WCS. It just makes the visualization easier.)

 

The rotary settings are setup independently from the Machine Base Matrix, so don't worry about those yet.

 

Here are the typical settings for both a VMC and an HMC setup in the Gen Fan 5X Mill Post. Note that you would only have ONE matrix defined inside your post, and would switch the settings if you wanted to go from VMC to HMC, or vise-versa:

#Machine base matrix (Base matrix to map positions into)
#COMMON SETUP FOR A HMC-STYLE 5X Machine. (Spindle is aligned to the FRONT TOOLPLANE VIEW FOR ROTARY ZERO)
matb1$       : 1
matb2$       : 0
matb3$       : 0
matb4$       : 0
matb5$       : 0
matb6$       : 1
matb7$       : 0
matb8$       : -1
matb9$       : 0

#Machine base matrix (Base matrix to map positions into)
#COMMON SETUP FOR A VMC-STYLE 5X Machine. (Spindle is aligned to the TOP TOOLPLANE VIEW FOR ROTARY ZERO)
matb1$       : 1
matb2$       : 0
matb3$       : 0
matb4$       : 0
matb5$       : 1
matb6$       : 0
matb7$       : 0
matb8$       : 0
matb9$       : 1

When you look at the Matrix values, the first three variables define the orientation of the X Axis. Notice that for all three axes, the setting for each variable is either 1 or 0. The matrix is designed to have you use orthogonal axis definitions. (Each axis must be 90 degrees to the other two axes being defined.)

 

So the X axis would be:

matb1$       : 1
matb2$       : 0
matb3$       : 0

Notice that it is the same for both the VMC and HMC matrix settings. Only the Y and Z axes swap.

 

For a VMC, the Y axis is aligned with the positive Y axis of the SYSTEM TOP VIEW. Same for the Z axis.

 

Y for VMC:

matb4$       : 0
matb5$       : 1
matb6$       : 0

Z for a VMC:

matb7$       : 0
matb8$       : 0
matb9$       : 1

Note that the vector in each case points from the origin, towards the Positive axis direction

 

So for the HMC Z axis, we are saying that Positive Z points from the origin towards -Y. In other words, the Z axis of the SYSTEM FRONT View is aligned with the Z axis of the Machine Base Matrix.

 

Z for a HMC:

matb7$       : 0
matb8$       : -1
matb9$       : 0

Greg was right that HMC 5X definitions aren't as common as VMC's, but I've always used '-1' for matb8$. Otherwise, if we use '1' instead, it would make the SYSTEM BACK View the Positive Z axis direction.

 

So unless you've got a machine where +Z motion is towards the origin, a setting of '-1' for 'matb8$' is recommended.

 

Once you've got the Machine Base Matrix setup, you then need to make sure you are programming using the Front Plane as the base for your Rotary Zero.

 

To configure the Rotaries, you need to set the vector values for the Primary and Secondary axes. In your case, the Primary is the Rotary table (M-code activated), and the secondary would be the B axis table.

 

Normally when I'm setting up a 5X post, the axis with the most rotary travel is given the "primary" status.

 

Check out the PowerPoint for tips on setting the vector directions for the rotary. You will either be rotating about X, Y, or Z. The biggest hint I can give you is that you use two vectors that are perpendicular to the axis you are describing.

 

So to rotate about "X", you would not see 'vecx' in either 'rotaxis1$', or 'rotdir1$'. It would be a combination of 'vecy' and 'vecz'. (+ or -, i.e., -vecy, -vecz, or vecy, vecz).

 

The rotary vector directions are also described in terms of the SYSTEM TOP WCS view, and are not related to the Machine Base Matrix settings!!! That is really important to understand.

 

So for a primary "A" address that is a rotary, facing the spindle, it would rotate about the SYSTEM TOP WCS Y Axis. That means typically you would have:

 

rotaxis1$ : vecz

rotdir1$: vecx

 

(If the rotation direction is backwards, change the sign of the 'rotdir' variable. So 'vecx' becomes '-vecx')

 

Then the "B" axis rotates about the SYSTEM TOP WCX Z Axis, so it would be something like:

 

rotaxis2$ : vecy

rotdir2$ : vecx

 

Note that it might very well be '-vecy' for the 'rotaxis2' setting.

 

When you are doing 3+2 work, and switching from Tool Plane to Tool Plane, there are always two different rotary solutions to every position. Because of this, the post was built with 'bias' settings (mi4$ and mi5$) that allow you to pass some different settings to the rotary addresses, and have the post attempt to use those settings instead. (make sure 'bias_null' is turned on!!!)

 

If that fails, often you can use 'mi10$' to temporarily restrict the secondary axis travel range, which can help force a specific combination of rotary position values.

I have rotary 3+2, but the primary "A" address that is a rotary, facing the spindle, it would rotate about the SYSTEM TOP WCS X Axis.

What should I change in the post please share to me?

 

Thank you.

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