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:

Help request - 4th Axis Posting going from + to - 355 in few lines posting with MC2021


q4stix
 Share

Recommended Posts

Hi, hoping to get a better understanding of what might be happening when I try to post an operation, whether roughing, finishing, contour, etc.

I've done plenty of 3 axis work but other than hand-writing a few 4 axis programs this is my first run at getting Mastercam to do 4 axis work on what will be "complex" geometry

I have a simple shape as a test model (pic attached) that *should* just rock the A-axis back and forth to roughly +7.5 degrees, through 0 degrees, to -7.5 degrees, 0 deg, and repeat. If I simulate the operation Mastercam shows me exactly what I would expect it to do (simulate screen cap shown with a trunnion but you can see "A" is a reasonable value, "B" is locked at 0)

When I post the operations when using the default machine (Default.mcam-control) and post (MPFAN,pst) it jumps back and forth from positive to negative and if I were to run it would cause the table to rotate 2 revolutions without lifting the tool instead of a 10 degree sweep across the 0 degree mark.

Code example output:
N100 G20
N110 G94 G1 G17 G40 G49 G80 G90 F6.42
N120 T4 M6
N130 G94 G1 G90 G54 X3.3747 Y-.9971 A-355.625 S4365 M3 F99.75
N140 G43 H4 Z3.5962
N150 Z3.3962 F6.42
N160 S2139 M3
N170 Z2.7962 F15.
N180 S4365 M3
N190 X3.4154 Y-.9972 Z2.7949 A355.698 F31.3 <--------- would cause almost 2x rotations from A-355.625
N200 X3.4546 Y-.9975 Z2.7908 A355.938 F101.73
.....
N290 X3.5842 Y-1. Z2.7279 A359.545 F342.41
N300 X3.5865 Z2.7203 A359.976
N310 X3.5849 Z2.7128 A.408 F368.76 <--------- would cause almost 1x rotations from A359.976
N320 X3.5832 Y-.9999 Z2.7052 A.841 F345.76
N330 X3.5777 Y-.9998 Z2.6979 A1.259

So... I'm confused. The A-axis rotary under Machine Definition shows it can support continuous positioning, signed continuous and the max travel limits are super high, but even changing the travel limits doesn't seem to do anything.

Does anyone know if this is because the default/generic machine needs to be changed or is it a post processor issue? At this point it's *prior* to being able to run on any machine. I also tried adding a 4th axis to our existing Fadal config that was supposed to be good for 3 or 4 axis setups but that's doing it too.

Any help is much appreciated!
-Matt
 

BasicPart.JPG

Simulation.JPG

MachineDef.JPG

RotaryDef.JPG

Link to comment
Share on other sites
11 hours ago, Greg Williams said:

Are you running a 5 axis post? The machine looks to have 5 axis if B is locked at zero and A is moving? Always best to upload a zip2go as that will contain eveything the debuggers will need.

 

Hi Greg,

The post itself is a 4 axis one (or is supposed to be). I realized I took the screen capture of the machine config while I was still trying to play with things to better try to understand what was going on. I'm attaching a pic of the real machine configuration that I've been using as my 'baseline' through all of this. When I tried to output the code the post is just a renamed copy of the default one I saw in the mastercam2019/mill/posts folder.

I realize my comment about the B axis was probably misleading... it was for the simulation before I found out how to change the simulation to a 4 axis machine. Having the B axis showing 0 during the simulation was a self-check to make sure I wasn't doing something unexpected and only making use of the A axis. Hope that helps explain my thoughts.

I created the zip2go as you mentioned to try to help share the necessary info you mentioned. Please let me know if there is something I missed in the process.

 

4 hours ago, Thomas Sauer said:

Hi 

my VMC is set to "Shortest direction , absolute angle (0-360) 

it also depends on which side of the table your rotary Axis is 

in my case its sitting on the left side and that's why my " Direction "is set to " CW "   

 

 

I was thinking that would be a possible solution too and tried all of the options sequentially to see if that would help. I was wrong haha. My machine can read and display continuous rotation and displays it in the form of "1R183", "2R279", etc.

 

 

