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:

G12.1 / Polar Coordinate Interpolation


Brian Pallas
 Share

Recommended Posts

Hi,

I have never used the polar coordinate rotation before.  I've been looking at it the last day or so to see if that would be better for us than what we are doing now.  The main advantage of it seems to be that there is just the linear feedrate at the beginning of the toolpath with the G12.1, as opposed to all the degree per minute feedrates that are currently in the program.  Are there any other advantages of the G12.1 cycle?

 

So, I am trying to understand the output I am getting.  Below is a sample code that will mill a 1.42 diameter around a part.  Before activating G12.1 the tool is at Y .1474.  After the code is activated is the Y ever going to move to 0?  If at the machine the tool is going to stay at Y.1474, I don't think that is what I am going to want.  I think I want the tool at Y0.  At least that is how I have been doing it so far without the polar interpolation.

 

( 3/16 BULL ENDMILL 0.0313 RAD)
M05
M98 P7000
G54
 
T1313
 
M200
G17 G98
M45(CONNECT C AXIS)
M69(C AXIS BRAKE OFF)
G0 X1.8932 Y.1474 Z.1 C0. M8
G97 S6000 M13
G12.1
G1 X1.8932 C.1474 F60.
Z-.125
G41 X1.72 C.0974 F30.
G3 X1.6074 C0. R.1125
G2 X0. C-.8037 R.8037
X-1.6074 C0. R.8037
X0. C.8037 R.8037
X1.6074 C0. R.8037
X1.6064 C-.03 R.8037
G3 X1.6062 C-.0342 R.1125
X1.7116 C-.1295 R.1125
G1 G40 X1.8809 C-.1826
Z.1 F500.
Z1. F500.
G13.1
M05
M46(DISCONNECT C AXIS)
M9
M98 P7000

Link to comment
Share on other sites
19 hours ago, Brian Pallas said:

Hi,

I have never used the polar coordinate rotation before.  I've been looking at it the last day or so to see if that would be better for us than what we are doing now.  The main advantage of it seems to be that there is just the linear feedrate at the beginning of the toolpath with the G12.1, as opposed to all the degree per minute feedrates that are currently in the program.  Are there any other advantages of the G12.1 cycle?

 

So, I am trying to understand the output I am getting.  Below is a sample code that will mill a 1.42 diameter around a part.  Before activating G12.1 the tool is at Y .1474.  After the code is activated is the Y ever going to move to 0?  If at the machine the tool is going to stay at Y.1474, I don't think that is what I am going to want.  I think I want the tool at Y0.  At least that is how I have been doing it so far without the polar interpolation.

 

( 3/16 BULL ENDMILL 0.0313 RAD)
M05
M98 P7000
G54
 
T1313
 
M200
G17 G98
M45(CONNECT C AXIS)
M69(C AXIS BRAKE OFF)
G0 X1.8932 Y.1474 Z.1 C0. M8
G97 S6000 M13
G12.1
G1 X1.8932 C.1474 F60.
Z-.125
G41 X1.72 C.0974 F30.
G3 X1.6074 C0. R.1125
G2 X0. C-.8037 R.8037
X-1.6074 C0. R.8037
X0. C.8037 R.8037
X1.6074 C0. R.8037
X1.6064 C-.03 R.8037
G3 X1.6062 C-.0342 R.1125
X1.7116 C-.1295 R.1125
G1 G40 X1.8809 C-.1826
Z.1 F500.
Z1. F500.
G13.1
M05
M46(DISCONNECT C AXIS)
M9
M98 P7000

Where did you start and stop your contour? Does the post require the back plane for this function? Read the upper section of the post and see what it says. From MPLMASTER 2017 you can see what it says.

Quote

