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:

5 axis


Recommended Posts

 I have a question about a 5 axis post I'm trying to edit to "fit" a machine we have here. The problem I'm having is getting the rotaxis1$, rotdir1$,rotaxis2$,rotdir2$ settings set correctly. Can someone offer an explanation as to how the vectors work in determining this setting? Any help would be much appreciated, thanks.

 

 

 

 

Link to comment
Share on other sites

Please contact your Mastercam reseller about a post for your machine.  This is the best advice for someone in your situation.

 

Moving forward, if your really are interested in post customization, there are courses and materials available that will provide the training and/or information that you will need to understand how they work and what all of the internal features do.  This will take some time to understand.  If you can't take the time, please see above.

 

No offense intended, but if you think that you can make a 5-axis post work by asking questions in the forum (without the needed resources) you will fail.

Link to comment
Share on other sites

True, my first question was pretty broad I guess. The machine is built on an HMC platform with no pallet changer. Instead it has a rotary axis mounted to the table, so there is still 0-180 degrees in "B"  as well as the additional 360 degrees in "C" axis. I am setting up a simple, square shaped part with a plan to reach 5 sides of the part with just 5 axis positioning. This is my first attempt with a 5 axis machine, but I have done a fair amount of work with 4 axis setups on a VMC. Currently the post is working, however, to get to the last side of the square, it rotates -180 in B, 90 in C. It would work better if it would just move another 90 degrees in C. Thanks.

Link to comment
Share on other sites

