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:

4th axis output


Recommended Posts

I've been wondering the same thing (sorry I have nothing to add). Although I have noticed that on some of our posts, depending on which face I index to first, either 90 or -90 the rotations will follow the same sign from that point forward. If I index to 90 first, then I will get only positive outputs for the entire program. Alternatively, if I index to -90 first, then I'll get all negative rotation values for the remainder. I haven't looked into it further than that, but I guess it shows the post is absolutely capable. 

Link to comment
Share on other sites

I'm "assuming" this is desired because of some limitation of the rotary going all the way around....

As you have likely guessed, this is not by any means easily accomplished......

You might look to a 5 axis post and limit the 5th axis output because that has all the logic built in to handle what you're looking for a post to do...

Another thing you can try and do is create a point toolpath between the OPs and bring the rotary back in the direction you want to go, then the next OP "should" go the correct direction if using the shortest distance switch..

 

Like this perhaps?

 

%
O1234(ROTARY SAMPLE)
(DATE=DD-MM-YY - 31-05-17 TIME=HH:MM - 13:07)
(MCX FILE - C:\USERS\JOHNP\DESKTOP\ROTARY SAMPLE.MCAM)
(NC FILE - C:\USERS\JOHNP\DOCUMENTS\MY MCAM2017\MILL\NC\ROTARY SAMPLE.NC)
(MATERIAL - ALUMINUM INCH - 6061)
( T1 | 1/4 SPOTDRILL | H1 )
N100 G20
N102 G0 G17 G40 G49 G80 G90
N104 T1 M6
N106 G0 G90 G54 X0. Y0. A90. S5000 M3
N108 G43 H1 Z6.
N110 G98 G81 Z3.9 R4.1 F12.
N112 G80
N114 A0.
N116 Z5.
N118 A-90.
N120 Z6.
N122 G98 G81 Z3.9 R4.1 F12.
N124 G80
N126 M5
N128 G91 G28 Z0.
N130 G28 X0. Y0. A0.
N132 M30
%
 

 

ROTARY SAMPLE.mcam

Edited by Guest
Link to comment
Share on other sites
34 minutes ago, JParis said:

Another thing you can try and do is create a point toolpath between the OPs and bring the rotary back in the direction you want to go, then the next OP "should" go the correct direction if using the shortest distance switch..

Can you combine a 180 to -180 travel limit in the machine def with the post switch at shortest distance?

What about M codes to force direction? I'm pretty sure I've seen them as variables in the post. Control with misc. functions. Never really played with it but am interested in the skinny from someone with more experienced with post/defs/misc. interactions

Link to comment
Share on other sites

The better question is why do you want that?  What is the control?  Are you trying to avoid an unwind of an infinite table? Most controls now are capable of moving 90 degress when going from 270 to 0.

Now I can see if you had an issue where you didn't want to pass through 180, use a 5 axis post and set your axis  limits to +/- 190 or so.  Make sure the machine won't default to shortest distance, and does only absolute angle movement.  If it is a fanuc, look at and read up on parameters 1006,1007, and 1008.  You could also look at setting 1320 and 1321 to make sure you don't have a collision by going the wrong way.  But for this to be effective you would have to check stroke before movement.

Link to comment
Share on other sites
17 minutes ago, nickbe10 said:

Can you combine a 180 to -180 travel limit in the machine def with the post switch at shortest distance?

What about M codes to force direction? I'm pretty sure I've seen them as variables in the post. Control with misc. functions. Never really played with it but am interested in the skinny from someone with more experienced with post/defs/misc. interactions

Without building in the logic to determine "which" way to go.....there is currently nothing in the post to deal with 180 degree rotations....0 to180, -90 to+90 and 180 motion, there is NO shortest distance answer......so a good amount of logic would be needed....by pushing a point rotation out, I can create a shortest distance solution

A 5 axis post has limits already built in.....so that "could" be one answer......

I like the points answer because with 5 axis work it's something many of us already do so it's just another way to handle it.....

 

Edited by Guest
Link to comment
Share on other sites

By no means the most experienced here, but I'd go with a 5 axis post and set axis limits in the pst file. I have several machines where if I am far enough Z-, and I try to spin the tombstone around past 90 or 270 it will rip the cables out, you have a similar issue? If you just need to control the direction and limits are not an issue, I believe there is a setting somewhere for signed incremental or signed absolute positioning. We have a pair of old toshiba mills that need to be given signed absolute coordinates for their B axis, it was a little funky getting mastercam to post properly for those. 

Link to comment
Share on other sites
3 hours ago, huskermcdoogle said:

The better question is why do you want that?

We have a kind of tombstone setup on the machine that the powers that be want to use. The problem is that when there is a part in the vise, it will hit the table if it indexes much more than +/- 90°.

Link to comment
Share on other sites
6 minutes ago, So not a Guru said:

We have a kind of tombstone setup on the machine that the powers that be want to use. The problem is that when there is a part in the vise, it will hit the table if it indexes much more than +/- 90°.

Use the point method I posted above...it keeps you in charge of where it goes

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

Make sure to set limits in the control when you have it installed.  What is the control?

It's a Haas, but I'm not sure I want to limit the rotation thru the machine's parameters. I'm probably going to want to use the full rotation in the future.

I'm going to give the point method John is suggesting a try & see if that will work.

Link to comment
Share on other sites

It will work, just won't prevent you or an operator from making a mistake or omitting by mistake and rotating the wrong way.  I don't know much about haas parameters, but surely it isn't that hard to change the limit settings.  If I setup and programmed that mill with that tombstone I would make it a requirement to change the settings as soon as I installed it onto the rotary.  Just another part of the setup, and if you forget to turn it back, you will know....  But it won't hurt anything.

Just a thought.  If it can burn my a$$ in the future, it usually will....  Especially if I thought of it before hand and chose to do nothing about it.

 

Edit:  the point thing will work for sure, but you may need to change logic in post for it to output -90 instead of 270 if you haven't done that already.

 

Link to comment
Share on other sites
7 minutes ago, huskermcdoogle said:

I don't know much about haas parameters, but surely it isn't that hard to change the limit settings.

Yeah, the more I think about it the better this seems. It probably will be pretty simple & in fact I can probably pass the setting thru with a manual entry (saved as an importable op).

9 minutes ago, huskermcdoogle said:

the point thing will work for sure, but you may need to change logic in post for it to output -90 instead of 270 if you haven't done that already.

This is what's kicking my butt.

Link to comment
Share on other sites
Its an MP master so check this setting.
one_rev     : 0     #Limit rotary indexing between 0 and 360? (0 = No, 1 = Yes)

 

 

Now if it isn't outputting -90 but instead 270, change the values on the while index out lines to the second version


pindxcalc       #Index move calculations, direction is shortest
      #Check if in tolerance
      cdelta = frac(abs(csav)/ctable)
      if cdelta > ixtol & cdelta < 1-ixtol, result = mprint(sindxerror)
      cdelta = prvcabs - cabs
      #Phase shift delta 10 revolutions, check odd/even
      if frac(int((cdelta + 3600)/180)/two), indx_mc = one
      else, indx_mc = zero
      #Set range 0-360
      indx_out = csav
      while indx_out < 0, indx_out = indx_out + 360
      while indx_out > 360, indx_out = indx_out - 360
      if rot_type = 1, pset_rot_label_sign  #Set rotary axis label
      else, pset_rot_label
pindxcalc       #Index move calculations, direction is shortest
      #Check if in tolerance
      cdelta = frac(abs(csav)/ctable)
      if cdelta > ixtol & cdelta < 1-ixtol, result = mprint(sindxerror)
      cdelta = prvcabs - cabs
      #Phase shift delta 10 revolutions, check odd/even
      if frac(int((cdelta + 3600)/180)/two), indx_mc = one
      else, indx_mc = zero
      #Set range -180 <> 180
      indx_out = csav
      while indx_out < -180, indx_out = indx_out + 360
      while indx_out > 180, indx_out = indx_out - 360
      if rot_type = 1, pset_rot_label_sign  #Set rotary axis label
      else, pset_rot_label

 

Use at your own risk, as I am not sure what else this might screw up.  It should take care of it for indexing ops though.

 

 

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

It should take care of it for indexing ops though.

 

1 hour ago, huskermcdoogle said:

while indx_out < -180, indx_out = indx_out + 360 while indx_out > 180, indx_out = indx_out - 360

Hmm, I tried it, but it didn't effect the output at all. Still getting A90. & A270.

Link to comment
Share on other sites

Whoops, wasn't thinking, your A output is likely coming from the pcout....  Look for the following in pcoutrev.

 

      if index <> 1 & (rot_type > 0 | (one_rev & gcode$ = zero & (cuttype <> one | opcode$ = 3 | opcode$ = 16))),
        [
        while fmtrnd(cabs) >= 360,
          [
          cabs = cabs - 360
          if cuttype <> 1, rev = rev - 1
          ]
        while fmtrnd(cabs) < 0,
          [
          cabs = cabs + 360
          if cuttype <> 1, rev = rev + 1
          ]

to....

      if index <> 1 & (rot_type > 0 | (one_rev & gcode$ = zero & (cuttype <> one | opcode$ = 3 | opcode$ = 16))),
        [
        while fmtrnd(cabs) >= 180,
          [
          cabs = cabs - 360
          if cuttype <> 1, rev = rev - 1
          ]
        while fmtrnd(cabs) < -180,
          [
          cabs = cabs + 360
          if cuttype <> 1, rev = rev + 1
          ]

 

 

Of course this probably isn't the best or right way to do this.  But try that.

Link to comment
Share on other sites
  • 2 years later...

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