#MILL TOOLPATHS:
#Mill Layout:
# The term "Reference View" refers to the coordinate system associated
# with the Mill Top view (Alt-F9, the upper gnomon of the three displayed).
# Create the part drawing with the the axis of rotation along the X axis
# of the "Mill Reference View" with the face of the part toward the side
# view (Mill Reference View X plus direction).  The Y plus axis of the
# Mill Reference View indicates the position on the part of C zero
# (View number 3).  The right or left side view are the only legal views
# for face milling.  The view number 3 rotated about the X axis as a
# "single axis rotation" are the only legal views for cross milling
# except for axis substitution where the top view is required.
# Rotation around the part is positive in the CCW direction when viewed
# from the side view.
# (The Chook 'CVIEW' should be used for creating milling tool plane and
# construction plane selections, C axis toolpaths in lathe perform
# this function automatically).
#NOTICE: View number 3 always indicates the location for C zero.  Milling
#        with a turret below the centerline indicates C at 180 degrees.
#
#Mill canned cycles:
#Cylindrical interpolation, G107 canned cycle:
# Cylindrical interpolation is created with axis substitution only.
# Use the Caxis/C_axis Contour toolpath.  Create the geometry from
# view number 4 if the rotation of C axis is CCW.  This prevents producing
# a mirror image.  Wrapped and unwrapped geometry are broken and arcs are
# lost so it is better to create flattened geometry.  Set the parameters
# in Rotary Axis not to 'unroll' and set the correct diameter.
# Use View number 3 as the C0 location.  Set mi4 to activate!
#
#Polar interpolation, G112 canned cycle:
# Polar interpolation is active only for face cutting (Right or Left).
# Use the Caxis/Face Contour toolpath.  Create geometry for the lead in
# and lead out with the start and end position on the View number 3 tool
# axis.  All paths must start and end at the 'C0'location for output to
# be correct.  Chain the entire geometry without using Mastercam leads.
# Set mi4 to activate!
#
#Axis substitution:
# View number 3 is the C zero location on the part and corresponds to the
# Y zero position of the "Mill Reference View".  Positions are wrapped
# from and to the diameter of the part as CCW for the Y positive direction.
# If geometry is drawn from View number 4 (Bottom), it is correct for the
# wrap/unwrap on the diameter.  The radius of the specified diameter is
# added to the Z position in the post.  The Y axis is the only axis to
# be converted with mill/turn.
#
#Simultaneous 4 Axis (11 gcode):
# Full 4 axis toolpaths can be generated from various toolpaths under the
# 'multi-axis' selection (i.e. Rotary 4 axis). All 5 axis paths are
# converted to 4 axis paths where only the angle about the rotation axis
# is resolved. Use View number 3 for the toolplane with all 'multi-axis'.
# 4 and 5 axis toolpaths are converted assuming cross machining only!
#
#Y axis output and machining over part center:
# Output Y axis motion by setting 'Rotary axis/Y axis' in the NC
# parameter page.  This requires a valid Axis Combination in your machine defintion.
# y_axis_mch is set from the axis combination.
# Set 'Rotary axis/Y axis' in a machine with no Y axis (y_axis_mch = 0)
# to force linear/circular position moves in the XZ plane (g18).
# This allows machining over the part center.
#Caution: The machining must stay in the XZ plane at a Y fixed value
# when y_axis_mch = zero because no C (other than the Tplane) or
# Y positions are output!!!  This occurs when selecting C_axis/Cross
# Contour without 'y_axis_mch'.  Use Mill toolpaths for cross profiling.
#
#NOTICE: Milling through the part center with a linear move requires the
#        geometry be broken at the centerline.  Milling through the part
#        center with an arc move in the G18 plane, no Y axis and on the
#        negative side of X, reverses only the arc direction and I sign.
#
#Additional Notes:
# 1) G54 calls are generated where the work offset entry of 0 = G54,
#    1 = G55, etc.
# 2) Metric is applied from the NCI met_tool variable.
# 3) The Tplane angle is added to polar conversion and rotary paths.
# 4) The variable 'absinc' is now pre-defined, set mi2 (Misc. Integer) for
#    the 'top level' absolute/incremental program output.  Subprograms are
#    updated through the Mastercam dialog settings for sub-programs.
# 5) Lathe disables coordinate mirror and rotate subprograms.
# 6) When creating tools the diameter/radius should end as even numbers
#    relative to the machine precision. EX. Enter 1.0002 dia. and not
#    1.0001 dia. with a machine accuracy of .0001.
# 7) Transform subprograms are intended for use with G54... workshifts.
# 8) Incremental motion at a toolchange is calculated from the values
#    entered for home position.

Did you follow the process laid out here?

Link to comment
Share on other sites