Here is what my current configuration looks like in the 5 axis section of the post:

 

 

 

 5 Axis Rotary Settings# --------------------------------------------------------------------------#Assign axis addressstr_pri_axis : "B"str_sec_axis : "C"str_dum_axis : "A"#Toolplane mapped to top angle position stringsstr_n_a_axis : "B"str_n_b_axis : "C"str_n_c_axis : "A"#Machine rotary routine settingsmtype        : 0     #Machine type (Define base and rotation plane below)                      #0 = Table/Table                     #1 = Tilt Head/Table                     #2 = Head/Head                     #3 = Nutator Table/Table                     #4 = Nutator Tilt Head/Table                     #5 = Nutator Head/Headhead_is_sec  : 1     #Set with mtype 1 and 4 to indicate head is on secondary#Preferred setup is pri. zero matches sec. zero/direction#Zero machine and determine the planes perp. to axis rotations#These plane combinations are valid:#Primary plane   XY   XZ   YZ#Secondary or    XZ   XY   XY#Secondary       YZ   YZ   XZ#Primary axis angle description (in machine base terms)#With nutating (mtype 3-5) the nutating axis must be the XY planerotaxis1$ = vecz  #Zero       rotdir1$  = vecx  #Direction  #Secondary axis angle description (in machine base terms)#With nutating (mtype 3-5) the nutating axis and this plane normal#are aligned to calculate the secondary angle rotaxis2$ = vecz  #Zero        rotdir2$  = vecy  #Direction   #NOTE: Use of 'top_map' requires the dealer match the#      above settings below.  These must match initial settings!!!p_nut_restore    #Postblock, restores original axis settings       result = updgbl(rotaxis1$, "vecy")#Zero      result = updgbl(rotdir1$, "vecx")#Direction      result = updgbl(rotaxis2$, "vecz")#Zero      result = updgbl(rotdir2$, "vecx")#Direction#Nutating machine (mtype 3-5) describe the plane that the nutated axis#lays in,  this is the plane perpendicular to the primary axis and#secondary axis nut_ang_pri$ : -45   #Nutating head secondary axis angle from machine Z positive #Tool length, typically for head/head machine, both set to zero disables#Applied to the tool length, RA applies this along the tooldrluseclr    : 0     #Use Drill Clearance Plane at start/end -                      #Read from toolpath parametersuse_tlength  : 0     #Use tool length, read from tool overall length                      #0=Use 'toollength' var, 1=Mastercam OAL, 2=Prompttoollength   : 0     #Tool length if not read from overall lengthshift_z_pvt  : 0     #Shift Z by tool length, head/head program to pivot (Z axis only)                     #0=Pivot, 1=Pivot-Z, 2=Tool Tip Programming (without zero length)                     #Option 2, So we can still take advantage of brk_mv_head featureadd_tl_to_lim : 0    #Add tool length after intersecting limit, always                     #on if limit from stockuse_g45      : 1     #Use G45 offset with right angle head (RA)g45_of_add   : 30    #Add this number to tool length no. for G45 offset number#Axis shift  shft_misc_r  : 0     #Read the axis shifts from the misc. reals#Part programmed where machine zero location is WCS origin-#Applied to spindle direction, independent of RA#Table/Table -#Offset of tables to secondary axis relative to machine base.#Tilt Head/Table - Head/Head -#Part programmed at machine zero location-#Offset in head based on secondary axis relative to machine base.#Normally use the tool length for the offset in the tool directionsaxisx       : 0     #The axis offset direction?saxisy       : 0     #The axis offset direction?saxisz       : 0     #The axis offset direction?r_intersect  : 0     #Rotary axis intersect on their center of rotations                     #Determines if the zero point shifts relative to zero                     #or rotation with axis offset.#Nutating axis shift, used when calculations are based on mtype 3 or greater#'top_map' and toolplane tool paths use the axis shifts above, 5 axis use thesen_saxisx     : 0     #The axis offset direction?n_saxisy     : 0     #The axis offset direction?n_saxisz     : 0     #The axis offset direction?n_r_intrsct  : 0     #Rotary axis intersection with nutating (normally zero)#Force rotary axis reset at toolchange and other optionsfrc_cinit    : 1typ3_brk_evn : 0     #Windup limit, use even revolution break position                     #Primary and/or secondarybrk_mv_head  : 0     #Break the 5 axis moves to remove gougebrk_max_ang  : 0     #'brk_mv_head' maximum angle move, applied if chordal                     #calculation angles moves are greater (negative disables) skp_rdnt_ck  : 0     #Skip 'brk_max_ang' redundant angle check top_type     : 4     #With 'top_map' select the top toolplane output                     #0 = Post selects G7 rotation axis                     #1 to 4, user selected G7 rotation axis                       #1 = Primary C : Y zero, Secondary A                     #2 = Primary C : -X zero, Secondary B                     #3 = Primary C : -Y zero, Secondary A                     #4 = Primary C : X zero, Secondary B                     #5 = Custom settings, ptop_type_ax and ptop_type_lim#Secondary shift (determines position and angle calculation)#plane correction 90 degree shift case (plus or minus)#used when secondary plane is defined perp to primary zero#EX. P - vecx, vecy  S - vecz, vecyshift_90_s   : 1     #Shift pos.=1, neg.=-1#Rotary axis limitsadj2sec      : 1     #Attempt to adjust the primary axis from secondary?                     #Allows primary axis to flip 180 to satisfy secondary                     #0 = Off                     #1 = Use method when secondary is out of limit                     #Use with pri_limtyp = one to keep secondary as controlling                     #limit when limit tripped                     #Use with pri_limtyp = two to allow 180 degree reposition#When the tool repositions, an intersection is made to the limits and the#tool is driven around the limits to the reposition point as required.#Z upper limit is used as the safe transition boundary #Linear limits relative to machine base coordinates / part originuse_stck_typ : 0     #0=Off, 1=Stock def., 2=Limitsup_x_lin_lim : 250.  #X axis limit in positive directionup_y_lin_lim : 250.  #Y axis limit in positive directionup_z_lin_lim : 250.  #Z axis limit in positive directionlw_x_lin_lim : -250. #X axis limit in negative directionlw_y_lin_lim : -250. #Y axis limit in negative directionlw_z_lin_lim : -5.   #Z axis limit in negative directionclear_stck   : 0.    #Add inc. offset to stock definition for transition boundaryretract_on_rpd : 1   #This control allows retract on rapids too (don't assume rapid is safe)#Set pri_limtyp and sec_limtyp on following conditions#0 = Less than 180 degrees#1 = Equal or greater than 180 degrees and less than 360 degrees#2 = Soft limit at 0-360 degrees with hard limits slightly beyond     #Set limhi-limlo to hard limits, inthi-intlo to 360 degrees total     #limhi-limlo are expected equal amount from inthi-intlo#3 = Greater than 360 degreesauto_set_lim : 1     #Set the type from the angle limit settings (ignore these)pri_limtyp$  : 0sec_limtyp$  : 0#Rotary axis travel limits, always in terms of normal angle output#Set the absolute angles for axis travel on primarypri_limlo$   : -180pri_limhi$   : 0#Set intermediate angle, in limits, for post to reposition machinepri_intlo$   : -9999pri_inthi$   : 9999#Set the absolute angles for axis travel on secondarysec_limlo$   : -9999sec_limhi$   : 9999#Set intermediate angle, in limits, for post to reposition machinesec_intlo$   : -9999sec_inthi$   : 9999bias_null    : 0     #mi4 and mi5 bias are applied at null toolchangesuse_clamp    : 1     #Use the automatic clamp Mcode #Table/Table spindle axis alignment.  (Typically Z+. Always Z+ with nutating machine types!)#  Choose the axis that is parallel to the spindle with all rotaries at their zero positions.spind_align : 3  #1=(X+), 2=(Y+), 3=(Z+), -1=(X-), -2=(Y-), -3=(Z-)                     #Machine base matrix (Base matrix to map positions into)matb1$       : 1matb2$       : 0matb3$       : 0matb4$       : 0matb5$       : 0matb6$       : 1matb7$       : 0matb8$       : -1matb9$       : 0#Tolerance settings for wind upp_tol_ang    : 210   #Primary angle move to exceed for direction changes_tol_ang    : 210   #Secondary angle move to exceed for direction changed_tol_ang    : 210   #Dummy angle move to exceed for direction change#pri_limtyp = 1, tolerance to validate tripping limit#                reset the p_frc_adj_sec flag when back to normal range#pri_limtyp = 2, angle move >= to trigger reposition on primary and# angle move >= with rev5 or 180 reposition to validate tripping limitp_rsoft_tol  : 45#sec_limtyp = 2, Angle move >= for reposition s_soft_tol   : 270adj_lim_trp  : 90    #Angle move in p_pri_rot180 to trip reposition#pri_limtyp = 3 and sec_limtyp = 3 control valuesp_rsoft_tol3 : 90    #Angle move >= with rev5 or 180 reposition

 

