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:

Generic fanuc 5X post


Recommended Posts

The value of 'no$' is zero, and 'yes$' is one.

 

Many of the 3X and 4X posts use 'automated routines' inside MP DLL, to calculate values for output. They also rely on Modality, which MP DLL handles.

 

The 5X post "shuts off" these automatic routines at the top of the PST file. This is due to the fact that the 5X post creates and maintains large lists of variables, and makes many references back and forth to these lists.

 

The 5X post has logic and variables to trigger "motion break-up routines", where the logic in the post will "detect" a large rotary move, and create "intermediate vectors" as positions to help the machine move from one position to the next, without causing a gouge.

 

There are also "Rotary Travel Limits" you can set, and when the post detects you have hit, or are about to hit, the limit, it will trigger a "rotary unwind" sequence. Typically this is used on 5X Gantry Router or Milling machines to retract, unwind the head, and approach the part, to continue the cut.

 

All these math routines require the use of hundreds of variables. The "output" variables are actually tied to the "calculation" variables through the use of Global Formulas.

 

So the post, as you have seen, disables things like "update the previous variable value" routine. And it turns off "MP's automatic breakup" of XY and Z Motion, because the internal routines track all of that stuff.

 

There are many internal routines in the PSB file that calculate and keep track of variables. I can tell you with 100% certainty, that all of the output to the NC File from the 5X post comes from the PST section of the combined instruction list.

 

So although there is a significant portion of the post that is "locked", there is always a way to override the processing, if you know how the post works.

 

That is what I taught in my 5X post class. We covered how to set up the post for 2 of the main machine types: head/head or Gantry machines, and table/table or Trunnion machines. We also covered the Miscellaneous Values. This post uses the Misc Integers and Real Numbers to "pass data" to the post about the programmer's intentions. Finally we talked about the post block calling order, and how and where to override the processing in order to get the output you want.

Link to comment
Share on other sites

The variables are not put into buffers. There are simply lists of them that are initialized and held in memory. There are routines that run and calculate values. Based on some processing logic and timing, the Post essentially knows the current move, the next move, and the previous move.

 

All of these positions are stored as Vectors. A Vector is just a triplet of variables. There is a variable to hold the X value, another to hold the Y value, and a third for the Z value. You can think of a Vector, any Vector, as a 3D point in space. For our Tool Axis Vector, (which represents the center line of the tool, satrting at the Tool Tip, and going through the center of the Tool Shank), the Tool Centerline is given to us on the NCI G-code 11 line. You get the XYZ dimensions of the tool tip. (We store this point/vector, in 3 variables.). We also get the UVW values of the top of the Tool Vector. This means we can calculate a new "unitized" vector, from the UVW XYZ values.

 

You probably already know this, but for anyone else reading this: a 3D vector with a "3D length" of "1" unit, has special mathematical properties. It can be used with special Math Functions in the MP Language to calculate not only positions, but also angles. For example, MP uses the 'atan2' function, with 2 vector components supplied as the "input" parameters, to produce an angle in the 0-360 range.

 

In the MP Language, we can also define a Matrix, which gives us the 3 Unit Vectors of an orthogonal Coordinate System. We define the X Axis, Y Axis, and Z Axis Vectors, each using 3 variables. So with an ordered list of 9 decimal numbers, we can orient a 3D Coordinate System in space.

 

The Generic Fanuc 5X Mill Post uses the Machine Base Matrix to define "the orientation of the machine axes", relative to the "world", using the Right Hand Rule. Stick your right hand out in front of you, level with your eyes. Point your thumb towards the right and is level with the ground. This is "X Positive". Your first finger points "away from you", and is level with the ground. This is the "Y Positive" axis. Your middle finger points up vertically, towards the ceiling. This represents the "Z Positive" axis.

 

So, based on those conventions, if we have a "vertical" machine, say a Gantry, with a standard coordinate system, our Machine Base Matrix would look like this:

 

matb1$ : 1

matb2$ : 0

matb3$ : 0

matb4$ : 0

matb5$ : 1

matb6$ : 0

matb7$ : 0

matb8$ : 0

matb9$ : 1

 

X-Axis:

matb1$ : 1

matb2$ : 0

matb3$ : 0

 

Y-Axis:

matb4$ : 0

matb5$ : 1

matb6$ : 0

 

Z-Axis:

matb7$ : 0

matb8$ : 0

matb9$ : 1

 

A Horizontal machine would look like this:

X-Axis:

matb1$ : 1

matb2$ : 0

matb3$ : 0

 

Y-Axis:

matb4$ : 0

matb5$ : 0

matb6$ : 1

 

Z-Axis:

matb7$ : 0

matb8$ : -1

matb9$ : 0

 

To follow up with what you asked previously, MP just keeps lists of variables, makes calculations, and compares values. Only when output has finally occurred, does the post update "previous values", using the Force Update (!) Variable Modifier.

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

I modified the generic Fanuc 5 axis post, so suit an Okuma MU500V-II 5 axis mill. I implemented Okumas Fixture Offset function (same as Fanucs G68.2 tilted plane), but one thing I found, was the rotary values didn't "reset" at a null toolchange.

The only way I managed to get around it, was to force a toolchange at every operation, and then set up to post to output the actual toolchange sequences where necessary. The same applied to the addition of TCPC.

 

It is something I need to revisit, as I would really like to tidy up. Some time I will get around to it. Hopefully, you wont encounter that issue :)

  • Like 1
Link to comment
Share on other sites

To "do it right" you need to use the "Top Map" section of the post. That way the post goes through the correct "internal" routines. I'll see if I can dig out one of my G68.2 Posts when I get home and post up how I did it. It won't be until next week though, because I'm in Maui. B)

 

Why are you logging into this place? Enjoy yourself.

  • Like 2
Link to comment
Share on other sites

To "do it right" you need to use the "Top Map" section of the post. That way the post goes through the correct "internal" routines. I'll see if I can dig out one of my G68.2 Posts when I get home and post up how I did it. It won't be until next week though, because I'm in Maui. B)

That sounds like a rough row to hoe :sweat:. Have fun!

Link to comment
Share on other sites

Why are you logging into this place? Enjoy yourself.

 

I can relate to Colin´s attitude. When you love this trade so much and feel so fortunate to have friends like we have here, it´s addictive to check it out a few times per day.

 

eMastercam is somehow a jewel in the web. But only a tiny fraction of the web users are able to understand why.

  • Like 3
Link to comment
Share on other sites

Well good for you then making sure you are keeping your fun time separate from your work time my friend. Have fun be safe and talk to you soon.

Well, I'm fortunate to say that there's a lot of fun in my work as well. Going through a bad boss currently but that's circunstancial. Most things in life shall pass, but my love for this trade shall not.

Link to comment
Share on other sites

Does anyone have a snippet of code from a modified Generic Fanuc 5X Mill post that outputs G68.2 tilted planes?

I'd love to see how it is supposed to output so that maybe I can get the functionality working on mine.

you got mail.

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