I  use polar most of the time on multiple NLXes. The main advantage for ME is that it totally eliminates lines in the part. Lines from c axis steps.

I think you may be violating this rule, maybe?

# axis.  All paths must start and end at the 'C0'location for output to
# be correct.  Chain the entire geometry without using Mastercam leads.

 

I think the mplmaster worked out of the box for me.

Link to comment
Share on other sites

OK, I read the instructions in the post and each individual path is working correctly.  However, when multiple toolpaths in a row are posted there seems to be an issue.  

 

Basically, every comment in the program below is a new toolpath, with a new plane created in MCAM.  I think I need to cancel Polar Coordinate mode, C index to the start of the next path, then turn Polar Coordinate mode back on.  If I post each path individually they come as as needed. Is there a way to get that to work or is that a post edit job?

 

Post version is :  V16.00 P4 E1 W16.00 T1400866933 M16.00 I0 O10

 


( 3/16 BULL ENDMILL 0.0313 RAD)
M05
M98 P7000
G54
 
T1313
 
M200
G17 G98
M45(CONNECT C AXIS)
M69(C AXIS BRAKE OFF)
G0 X1.9075 Y0. Z1. C0. M8
G97 S6000 M13
G12.1 (POLAR COORDINATE INTERPOLATION MODE ON)
G1 X1.9075 C0. F500.
Z.1
Z-.125 F60.
X1.6075 F30.
G2 X0. C-.8037 R.8037
X-1.6074 C0. R.8037
X0. C.8037 R.8037
X1.6074 C0. R.8037
G1 X1.9075
Z.1 F500.
(FACE OD - CORNER RAD 1)
X1.7423 F30.
Z-.125 F60.
X1.4423 F30.
G2 X1.5691 C-.1499 R.2088
X1.5556 C-.2024 R.2088
G1 X1.846 C-.2402
Z.1 F500.
(FACE OD - CORNER RAD 2)
X1.9075 C0. F30.
Z-.125 F60.
X1.6075 F30.
G2 X1.397 C-.1813 R.2087
G1 X1.5457 C-.3116
Z.1 F500.
(FACE OD - CORNER RAD 3)
X1.7433 C0. F30.
Z-.125 F60.
X1.4433 F30.
G2 X1.5693 C-.1495 R.2088
X1.556 C-.2019 R.2088
G1 X1.8463 C-.2396
Z.1 F500.
(FACE OD - CORNER RAD 4)
X1.9075 C0. F30.
Z-.125 F60.
X1.6075 F30.
G2 X1.3958 C-.1816 R.2087
G1 X1.5436 C-.3121
Z.1 F500.
Z1. F500.
G13.1 (POLAR COORDINATE INTERPOLATION MODE OFF)
M05
M46(DISCONNECT C AXIS)
M9

Link to comment
Share on other sites

OK, I got it at least functionally working.

 

I created a new variable:

polarcoordon : 0    #flag for if G12.1 is on or not

 

Added the flag after turning the polar coordinate mode on or off.