Link to comment
Share on other sites

There is probably an error in the calculational area of your post.  Or, the Tplane in your MCX file is not defined at the rotation that you expect.  Just so you understand, the matrix at B0 C270. is not the same as the matrix at B-180. C90.

 

 

Volume 2 of your MP documentation covers all of the stuff dealing with 5-axis calculations, including vectors.  Start there, maybe you will be able to find your issue.

 

Just an FYI, I also have a rotary-on-rotary HMC.  This is the code that I chose to use for 5-axis positioning, for what it's worth:

          if m1$ >= 0, aabs = asin(m7$)
          if m1$ < 0, aabs = 180 - asin(m7$)
          if m5$ >= 0, babs = asin(m6$)*-1
          if m5$ < 0, babs = asin(m6$) + 180

Good luck, and HTH.  :cheers:

Link to comment
Share on other sites

try this

 

#Assign axis address
str_pri_axis : "C"
str_sec_axis : "B"
str_dum_axis : "A"

#Toolplane mapped to top angle position strings
str_n_a_axis : "A"
str_n_b_axis : "B"
str_n_c_axis : "C"

#Misc. String settings
sopen_prn    : "("   #String for Open Parenthesis "("
sclose_prn   : ")"   #String for Close Parenthesis ")"
sextnc$      : "NC"  #String for program extension