Thanks for the help and feedback you two!

2022-08-12_01-MachineDef.JPG

2022-08-12_02-MachinePost.JPG

New4axisTrial2.ZIP

Link to comment
Share on other sites

So after reading this, I'm a little lost....

You say the code won't run and it'll cause full revolutions...it leaves me wondering, "Have you actually tried it?"

Assuming it does cause full rotations...what does the code need to look like?

This "might" come down to the rotary settings in your machine and how they handle direction....

  • Like 1
Link to comment
Share on other sites
On 8/11/2022 at 6:24 PM, q4stix said:

Any help is much appreciated!

The only time I've seen this it was a machine parameter on an Hitachi Seiki horizontal. The machine would break the motion rotate 360ish and pick up again.

There were 3 options in the machine parameters, all indecipherable in translation, so we just tried each one and found the one that gave us what we wanted.

Link to comment
Share on other sites
On 8/13/2022 at 4:47 AM, JParis said:

So after reading this, I'm a little lost....

You say the code won't run and it'll cause full revolutions...it leaves me wondering, "Have you actually tried it?"

Assuming it does cause full rotations...what does the code need to look like?

This "might" come down to the rotary settings in your machine and how they handle direction....

 

I did run the code without any material loaded. The table rotated as I expected looking at the code. This also meant that the cutter would have left a nice radial groove all the way around the part.

I did find the parameter in the post processor that was the equivalent of the setting in Mastercam itself. From looking at the post, it *should* have pulled from the machine definition but clearly wasn't. As soon as I changed the "rot_type" parameter to 0 (was 1) then the code output as expected there. Changing "read_md" from "no$" (previous) to "yes$" (current) only seems to update the direction of travel CW vs CCW and not anything else.

2022-08-15_PostEdit.JPG.ff5daf750e7158f3ac28298d95bb2bf1.JPG

So, while my initial odd rotation angle issue is 'solved' that leaves me wondering what else isn't actually getting updated in the code when I change things within Mastercam. If I edit the rotary table limits, max speed, etc. in Mastercam it doesn't actually limit anything or change anything in the code output. I'd like to get a copy of Mastercam's generic 3 axis, 4 axis, and 5 axis machine definitions and posts but I'm running this off of a previously used setup that I took over after the previous operator and programmer left. I can't even link to the Mastercam forum because "MastercamDotComLinking.exe" wasn't installed from the network. *fail*

 

15 minutes ago, nickbe10 said:

The only time I've seen this it was a machine parameter on an Hitachi Seiki horizontal. The machine would break the motion rotate 360ish and pick up again.

There were 3 options in the machine parameters, all indecipherable in translation, so we just tried each one and found the one that gave us what we wanted.

How interesting. I assume there are other machines that this style of code was needed but it makes me wonder how they determined +/- and going across 0 vs rotating back. Got to love multiple standards but I get that happens during development between different manufacturers and developers.

 

------

So... anyone able and willing to send me the Mastercam default/generic machine defs and posts for 3/4/5 axis machines? I'm not trying to get custom code or proprietary setups or anything, just what would have come with a fresh install since I have no idea who has the install setup for the computer and NC machine I'm operating.

Link to comment
Share on other sites
4 minutes ago, JParis said:

I am still curious as to what you need the code to actually look like...

I think we need to start there...once we know what you need, finding the proper settings can be done....but just knowing it's wrong doesn't exactly help us help you

 

Admittedly since I'm new to getting the rotary table up and running on this machine (a Fadal with Centroid control retrofit), I'm still learning what exactly the code needs to look like. I'm a mechanical engineer that just happens to be getting the machine to run again so I'm more learning this as I go. Sorry if that means I'm not using the right terminology or missing something that should have been obvious to someone more familiar with machining.

