rn8849

Cannot get G68 mapping on Right-angle Head post

Recommended Posts

Hello All,

We have a right-angle head post that was purchased from our reseller for our vertical bridge mill but it is terribly clunky, it requires that we put Miscellaneous variables in to signal that the right-angle head is in use (ie 90) and then one for the tool vector and even then it does not map the coordinates such that the Z axis is in the Machine XY plane which is required for the G180 to work correctly. This G180 is a macro that I am pretty sure, at it's core, uses G68; it behaves similar to the G68.2 P1 that I used for Mazak.

I made a copy of that post (it's a five axis) and tried to get it to put out the G68 but I cannot get it. Should I be able to? That is my first question.

So, I made a copy of the Generic 5-axis Fanuc post and configured it as a table/table machine so I can get XYZ coordinates as if I am always in the top plane, I have the primary and secondary angle zero and directions set such that I am getting good code. I am using m6$ as a trigger to put out the G180 but it feels like a hack using the table/table setup when it is not.  And I really need to get rid of every s_out so that it never puts out a C code because the G180 uses C for it's fixture offset. I tried making it as a head/head machine but did not have any luck with the G68 there either. So, the second question is, am I better off sticking with the table/table hack or should I be able to use a head/head machine to get what I need? That is I suppose, dependent upon the answer to the first question, if I can get the right-angle post working or not.

Thanks in advance for any help.

Share this post


Link to post
Share on other sites
7 hours ago, rn8849 said:

Hello All,

We have a right-angle head post that was purchased from our reseller for our vertical bridge mill but it is terribly clunky, it requires that we put Miscellaneous variables in to signal that the right-angle head is in use (ie 90) and then one for the tool vector and even then it does not map the coordinates such that the Z axis is in the Machine XY plane which is required for the G180 to work correctly. This G180 is a macro that I am pretty sure, at it's core, uses G68; it behaves similar to the G68.2 P1 that I used for Mazak.

I made a copy of that post (it's a five axis) and tried to get it to put out the G68 but I cannot get it. Should I be able to? That is my first question.

So, I made a copy of the Generic 5-axis Fanuc post and configured it as a table/table machine so I can get XYZ coordinates as if I am always in the top plane, I have the primary and secondary angle zero and directions set such that I am getting good code. I am using m6$ as a trigger to put out the G180 but it feels like a hack using the table/table setup when it is not.  And I really need to get rid of every s_out so that it never puts out a C code because the G180 uses C for it's fixture offset. I tried making it as a head/head machine but did not have any luck with the G68 there either. So, the second question is, am I better off sticking with the table/table hack or should I be able to use a head/head machine to get what I need? That is I suppose, dependent upon the answer to the first question, if I can get the right-angle post working or not.

Thanks in advance for any help.

#1 Your dealer should get this resolved if they don't then make up a sample and send to Z2G with everything to posts (at) mastercam (dot) com and let them dig into it.

#2 Not easy or something that is fun to even try with the Generic Posts. I turned Post work over to the professionals years ago and focused on Programming and Processes.

  • Thanks 1
  • Like 1

Share this post


Link to post
Share on other sites

Mitsubishi MVR?

I had a really well dialed in post at one time, back in my Caterpillar days.  IIRC it was loosely based on the generic 5ax post, but had some very heavy mods made to it.  MLC wrote the initial post and I made the final edits to get it dialed in with a little help from MLC when I needed a few things exposed from the psb.  Of course it is binned to my old sim, but it's been done. 

I had it working flawlessly with head changes(regular right angle, two extended rights angles, an extended vertical spindle, + a dummy plate), head rotation angles (5 degrees), and w axis (bridge) placement, as well as compensating z for w position.  I would park my bridge for each operations requirements to keep the Z stick out to a minimum.   IIRC W position was the only misc real.  Everything else was done by other normal means.  Head # was what controlled the head it picked up.

Good luck.  I'd be glad to help if you need assistance with coming up with a code format to try and get the post to output to.

Share this post


Link to post
Share on other sites

Also, FYI you need to use G180 in order for your head calibration data to be effective.  It's not as simple as a few kinematic parameters that would potentially work with G68.2  They are specific for each 90 degree rotation.  As for in between the 90 positions, I'm not exactly sure what data it uses, or if you can set specific offsets for a special angle, I never dug into that far as I never needed any positions other than orthogonal.  I would say safely we did head calibrations once a quarter.

  • Thanks 1

Share this post


Link to post
Share on other sites
12 hours ago, huskermcdoogle said:

Mitsubishi MVR?

I had a really well dialed in post at one time, back in my Caterpillar days.  IIRC it was loosely based on the generic 5ax post, but had some very heavy mods made to it.  MLC wrote the initial post and I made the final edits to get it dialed in with a little help from MLC when I needed a few things exposed from the psb.  Of course it is binned to my old sim, but it's been done. 

I had it working flawlessly with head changes(regular right angle, two extended rights angles, an extended vertical spindle, + a dummy plate), head rotation angles (5 degrees), and w axis (bridge) placement, as well as compensating z for w position.  I would park my bridge for each operations requirements to keep the Z stick out to a minimum.   IIRC W position was the only misc real.  Everything else was done by other normal means.  Head # was what controlled the head it picked up.

Good luck.  I'd be glad to help if you need assistance with coming up with a code format to try and get the post to output to.

Husker,

You are spot on, it is an MVR, MVR-30 to be exact and the right angle head that we have also indexes in 5° increments, I wish it were the 1° but at least we have one to work with. In regard to the G68.2, I was just using that as a reference for anyone that is not familiar with the G180; it is great that you are. I fully intend to use G180, I wish I knew more about it. I asked for information about it but no one here is interested in helping me obtain it. One thing at a time though...

I will ask MLC for some help as they are our reseller. The thing that I really dislike about the current post is that I have to input a misc real for the angle, the hack post I wrote gets the angle from the work plane so I don't have the chance to forget to input it or input it incorrectly. It is possible I am not using the current post correctly, though. No one here knows much about it.

 I like the idea of using misc reals for the W axis, but there none left, the post is using every one of them. Currently, I have it setup to ask two questions when I post, one for a W clear plane and one for the W working plane which is normally zero. There are some misc integers available I think.

Thank you for your help and also thank you to 5th Axis CGI for the reply. I was not aware that I could ask CNC Software for help on a post if MLC cannot satisfy my requirements.

-Gary

Share this post


Link to post
Share on other sites

I have written posts for similar machines, but never done an MVR personally. Usually the only entry you would have to make for the RAH would be a misc value or axis combination to indicate it is being used. The post should be capable of calculating the index angle and mapping the coordinates to the programmed plane.

If you are going to attempt to do this on your own, you need to be aware of your axis orientation. X and Y motion is good, but getting the X and Y in the right direction is also important. In our posts, we recreate the plane based on the Z axis orientation to match what the machine is using, but if you are trying to keep it simple, always use toolplanes already that match the plane defined by the G180. This makes is much easier to compare the code in your backplot to the code you have generated to ensure the moves match up. Something like mpmaster that doesn't use a coordinate rotation will be able to get you pretty close just by pulling x$ values as it does. From there the main thing you need is your C-axis calculation, which can be found based on the X and Y components of the tool vector.

Share this post


Link to post
Share on other sites
2 hours ago, Alex Dales said:

In our posts, we recreate the plane based on the Z axis orientation to match what the machine is using

Will you explain this to me? I don't know how to create a plane in the post, that's a new concept for me.

2 hours ago, Alex Dales said:

but if you are trying to keep it simple, always use toolplanes already that match the plane defined by the G180

When I programmed my test part in Mastercam I made a cube and drilled holes and circle milled in the front, back, right side and top planes. I set it up as an HBM type of part such that the bottom plane would be resting upon the face of the rotary table and the front plane was my zero. I wanted the B axis angles to control the angles for the right-angle head.

xabs = vequ(x$)

I was looking at how the coordinate mapping is done (this is from the Generic Fanuc 4X Mill) but I got tripped up pretty quickly with the above statement... vequ is "vector equivalent" and makes a copy of the vector according to Mastercam's documentation... but... x$ is an X position and so is xabs so I'm lost on this already. It seems to me that vequ should need an array as an argument...?

Thanks for the reply Alex

-Gary

Share this post


Link to post
Share on other sites

by recreating the plane, I mean that we remap the coordinates to the new coordinate system created by the tilted plane function. this is different and more complicated than the simplified method of pulling the values directly from the tool plane. There is lots of online resources detailing matrix rotations and other methods that could be used, but all are pretty math intensive.

the vequ() function reads and writes a 3D vector or point. The way that it is being used here is to set the xabs series of variables (or the xabs point) to the x$ series of variables (the x$ point).

If you wanted to remove the line

xabs = vequ(x$)

you could replace it with the following three lines to achieve the same outcome

xabs = x$
yabs = y$
zabs = z$

 

 

Share this post


Link to post
Share on other sites

Question how many hours do you have trying to solve this on your own? Has the machine been sitting at any point waiting for your to figure this out? Let me guess the owner or boss think buying a post to do this is to expensive.

If you trying to learn on your own and it is not costing the company downtime then I get it, but if a project or machine is sitting waiting on this then whoever is making the decision to not purchase the post is Penny wish and $100k dumb.

  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, 5th Axis CGI said:

If you trying to learn on your own and it is not costing the company downtime then I get it, but if a project or machine is sitting waiting on this then whoever is making the decision to not purchase the post is Penny wish and $100k dumb.

I think the best results always come from doing things yourself.

Even though it takes time.. of course sometimes we have to settle..

Share this post


Link to post
Share on other sites
16 hours ago, 5th Axis CGI said:

Question how many hours do you have trying to solve this on your own? Has the machine been sitting at any point waiting for your to figure this out? Let me guess the owner or boss think buying a post to do this is to expensive.

If you trying to learn on your own and it is not costing the company downtime then I get it, but if a project or machine is sitting waiting on this then whoever is making the decision to not purchase the post is Penny wish and $100k dumb.

The machine has been running the entire time on prior operations to the ones that I need the right-angle head for. I am looking ahead. I've only been at my current job for a year and I've only had need of the right-angle head in the last month or so. Consequently I did not know anything about the post's right-angle head capabilities. The current process is to write a program in the XY plane and copy-and-paste that into a template with the proper codes to pick up the head and setup the G180. Of course that is time consuming and error prone so I want it fixed as soon as possible.

With the recent slowdown created by COVID I have had some time to work on this while I am at home. I learned long ago that the key to life is balance. That balance in business is measured by ROI - return on investment. I've often chided others for being 'penny wise and pound foolish' and I certainly do not wish to be accurately described as a hypocrite so I am very diligent to watch the time I spend on this while I am on the clock. I do most of the post work on my own, I started writing posts after taking a one-week training course for Intellipost, which was an Automation Intelligence product, in 1989 iirc. I have been writing posts ever since but mostly for two axis lathe, 3 to 4 axis mill. 

Along with getting the output the machine requires I also really enjoy getting code that is formatted exactly the way I want to see it. And the latter is a want and not a need; some get confused about that and start majoring in the minors... For instance, I have posts that use buffers and redirection to suspend the output of the tool table until the either the descriptor/properties and/or the first manual operation comes out so that I get a descriptive header right after the program number. I used sysinfo to get the programmer's Windows username and then, stripped it down to the first initial, capitalized then the last name with first letter also a capital. Next the tool table and then the rest of the program.

I have a threadmilling macro that I wrote that can do NPT and straight threads. I created a custom drill cycle to call it using tosz$, initht$, refht$, etc. with some of the drill parameters. This was a big time saver and prevented mistakes created by editing the NC code. The macro can do straight threads, single or multiple steps, NPT threads, has provision for a rough and finish pass, can be called by G65 or G66, does not use G41 so I can leadin with an arc, I do the cutter comp internally based on macro variable pulled from the current tool parameters in the machine. It does not use circular motion for the thread so I don't get an alarm for the arc endpoint lining up with the start when milling NPT, I linearalized it every one degree... overkill, I know, but a 31 control has no problem and does not lag. We used this all day every day at a former job, we milled thousands of threads with it. A typical day there would see us drill and threadmill on the order of 2,000 holes.

Additionally I created a custom drill cycle to handle some special drills that were much like gun drills. The cycle used parameters like the ones mentioned about and fed the drill in to a certain depth and feedrate using G1, then finished the hole and fed back out at another feedrate. All as per company procedure. So, the time spent developing those posts was so well spent.

And finally, I am innately curious, I enjoy many types of programming, I like math, and love to learn so this is all interesting to me.

Share this post


Link to post
Share on other sites
17 hours ago, byte said:

I think the best results always come from doing things yourself.

Not at the cost of lost machining time

Share this post


Link to post
Share on other sites
17 hours ago, byte said:

I think the best results always come from doing things yourself.

Even though it takes time.. of course sometimes we have to settle..

It sure seems to be that way, so many of the posts that I have used have been from lackluster to terribad.

I think I read somewhere in here (forum) posts that you wrote about vector math, I just looked back for a bit but could not find them. You seem to be really up on things, nice talking to you!

-Gary

 

 

6 minutes ago, JParis said:

Not at the cost of lost machining time

 

10 minutes ago, rn8849 said:

I learned long ago that the key to life is balance. That balance in business is measured by ROI - return on investment.

Yes, exactly what I meant by the above ^^^

  • Like 1

Share this post


Link to post
Share on other sites

Then you on the right track and will do good to learn about the process and method to get what you need. The Generic 3 and 4 Axis posts support aggregate heads, but require you to set up the RAH in the MMD and control your tool through it. The Generic 5 Axis Router Post support aggregate heads and has all the logic needed to do a lot what your after. None of the Generic 5 axis Mill post had that added to them.

 

Share this post


Link to post
Share on other sites
7 minutes ago, 5th Axis CGI said:

The Generic 3 and 4 Axis posts support aggregate heads, but require you to set up the RAH in the MMD and control your tool through it.

Ron,

His RAH isn't like most standard right angle heads that the Generic posts are setup to support.  This is a double column application.  He needs support for doing head changes, and then subsequently tool changing tools into and out of the RAH.  All tools can be ran in the Main Spindle or on any of the heads he may have.  All through the ATC.  His heads also index in 5 degree increments.  It's not hard, but there are certainly many more logic cases that need to be addressed than most standard mill posts even compared to 5 axis machines.  However it is much simpler on the math side of resolving angles and mapping coordinates (almost no mapping needed).

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, huskermcdoogle said:

Ron,

His RAH isn't like most standard right angle heads that the Generic posts are setup to support.  This is a double column application.  He needs support for doing head changes, and then subsequently tool changing tools into and out of the RAH.  All tools can be ran in the Main Spindle or on any of the heads he may have.  All through the ATC.  His heads also index in 5 degree increments.  It's not hard, but there are certainly many more logic cases that need to be addressed than most standard mill posts even compared to 5 axis machines.  However it is much simpler on the math side of resolving angles and mapping coordinates (almost no mapping needed).

I don't know since I never tried to get that deep with them. Anything is possible with the right amount of time. 

Like I have said before I turned all post work over to the professionals and I now focus on making Manufacturing processes which means I can't focus on things that are not value added. I took a Machine and Control class last week for a CAV software because I run into many situations where the CAV is not correct and no one ever bothered to make sure they were. Normally about Friday afternoon I get a call we need to run this weekend and everything is not working. Guess what most CAV or CAM people aren't available till Monday morning. Think the customer cares? No they have a deadline and expect me to get it done. I need to know how to do it and that is my job. Not a position I ever wanted to be put into, but such is life. He sounds like he is working towards that goal and I wish him the best of luck getting there. I have been doing this 30 years and still get my butt kicked on some projects and I dust myself off and try again.

  • Like 1

Share this post


Link to post
Share on other sites
On 5/9/2020 at 9:47 AM, rn8849 said:

vector math

This link talks about the view matrix https://www.3dgep.com/understanding-the-view-matrix/

if you build the project I think it will help you, I have some tutorials about setting up opengl libraries and header files here ->

I uploading the project from this page onto GitHub as well -> https://github.com/PeterRussellEvans/UnderstandingTheViewMatrix

I will be around if you have any questions!!!!!

Share this post


Link to post
Share on other sites
4 hours ago, byte said:

This link talks about the view matrix https://www.3dgep.com/understanding-the-view-matrix/

if you build the project I think it will help you, I have some tutorials about setting up opengl libraries and header files here ->

I uploading the project from this page onto GitHub as well -> https://github.com/PeterRussellEvans/UnderstandingTheViewMatrix

I will be around if you have any questions!!!!!

Thank you, I will look at these as soon as I can.

I went through all of the lessons in http://mathcentre.ac.uk/students/topics/ on Vectors again this weekend.

-Gary

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, rn8849 said:

Thank you, I will look at these as soon as I can.

I went through all of the lessons in http://mathcentre.ac.uk/students/topics/ on Vectors again this weekend.

-Gary

Quote

Some caveats are in order. First, to the student: making your own Geogebra resources is far better than using someone else’s. An afternoon spent trying to get a construction to work, though it may be frustrating to the point of tears and strong language, and though you might not even succeed in the end, is more educational than anything a teacher can say to you. If you download our resources, you’ll have them in two minutes and probably play with them for five or ten, which is not the same thing at all.

Second, also to the student: there is value in physical construction on paper, too. Geogebra can make the construction process feel abstract and indirect. Especially at the beginning you must develop the habit of asking why and how what you’re doing works. This is easier when you’re using tools that are mechanically simple: Geogebra is a complicated tool and it’s not always possible to understand exactly why it does what it does.

Third, again to the student: many of the figures shown in this booklet are complicated-looking. If you understand the steps to produce them, however, they’re usually not very difficult to make. We’ve left in all the construction lines so you don’t feel that your end result should be pristine like the illustrations in most textbooks, but if in doubt focus on the coloured lines. Those are usually the main points of interest.

Finally, to the teacher: often enough, demonstrating something on a whiteboard isn’t as good as getting your students to work it out for themselves. Showing them the same thing on a computer screen, which as far as anyone can tell works by magic, is even less helpful. You probably already know this, of course, and we appreciate there are plenty of times when a demonstration is the right way to go.

Nice to read this from the Euclidean Geometry section.

  • Like 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 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