#Machine rotary routine settings
mtype        : 0     #Machine type (Define base and rotation plane below)
                     #0 = Table/Table
                     #1 = Tilt Head/Table
                     #2 = Head/Head
                     #3 = Nutator Table/Table
                     #4 = Nutator Tilt Head/Table
                     #5 = Nutator Head/Head

head_is_sec  : 1     #Set with mtype 1 and 4 to indicate head is on secondary

#Preferred setup is pri. zero matches sec. zero/direction
#Zero machine and determine the planes perp. to axis rotations
#These plane combinations are valid:
#Primary plane   XY   XZ   YZ
#Secondary or    XZ   XY   XY
#Secondary       YZ   YZ   XZ

#Primary axis angle description (in machine base terms)
#With nutating (mtype 3-5) the nutating axis must be the XY plane
rotaxis1$ = vecx  #Zero      
rotdir1$  = vecy  #Direction 

#Secondary axis angle description (in machine base terms)
#With nutating (mtype 3-5) the nutating axis and this plane normal
#are aligned to calculate the secondary angle
rotaxis2$ = vecz  #Zero       
rotdir2$  = vecx  #Direction  

Link to comment
Share on other sites

You also have to make sure the Machine Base Matrix is setup for Horizontal processing. The default is for a Vertical Machine.

 

Here is how it should be set for a Horizontal 5X Machine:

matb1$   : 1
matb2$   : 0
matb3$   : 0
matb4$   : 0
matb5$   : 0
matb6$   : 1
matb7$   : 0
matb8$   : -1
matb9$   : 0

In my 5 Axis Post Class, we go through the options available in the Generic Fanuc 5X Mill Post and show how to set it up for different machine configuration.

 

You asked about setting the Vector definitions.

 

The 'rotaxis' and 'rotdir' variable indicate the two vectors, perpendicular to the rotary axis. This forms a plane. This plane is formed according to the setup of the Machine Base Matrix.

 

Setting the Machine Base Matrix to Horizontal (as I showed above), means that the primary rotary axis is rotating about the Z axis of the MBM. (Your spindle is aligned with the World -Y axis when looking in Mastercam. The MBM maps the -Y axis to the machine's Z axis in the post).

 

So to describe a "C" axis, that rotates about the MBM "Z" axis, we need vector components for X and Y. We should not "see" a reference to "Z" in the 'rotaxis1$' or 'rotdir1$' variables.

 

That means the only valid settings for 'rotaxis1$' and 'rotdir1$' are: -vecx, vecx, -vecy, or vecy

 

The variables 'vecx', 'vecy', and 'vecx' internally are set to values of '1', '2', or '3'. So using the unary minus sign (-) in front of the variable name just negates the value of the 'vec' variable internally.

 

 

Here are some good starting values:

#Primary axis angle description (in machine base terms)
#With nutating (mtype 3-5) the nutating axis must be the XY plane
rotaxis1$ = vecx  #Zero      
rotdir1$  = vecy  #Direction 

For the Secondary rotary axis, you need to describe a plane that rotates about the "Y" axis of the MBM. That would be accomplished by having two vector components that do not have "Y" in the name. 

 

That means the only valid settings for 'rotaxis2$' and 'rotdir2$' are: -vecx, vecx, -vecz, or vecz

 

Here are some good starting values for the Secondary:

#Secondary axis angle description (in machine base terms)
#With nutating (mtype 3-5) the nutating axis and this plane normal
#are aligned to calculate the secondary angle
rotaxis2$ = vecz  #Zero       
rotdir2$  = vecx  #Direction  

Hope that helps,

 

Colin

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