I do know that the machine will handle continuous angles, meaning it'll go 360, 720, 1080, etc. and go both positive and negative. I also know that there is a pneumatic solenoid that can lock the rotary table. Finally, it seems that the machine will arrive to the points at same time, meaning it'll slow the feeds on the X and Y to reach a target position when the A axis gets there (it'll only rotate a max of 65ish degrees a second). Beyond that I've just used the 3 axis functionality of the machine. With 3 axis it's at least operated like I've expected so I haven't thought about many of these things before.

 

The Mastercam operation I'm starting with for learning is a "Multiaxis Toolpath - Pocketing" with mostly default options. This is what I meant previously of expecting the code to follow the back and forth rocking of the A axis.2022-08-15_MultiaxisPocketing.thumb.JPG.9a9244af71534710a4e4465d4ca8d35b.JPG

When I saw this code, it was much more what I was expecting than the A values in the 300s and immediately changing to single digits like I posted on the first post.

2022-08-15_MultiaxisPocketing_Code.JPG.9e40755917dc64ea6f619ddbb4241d22.JPG

 

Still, I'm unsure why when I edit anything in the Machine Definition in Mastercam why it isn't read by the post processor regarding the rotary table.

Again, thank for the help!

Link to comment
Share on other sites

I would suggest you simply things until you get a grasp on what you need your posted code to look like...

Try a basic mill and/drill paths and rotate them....simplify your code and things may start to come into focus more...other than that we're all just shooting in the dark

Link to comment
Share on other sites
20 minutes ago, JParis said:

I would suggest you simply things until you get a grasp on what you need your posted code to look like...

Try a basic mill and/drill paths and rotate them....simplify your code and things may start to come into focus more...other than that we're all just shooting in the dark

Hi, I guess I'm not sure what you're asking for and hoping to see from the code. The issue seems to be narrowed down to the post not reading the machine parameters where anything in the post with a comment saying #SET_BY_MD isn't actually set by the machine definition.

Now that I manually edited the two fields I highlighted in yellow the code is being output as I expect and it runs as expected for this particular operation. My concern is that other things aren't being read from the machine definition and if I set a machine limit or value that it won't translate (for example the max and min rotation travel still isn't working if I set them to a small value like +/-10 degrees)

I hope that better conveys the issue I'm experiencing. Thanks!

Link to comment
Share on other sites
18 hours ago, q4stix said:

I assume there are other machines that this style of code was needed

That was our observation concerning the two parameters we didn't end up using, including the one that was loaded in the machine when we started.

I couldn't imagine what they might be used for, but then again, I was concerned about the job in hand. It was the first time Multi-axis paths had been tried on any 4 axis machine in the shop.

Link to comment
Share on other sites
23 hours ago, JParis said:

The gcode...what do you need the actual posted code to look like?

It doesn't work you say, ok...I look at it and don't see an issue with the code.

I think I finally narrowed down the issue. As I tried to explain in a previous post (but I guess I didn't convey correctly), the code output after I manually edited the post processor output the way I would expect: continuous rotary values with smooth transitions between positive and negative and matching the motion I saw in Mastercam.

The issue was narrowed down to this: changes in Mastercam wouldn't change the output but if I manually entered the changes into the post then the changes would work. This seems to be the root of my problem all along. I had the settings right in Mastercam but they didn't get read into the post and only the initial hardcoded values were used. I *think* I understand why that might be happening but I need to read through the section of the post that deals with reading the machine definition and control definition from Mastercam to see if something was commented out or mistyped. None of the #SET_BY_MD or #SET_BY_CD were actually getting set.

 

8 hours ago, So not a Guru said:

Those feed codes look like G93 values, but I only see a G94 call.

They're G94 at the moment so I can better understand the code and it's one less thing for me to follow. My plan is to switch to G93 once I get the rest sorted out. Agree it looks similar.

 

5 hours ago, nickbe10 said:

That was our observation concerning the two parameters we didn't end up using, including the one that was loaded in the machine when we started.

I couldn't imagine what they might be used for, but then again, I was concerned about the job in hand. It was the first time Multi-axis paths had been tried on any 4 axis machine in the shop.

Exactly the place I'm at. No one else has done 4 axis here except on a small mini-mill that operates differently and has its own programming and run setup.

4 minutes ago, cruzila said:

Best of luck!! Nothing like a straight up learning curve. You'll be a master after 1 job...

Ha! I'm learning a lot which I love. If only 1 job would do the trick!

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