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:

B-Axis Rotation Posting Wrong Position


Reko
 Share

Recommended Posts

Mastercam 2020

************************************

This is a co-worker's problem.

I triple checked... his planes are correct.

**************************************

Main Plane = A0 B0

Secondary Plane = A90. B-40.

*************************************

When I program a 5-axis job using planes, I always force a tool change for operations with the same tool. That allows for a safe rotation for my table-table Haas to locate.

My coworker doesn't always do this... he sets a safe retract number in the post... say, Z8.000" and he says that always works... until now using MC2020.

*************************************

When I post the Main toolpath alone... it posts A0 B0... which it should.

But... when I post the operation directly above it... the Secondary... which has a plane rotation of A90. B-40. then the Main toolpath posts out at B-40. A0.

Again... posting alone... it is A0 B0 …………. but with the tool path above it selected... A0. B-40.

Crazy.

*************************************

The only think I can think is there could be something in the post telling it to remain located at B-40. because it is the shortest path.

I looked at the difference in the posted numbers in X and Y... and A0 B-40. XY numbers are different from posting the toolpath by itself ( A0,B0 ) so I believe Mastercam THINKS it is making a good program, but because my part origin is not located on center of the platter, the program is incorrect and can not be used.

************************************

Our work around is to force a tool change... that makes the main plane post out at A0 B0. so we are moving forward.

************************************

Bottom line question... is there a switch... either in the machine def, control def, or the post.... that will force the output of the main plane to ALWAYS post at A0 B0?

 

Thanks.

Link to comment
Share on other sites

Quick Answer: Kind of.

I know that is a crappy answer, so allow me to "sum up" what's going on.

The Mastercam 5-Axis Posts, in all their glory (and they do quite a bit), are not "kinematically aware" of how your machine's axes are stacked on top of each other, nor how the machine is physically built.

All of the "rotation" is pure mathematics at work, which includes the Rotary Travel Limits.

All of the math at work is Vector and Matrix Math (Linear Algebra).

With the way the math works out, a curious thing happens when the Secondary Axis is at Zero Degrees. When this happens on a trunnion machine (the platter is sitting "perpendicular to the Spindle (tool) axis", we reach what is called a "Singularity". In this case, literally any 'Primary Rotary Axis Angle' will work to keep the "tool vector vertical".

----------------------

To back up a tiny bit - if you look at the NCI output from Mastercam, all Tool Motion is either "tool plane based" or "vector based". There are zero Rotary Axis Positions output in the NCI Data. So this means all Toolplane based motion is relative to the "plane" that it was created on, and the 5-Axis Post must use the "Z-Axis Vector of the Toolplane Matrix" to calculate the Rotary Angle output.

----------------------

So what is happening is the Post is actually doing the "Secondary Axis Rotation Calculation", 1st. Then it "checks" the Tool Axis value, to see if it is aligned (within a tolerance) to the Machine Base Matrix. Since "any Primary angle" will work, the post just uses the last "B-Axis angle", and recalculates the XYZ positions, to account for that rotary value.

----------------------

The solution is basically this:

  • You have to use "Force Tool Change" switch, so that the "new Operation" flags the post, to tell it to call 'pretract'. (Null Tool Changed don't call 'pretract')
  • Inside 'pretract' there is some code (protretinc) that looks to "return the Rotaries to Zero", but only if the "Force C-Axis Initialize" switch (frc_init) is enabled.
  • So you have to have 'frc_cinit' enabled, and throw the 'Force Toolchange' switch in the individual Operation.

------------------------

That's what exists "by default" in the Generic Fanuc 5-Axis Mill Post.

But...

There are also some additional features that are built into the 5-Axis Post, which allow us to control certain output. These are set by the Miscellaneous Values variables, at the Operation Level.

We have 10 Misc. Integers, and 10 "Decimal (Real) Numbers". These integers and decimal numbers allow us to "pass data" to the Post, and have the Post "do things" based on these values.

The important ones (in this case) are:

  • MI4 and MI5.
  • Misc. Integer #4 is the "Primary Bias" switch.
  • Misc. Integer #5 is the "Secondary Bias" switch.
  • Both of these Integers allow you to pass an integer value to the Post, and have the Post "attempt to Bias the rotary" to whatever value you enter.
  • These are typically used to "pre-wind" the head on a Gantry Mill or Router, but can be used to control a specific rotary position in many cases.
  • By Default - It is not read for Null Tool Changes. You have to enable it with the Variable: 'bias_null'. (bias_null = yes$)
  • Once 'bias_null' is enabled, you can enter a Primary or Secondary value, but...
  • '0' (zero) is basically "Off".
  • So I would suggest trying "360" to see if that will keep your Primary at 0. or 360. (same position mathematically...)

Other important MI values (just not for this particular case) are:

  • MI6 = Output from Center of Rotation (WCS Zero), or Toolplane Zero (allows the use of multiple Work Offsets, but not for Vector Based Paths, "toolplane only").
  • MI7 = Global "on/off" switch for "retract behavior". Actual "retract behavior" is controlled by a combination of 'MI8', and in certain cases MR6 and "stock type" settings.
  • MI8 = Auto Generate "retract and approach" motion. (explained more below)
  • MI9 = "Temporary Secondary Axis Rotary Limit Restriction" for Vector-Based (5-Axis) Toolpaths (only)
  • MI10 = "Temporary Secondary Axis Rotary Limit Restriction" for Toolplane (3-Axis) Toolpaths (only)

I think "MI10" is one of the most useful, as it allows you to "temporarily" restrict your Secondary Axis Travel Limits, to either "positive only" or "negative only".

  • This is typically used on machines with a larger "secondary axis travel", to keep the Secondary either Positive or Negative. This is most often used on Trunnion machines to keep the platter "towards the operator", when the secondary has the ability to go +-90 (at least). For example, you might want to keep it "A-90." for all Ops. 

The "approach and retract" behavior is based on a function in the Post which allows you to define a "Safety box" around your part. This was often used for Gantry style machines, so you can make a cut on one side of the part, and only enter (for example) a 2" approach and retract from the feature you are cutting. Then use a similar approach/retract on the next toolpath, on the other side of the part. Internally (and based on the values of MI7, MI8, 'use_stock_typ', and 'clear_stck'), the Post will then add moves to "retract the tip of the tool towards the boundary (either defined with upper/lower XYZ values inside the Post), or based on your Stock Definition (method I use!!!), the tool will then go "over the top" of the box, then rotate to the new position, and finally will approach the new cut from the safe transition position.

If that wasn't confusing enough, there is also the "MR6" (Safe Retract in Z) option. This is basically only used on Trunnion style machines, but it is what your coworker is probably using.

MI8 acts as the "when do we generate a Retract/Approach move" switch. There are 5 different options (0-4), plus  there is an option to "sign the value negative", which does something, but I honestly never dug deep enough to figure out what the "signing the value negative" actually does.

Sorry for the long-winded answer, but I always try to err on the side of "more knowledge of how the system works" allows you to make more informed choices about which path to take.

 

 

 

 

 

  • Thanks 1
  • Like 5
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...