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:

change 4th axis rotary output


Recommended Posts

Hello!!

We have modified MP master X4 vertical mill 4 axis post, set B is rotation around x axis and CW is positive.  For simple index drilling two holes at B20 and B-20, post gives continuous output of " B20 and B340 ". 

I tried changing all rot_type 0, 1, 2 in the post but didn't get desired output. how can i get B20 - B-20 type output.

Sincerely,

Ravi.

Link to comment
Share on other sites

You might want to look at the Machine Definition for the rotary axis.

The first thing you see is a machine tree at the lower right side.  There should be something called "VMC A axis"  under the "Mill table group" tree - dbl click on it and another window comes up with extra parameters...

The section you might want to play around with is in the lower right side.  My 4th axis is set to "Signed direction, absolute angle (0-360 deg)"

You might have to play around with those settings to see what works.

I could be wrong, but give it a try.

  • Like 1
Link to comment
Share on other sites
  • 2 years later...
1 hour ago, Cavi Mike said:

And yes, I've also messed around with all of the obvious things. I too believe this is something with the post, not the control and/or machine definitions.

 

Try modifying your 'pxyzcout0' Post Block. I did not test this much, but it seems to do what you want...

pxyzcout0       #Toolplane Positioning
      xabs = vequ(x$)
      iout = vequ(i$)
      if cuttype = 2 & rot_on_x = two & vmc, c$ = -atan2(vtoolx$,vtoolz$)
      if c$ > 180, c$ = c$ - 360 #Force "negative rotation from Zero, for any angle > 180
      if rot_on_x = two, csav = -c$
      else, csav = c$

Edit: to be clear, I tested this with exactly 3 drill points. One at "top", one with a plane rotated "-20 degrees" about X, and another plane rotated "+20 degrees" about X. Here is my output:

%
O0123 (T)
(MPMASTER GENERIC 3/4-AXIS VERTICAL)
(MACHINE GROUP-1)
(MCX FILE  - T)
(PROGRAM   - T.NC)
(DATE      - DEC-26-2019)
(TIME      - 2:15 PM)
(T9   - 4 CENTER DRILL       - H9   - D9   - D0.3125")
N100 G00 G17 G20 G40 G80 G90
N110 G91 G28 Z0.
N120 (DRILL FROM TOP)
N130 M08
N140 T9 M06 (4 CENTER DRILL)
N150 (MAX - Z2.)
N160 (MIN - Z-.15)
N170 G00 G17 G90 G54 A0. X0. Y0. S1000 M03
N180 G43 H9 Z2.
N190 G94
N200 G98 G81 Z-.15 R.1 F5.
N210 G80
N220 G91 G28 Z0.
N230 (PLUS 20)
N240 G00 G90 G55 A20. X0. Y0.
N250 G43 H9 Z2.
N260 G98 G81 Z-.15 R.1 F5.
N270 G80
N280 G91 G28 Z0.
N290 G00 G90 G56 A-20. X0. Y0.
N300 G43 H9 Z2.
N310 G98 G81 Z-.15 R.1 F5.
N320 G80
N330 M09
N340 M05
N350 G91 G28 Z0.
N360 G28 Y0. A0.
N370 G90
N380 M30
%

 

  • Like 3
Link to comment
Share on other sites
2 hours ago, Cavi Mike said:

Did anyone find a solution to this? I've been having this problem as well but wasn't a big deal until now - I have a part that will crash into the machine if the table swings all the way around the back. I need a solution to this.

I think my solution ought to work for what you are trying to do. It would limit output theoretically to +-180 from Rotary Zero. 'c$' is calculated using 'ATAN2', which outputs an angle of 0-360, so this should work to "phase shift" anything over 180 degrees.

  • Like 1
Link to comment
Share on other sites

Disclaimer:

For anyone who might be playing along and watching this thread: use these Post Modifications at your own risk!!!

Neither myself, nor my employer (Selway Machine Tool Company), will be liable for any damage that might occur to your machine(s), as a result of modifying your Posts, using edits that I've suggested in this, or any other thread on Emastercam.

As I noted in my original post in this thread; make sure you test the output of your Post very carefully before trusting in these Post edits...

  • Like 2
Link to comment
Share on other sites
3 hours ago, Cavi Mike said:

Never actually thought to check the location of Selway until now, turns out we're (sort of) neighbors. I'm in Vancouver. Small world.

Good to hear Mike. Vancouver, BC or Vancouver, WA?

I guess both are about equidistant from us in Auburn. Glad to hear you are (relatively) local.

Not sure if you have any interest, but Selway is running a 1-Day Mill Operator Training Class on January, 15th. This will be for Haas Mills, and I'll be covering basic safety and machine operation. You can contact Jessica or Kimberly at our local office on Monday for more information. 253-850-8900.

Link to comment
Share on other sites
  • 2 months later...
On 12/26/2019 at 4:26 PM, Colin Gilchrist said:

I think my solution ought to work for what you are trying to do. It would limit output theoretically to +-180 from Rotary Zero. 'c$' is calculated using 'ATAN2', which outputs an angle of 0-360, so this should work to "phase shift" anything over 180 degrees.

I was having this same issue and your fix did exactly what I needed. If I had a part on the 0 side and wanted to machine on the 270 side, it would post A270. But, if my part was too big to go all the way around, I would have to manually edit the A270. to A-90. With this edit to the post, I now get -A90. for the 270 side, and A90. for the 90 side. Thanks!

  • Like 1
Link to comment
Share on other sites
  • 1 month later...
On 12/26/2019 at 4:03 PM, Cavi Mike said:

Did anyone find a solution to this? I've been having this problem as well but wasn't a big deal until now - I have a part that will crash into the machine if the table swings all the way around the back. I need a solution to this.

I just looked through the original post and I noticed that switch one_rev was active in the post. This post switch keeps the rotary axis values between 0 and 360. I suspect that was a big part of the issue here and I don't see any mention of it in this thread

Link to comment
Share on other sites
13 hours ago, Alex Dales said:

I just looked through the original post and I noticed that switch one_rev was active in the post. This post switch keeps the rotary axis values between 0 and 360. I suspect that was a big part of the issue here and I don't see any mention of it in this thread

So what your sayings is MPMASTER is not looking to the MMD, but still looking to the post to control rotations?

Link to comment
Share on other sites
1 hour ago, 5th Axis CGI said:

So what your sayings is MPMASTER is not looking to the MMD, but still looking to the post to control rotations?

Hi Ron,

one_rev is a post switch that is used along with Signed Continuous for the formatting of the A-axis starting position. It does not overwrite the existing setting for the rotary axis type. So my above description was not entirely accurate.

15 hours ago, Alex Dales said:

This post switch keeps the rotary axis values between 0 and 360.

To be more correct, it should read:

   This post switch keeps the STARTING rotary axis values between 0 and 360 when using a signed continuous rotary.

 

Here is some additional detail on one_rev and how it is not equivalent to activating Shortest Direciton, although the two are often used in place of one another.

For any 3+2 toolpath with Signed Continuous and one_rev active the code will look just like Shortest Direction is active, and the code will be the same.

Where you will see the difference is when crossing the 0/360 margin with a 4-axis or 5-axis cut. Shortest direction will behave as usual and remain within the 0/360 bounds.

ie.

A358

A359

A0

A1

With the signed continuous, even when one_rev is active, the axis will still wind up past 360 (or into negative numbers when decreasing).

ie.

A358

A359

A360

A361

You are still able to break out of the 0/360 limits as required (Crossing that boundary with shortest direction coordinates on a signed continuous axis will not end well).

What the one_rev switch does is control the STARTING point of the rotary axis for a given toolpath, so that the FIRST point always falls in the 0/360 limits.

 

Hopefully that all made sense, but if not left me know and I can try to provide additional detail.

-Alex

  • Like 1
Link to comment
Share on other sites
On 5/1/2020 at 8:11 AM, Alex Dales said:

Hi Ron,

one_rev is a post switch that is used along with Signed Continuous for the formatting of the A-axis starting position. It does not overwrite the existing setting for the rotary axis type. So my above description was not entirely accurate.

To be more correct, it should read:

   This post switch keeps the STARTING rotary axis values between 0 and 360 when using a signed continuous rotary.

 

Here is some additional detail on one_rev and how it is not equivalent to activating Shortest Direciton, although the two are often used in place of one another.

For any 3+2 toolpath with Signed Continuous and one_rev active the code will look just like Shortest Direction is active, and the code will be the same.

Where you will see the difference is when crossing the 0/360 margin with a 4-axis or 5-axis cut. Shortest direction will behave as usual and remain within the 0/360 bounds.

ie.

A358

A359

A0

A1

With the signed continuous, even when one_rev is active, the axis will still wind up past 360 (or into negative numbers when decreasing).

ie.

A358

A359

A360

A361

You are still able to break out of the 0/360 limits as required (Crossing that boundary with shortest direction coordinates on a signed continuous axis will not end well).

What the one_rev switch does is control the STARTING point of the rotary axis for a given toolpath, so that the FIRST point always falls in the 0/360 limits.

 

Hopefully that all made sense, but if not left me know and I can try to provide additional detail.

-Alex

Okay that make more sense as to the process of the switch. Issue becomes absolute and continuous encoders on rotation axis. Then when we throw in signed direction axis on top of that it starts to get real deep like you stated with it not ending well. Thank you for breaking down the logic and the process to help me wrap my head around what you meant. Have a good day.

  • Like 1
Link to comment
Share on other sites
  • 6 months later...

Hello every one, hope you all are doing well. I have an issue related to 4th axis. I am using the machine defination of generic fanuc 4th axis. In my system the ssimulation and programming is same as per my direction. But while actually  running the programme in the machine, it is changing its position and also breaking the arc into 2 equal small circles. I was doing oval shape all around the round job

Link to comment
Share on other sites
9 hours ago, Satyajeet Sahoo said:

Hello every one, hope you all are doing well. I have an issue related to 4th axis. I am using the machine defination of generic fanuc 4th axis. In my system the ssimulation and programming is same as per my direction. But while actually  running the programme in the machine, it is changing its position and also breaking the arc into 2 equal small circles. I was doing oval shape all around the round job

Linearize the code and call it a day.

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