pmillccb        #Cross/Face canned cycle code, before
      if interp_flg = 0,
        [
        interp_flg = 1
        result = newfs(two, cabs)
        result = newfs(two, cinc)
        #Cross/Face canned cycle start code
        if abs(cuttype) = two,
          [
          #Face canned cycle start code, G112 (break ramp)
          #Fanuc style uses X diameter, C radius
          pbld, n$, *sg112, e$
          polarcoordon=1 ****************************added this line*******

 

pmillcca        #Cross/Face canned cycle code, after
      #cancel at end of op only regardless of whether or not the next op
      if interp_flg,
        [
        interp_flg = 0
        #Cross/Face canned cycle end code
        result = newfs(12, cabs)
        result = newfs(14, cinc)
        !cabs
        cabs = 0
        if abs(last_cuttype) = two,   #Face
          [
          #Fanuc Style
          pbld, n$, *sg113, e$
          polarcoordon = 0 ****************************added this line*******

 

And made a new post block:

pcoordretract
       if polarcoordon = 1,              
            [           
            pmillcca                       
            polarcoordon = 0            
            ] 

 

Inside the     "  mtlchg0$         #Call from NCI null tool change, mill "   block

if millcc,
        [
        n$, sgcode, pfxout, pfyout, pfcout, e$   ****************************added this line*******
        pmillccb #Set mill conversion
        pcom_moveb
        ]

Then added my new post block to the bottom of   "ptoolend" block

 

There isn't any logic to it, it will cancel polar coord mode and reposition the C axis, weather you actually need it or not.  And I have the Y axis being output, beacuse I'd like to figure out how to get an alarm/error if the Y is not at zero and the polar coord mode is getting turned on.  But for now at least I can see the Y0. at the start of each toolpath and know that that part of it is correct.

But this works with the the normal mill contour path.  I've haven't spent much time working with them, but I have never used any of the "C-axis paths".  I just use the normal milling toolpaths.  I tried the C axis face controur as part of trying to get the polar coordinate mode working.  It would only post one toolpath. Currently I need to use "force tool change" for that path.  Just some more post editing I think.  Maybe some time I'll fix that, but like I said, I don't use those toolpaths.

But it looks like it works now with the mill contour toolpath at least.  I haven't tried it at the machine yet.

If anyone has any suggestions about any of this I would like to hear it.

Thanks,

Brian

 

Link to comment
Share on other sites
  • 1 year later...

I'm currently not seeing the results I'd like with the G12.1. Attached is the current code (Citizen L20-Mitsubishi control) and the blueprint. The print is in inches but the program is in metric. I programmed the final part dimension + the radius of the tool (.125"), this way the R value on the offset screen is 0.  
The issues are as follows, the final dimension is approximately .032" to big on the .072" +0./-.004" dimension(width across flats). I've programmed the X and C axis radially. I verified that the tool is centered (X0./Y0.) to the sub-spindle.
Also, there's no .127mm(.005") radius on the corners of the square. 


As the program reflects I'm using G41 and G2's. Per the attached picture captured from the Instruction Manual for the Citizen L20, I should be using G42 and G3's, which is correct? I'm wondering if this is why my part has no .127mm(.005") radius on the corners of the square? 

Thanks in advance for the support.

300.txt

FSP.PNG

G41-G42.PNG

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

So.... I read there is a Mazak guy who'se familiar with polar interpolation?  Currently, I have the machine set to do a 1.57 dia hole offset from center on a milling cycle.  What the machine is doing is a start/stop point to point with all the C-axis output moves.

 

So the machine is a Mazak Multiplex 6300, control 640T...

 

A bit of history:  I had to go back n fourth with the Dealer ( the post company) and Mazak HQ on the issues I was having.  Mazak pretty much told the  Dealer to their faces how they don't know how to program for a mazak.... which was a bit gunny, yet rude at the same time.  It became too much of a huge frustration issue for me because Dealer expects me to provide the right codes on how this is supposed to work, but since the post is new for this machine, and the Dealer didn't really have a working multiplex post file, it was a lot of trial and error.

 

But anyway, back to now, does Mazak support polar interpolation?  If they do, I don't think it is set right.... or not set at all.

So who wants to take a crack at this?  lol

 

-JD

Edited by ihsDavidM
Remove reseller name
Link to comment
Share on other sites
4 hours ago, JeremyV said:

So.... I read there is a Mazak guy who'se familiar with polar interpolation?  Currently, I have the machine set to do a 1.57 dia hole offset from center on a milling cycle.  What the machine is doing is a start/stop point to point with all the C-axis output moves.

 

So the machine is a Mazak Multiplex 6300, control 640T...

 

A bit of history:  I had to go back n fourth with Dealer ( the post company) and Mazak HQ on the issues I was having.  Mazak pretty much told Dealer to their faces how they don't know how to program for a mazak.... which was a bit gunny, yet rude at the same time.  It became too much of a huge frustration issue for me because Dealer expects me to provide the right codes on how this is supposed to work, but since the post is new for this machine, and Dealer didn't really have a working multiplex post file, it was a lot of trial and error.

 

But anyway, back to now, does Mazak support polar interpolation?  If they do, I don't think it is set right.... or not set at all.

So who wants to take a crack at this?  lol

 

-JD

Shot me a PM and I will send you my email. Might want to remove the dealer name that is frowned on here throwing dealers under the bus.

Yes they support Polar Interpolation. I was doing this back 30 years ago by hand on the T2 controls when we put everything in binary outputs.

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