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:

CIRCLE DIAMETER PARAMETER


Recommended Posts

Good morning forum,
   I've been calling out "CIRCLE DIAMETER" from CIRCLE MILL toolpath (please see image).  I saw it was 12207 parameter as
"Circle diameter (used when circles are defined by points" and I called out into the post and it showed "0."  Would you please tell me what I've done wrong?

 

Thank you for your help.

============= G-CODES ================
O6075(0042-06075 REV02 OP1 FIXTURE.NC)
N20( .3750, 3/8 EM, CB, USED TOOL,)
(2FLTS .563LOC, .63STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19 (.075 ROUGH STEPOVER, 20.PERCENT TOOL DIA.)
(0. DIA, .0375MIN, .1313MAX. RAD. STEPOVER) ================> It should show .750 DIA
/G28 Y0.
T20 M6(ROUGH AND FINISH 4X' C'BORES, CUT#1)
G90 G54 S7500 M3
X-4.3761 Y4.5434
G43 H20 Z1. M8(DOC= Z-.625)
Z.0625
G3 X-4.5 Y4.6313 Z.0483 R.1313 F20.
(CUTTING...)
X-4.5 Y-4.3125 R.1875
G0 Z.125
Z1.
M9
G91 G28 Z0. M5
G28 Y0. M5
M30

============= Code Defined ================
 

#Region CUSTOMED STRINGS
CircleMillDia: 0
#EndRegion CUSTOMED STRINGS


#Region Customed FMT
fmt ""  2 CircleMillDia
#EndRegion Custom FMT


#Region pparameter
pparameter$ # Run parameter table
if prmcode$ = 12207, CircleMillDia = rpar(sparameter$, 1) #get circle mill diameter
#EndRegion pparameter$

 
 

#Region Customed Post Block

#Region pCircleMill
pCircleMill
   if tool_op$ = 18,
      if CircleMillRoughIO = 1 & CircleMillStepover > 0, #Circle Mill
      [
       "(", *CircleMillStepover, "ROUGH STEPOVER, ", *CircleMillStepoverPercent, no_spc$, "PERCENT TOOL DIA.)", e$
      ]

      if CircleMillRoughIO = 1 & CircleMillEnableHelicalEntry = 1,
      [
       "(", *CircleMillDia, "DIA, ", *CircleMillMinimumRadius, no_spc$, "MIN, ", *CircleMillMaximumRadius, no_spc$, "MAX. RAD. STEPOVER)", e$
      ]

      if MultiPasses = 1,
      [
        if NumberOfRoughStepOver >1 & not(drillcyc$), pbld, no_spc$, no_spc$, "(", *NumberOfRoughStepOver, no_spc$, "X", " SEMI-FINISHES, ", *MultiPassesRoughStepOver, "EACH)", e$
        if NumberOfRoughStepOver = 1 & not(drillcyc$), pbld, no_spc$, no_spc$, "(", *NumberOfRoughStepOver, no_spc$, "X", "SEMI-FINISH, ", *MultiPassesRoughStepOver, "EACH)", e$
      ]

      if CircleMillEnableFinishPasses = 1 & CircleMillEnableSemiFinishPasses = 1,
      [
        if NumberOfMultiPassesFinish = 1 & not(drillcyc$), "(", *NumberOfMultiPassesFinish, no_spc$, "X FINAL FINISH, ", *MultiPassesFinishStepOver, no_spc$, "EACH)", e$
        if NumberOfMultiPassesFinish > 1 & not(drillcyc$), "(", *NumberOfMultiPassesFinish, no_spc$, "X FINAL FINISHES, ", *MultiPassesFinishStepOver, no_spc$, "EACH)", e$
      ]
         CircleMillStepover = 0
         CircleMillStepoverPercent = 0
         CircleMillRoughIO = 0
	  
         NumberOfMultiPassesFinish = 0
         MultiPassesFinishStepOver = 0
         CircleMillEnableFinishPasses = 0
         CircleMillEnableSemiFinishPasses = 0
	  
	 NumberOfRoughStepOver = 0
	 MultiPassesRoughStepOver = 0
	 MultiPasses = 0	  
	  
	 CircleMillMinimumRadius = 0
         CircleMillMaximumRadius = 0
  	 CircleMillEnableHelicalEntry = 0
	 CircleMillRoughIO = 0

 

#Region Tool change common blocks
ptlchg_com      #Tool change common blocks
      if mr1$ < 5, pbld, *sgabsinc, sg28, "Z0", sm19, [if tool_op$ = 18, pCircleMill], e$ # G28 Y0 M8 home here


#Region Null tool change
ptlchg0$         #Call from NCI null tool change (tool number repeats)
    pCircleMill

 

 

Slot Mill Circle.PNG

MIA55Riser(5axis table).dxf

Circle Mill.PNG

Helix Bore Circle.PNG

Circle Mill Parameter.png

Link to comment
Share on other sites

As your diameter is "greyed out" I think your point is an arc center or is associated with one.

Try copying the point to a different level on its own and reselect. You should get a field which you can enter a diameter in and this might return the value you desire.

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

As your diameter is "greyed out" I think your point is an arc center or is associated with one.

Try copying the point to a different level on its own and reselect. You should get a field which you can enter a diameter in and this might return the value you desire.

I tried but it still showing "0.", I think it is probably wrong parameter as 12207?  

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

As your diameter is "greyed out" I think your point is an arc center or is associated with one.

Try copying the point to a different level on its own and reselect. You should get a field which you can enter a diameter in and this might return the value you desire.

Hi NickBe,
   I just used the " "pparameter", ~prmcode$, ~sparameter$, e$" to find out the parameter and after a while the parameter for the DIAMETER is "15237".

Now it really shows.....

N4( .5000, 1/2 EM, CB, ROUGHER,)
(3FLTS 1.000LOC, 1.25STO)
G0 G17 G40 G49 G80 G90
G91 G28 Z0 M19 (.25 ROUGH STEPOVER, 50.PERCENT TOOL DIA.)
(6.000 DIA, .05MIN, .225MAX. RAD. STEPOVER) ================ Now shows... 6.000 DIA
/G28 Y0.(TOOLPATH LENGTH= .05 MIN.)
M8
T4 M6(2D TOOLPATHS - CIRCLE MILL, CUT#6)
G90 G54 S7500 M3
X-.1023 Y.2004(XYZ STK= .015)
G43 H4 Z1. (DOC= Z.015)
Z.0625
G3 X-.225 Y0. Z.0582 R.225 F100.
X0. Y-.225 Z.052 R.225
(CUTTING....)
G0 Z.125
Z1.
M9
G91 G28 Z0. M5
G28 Y0. M5
M30

Link to comment
Share on other sites
13 hours ago, C^Millman said:

Okay dumb question what version of the MP Documentation are you using? Could this have changed and you didn't have the most current? If not then you found a bug and you need to report it to QC. If so then good work finding the correct one.

 

Hi Millman,
   This is what I have.

 

[POST_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V20.00 P0 E1 W20.00 T1498397872 M20.00 I0 O0
# Post Name           : MPMASTER
# Product             : MILL
# Machine Name        : MACHINE
# Control Name        : CONTROL
# Description         : IHS MASTER GENERIC MILL G-CODE POST
# 4-axis/Axis subs.   : YES
# 5-axis              : NO
# Subprograms         : YES
# Executable          : MP v11.0
# Post Revision       : 11.2.07337 (MC_FULL.MC_MINOR.YYDDD)
#
# WARNING: THIS POST IS GENERIC AND IS INTENDED FOR MODIFICATION TO
# THE MACHINE TOOL REQUIREMENTS AND PERSONAL PREFERENCE.
#
Link to comment
Share on other sites
1 hour ago, PcRobotic said:

 

Hi Millman,
   This is what I have.

 


[POST_VERSION] #DO NOT MOVE OR ALTER THIS LINE# V20.00 P0 E1 W20.00 T1498397872 M20.00 I0 O0
# Post Name           : MPMASTER
# Product             : MILL
# Machine Name        : MACHINE
# Control Name        : CONTROL
# Description         : IHS MASTER GENERIC MILL G-CODE POST
# 4-axis/Axis subs.   : YES
# 5-axis              : NO
# Subprograms         : YES
# Executable          : MP v11.0
# Post Revision       : 11.2.07337 (MC_FULL.MC_MINOR.YYDDD)
#
# WARNING: THIS POST IS GENERIC AND IS INTENDED FOR MODIFICATION TO
# THE MACHINE TOOL REQUIREMENTS AND PERSONAL PREFERENCE.
#

Not post version but MP Doc where you found the parameter.

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

I downloaded it from this forum. MPMaster post.

What version of the documentation that defines all the variables of Mastercam post are you using is my question not what Post you are using, but the version of documentation. X2017, X2018 ,X9, or V9 what is the version of the Documentation that are PDF documents? 

Link to comment
Share on other sites
2 hours ago, jeff.D said:

The parameter number you're using should not work, as it's the op_id$ value.  Have you tested this thoroughly?  Is there a chance that you happened to post op_id$ 6 when testing?

image.thumb.png.056b49549bc0b3773a2cf2238e6e10ea.png

You are right, I tested couple and some of them turned out as op_id$ 1432 right on the G-CODEs

I also tried like your way as:

	  op_id$, "(OP ID)", e$
	  CircleDiameter = opinfo(12207, 0)
	  *CircleDiameter, e$

It shows "(0.DIA, .1125R-.225R STEPOVER)"

================================================================

pparameter$ # Run parameter table
     if prmcode$ = 12207, CircleDiameter = rpar(sparameter$, 1) #get circle mill diameter

================================================================

#Region pCircleMill
pCircleMill
   if tool_op$ = 18 | tool_op$ = 106,
   
     if CircleMillRoughIO = 1 | CircleMillEnableHelicalEntry = 1,
      [
       "(", *CircleDiameter, no_spc$, "DIA, ", *CircleMillMinimumRadius, no_spc$, "R-", *CircleMillMaximumRadius, no_spc$, "R STEPOVER)", e$
      ]
   
     if CircleMillRoughIO = 1 & CircleMillStepover > 0, #Circle Mill
      [
       "(", *CircleMillStepover, no_spc$, "XY ROUGH, ", *CircleMillStepoverPercent, no_spc$, "PERCENT TDIA.)", e$
      ]

     if MultiPasses = 1,
      [
       if NumberOfRoughStepOver >1 & not(drillcyc$), pbld, no_spc$, no_spc$, "(", *NumberOfRoughStepOver, no_spc$, "X", " SEMI-FINISHES, ", *MultiPassesRoughStepOver, "EACH)", e$
       if NumberOfRoughStepOver = 1 & not(drillcyc$), pbld, no_spc$, no_spc$, "(", *NumberOfRoughStepOver, no_spc$, "X", "SEMI-FINISH, ", *MultiPassesRoughStepOver, "EACH)", e$
      ]

     if CircleMillEnableFinishPasses = 1 & CircleMillEnableSemiFinishPasses = 1,
      [
       if NumberOfMultiPassesFinish = 1 & not(drillcyc$), "(", *NumberOfMultiPassesFinish, no_spc$, "X FINAL FINISH, ", *MultiPassesFinishStepOver, no_spc$, "EACH)", e$
       if NumberOfMultiPassesFinish > 1 & not(drillcyc$), "(", *NumberOfMultiPassesFinish, no_spc$, "X FINAL FINISHES, ", *MultiPassesFinishStepOver, no_spc$, "EACH)", e$
      ]
         CircleMillStepover = 0
         CircleMillStepoverPercent = 0
         CircleMillRoughIO = 0
	  
         NumberOfMultiPassesFinish = 0
         MultiPassesFinishStepOver = 0
         CircleMillEnableFinishPasses = 0
         CircleMillEnableSemiFinishPasses = 0
	  
	 NumberOfRoughStepOver = 0
	 MultiPassesRoughStepOver = 0
	 MultiPasses = 0	  
	  
	 CircleMillMinimumRadius = 0
     CircleMillMaximumRadius = 0
  	 CircleMillEnableHelicalEntry = 0
	 CircleMillRoughIO = 0
	  
#EndRegion
Link to comment
Share on other sites
2 hours ago, C^Millman said:

What version of the documentation that defines all the variables of Mastercam post are you using is my question not what Post you are using, but the version of documentation. X2017, X2018 ,X9, or V9 what is the version of the Documentation that are PDF documents? 

 

2 hours ago, C^Millman said:

What version of the documentation that defines all the variables of Mastercam post are you using is my question not what Post you are using, but the version of documentation. X2017, X2018 ,X9, or V9 what is the version of the Documentation that are PDF documents? 

 

I have x9 parameter pdf file.

Link to comment
Share on other sites
56 minutes ago, PcRobotic said:

You are right, I tested couple and some of them turned out as op_id$ 1432 right on the G-CODEs

I also tried like your way as:


	  op_id$, "(OP ID)", e$
	  CircleDiameter = opinfo(12207, 0)
	  *CircleDiameter, e$

It shows "(0.DIA, .1125R-.225R STEPOVER)"

================================================================


pparameter$ # Run parameter table

     if prmcode$ = 12207, CircleDiameter = rpar(sparameter$, 1) #get circle mill diameter

================================================================


#Region pCircleMill
pCircleMill
   if tool_op$ = 18 | tool_op$ = 106,
   
     if CircleMillRoughIO = 1 | CircleMillEnableHelicalEntry = 1,
      [
       "(", *CircleDiameter, no_spc$, "DIA, ", *CircleMillMinimumRadius, no_spc$, "R-", *CircleMillMaximumRadius, no_spc$, "R STEPOVER)", e$
      ]
   
     if CircleMillRoughIO = 1 & CircleMillStepover > 0, #Circle Mill
      [
       "(", *CircleMillStepover, no_spc$, "XY ROUGH, ", *CircleMillStepoverPercent, no_spc$, "PERCENT TDIA.)", e$
      ]

     if MultiPasses = 1,
      [
       if NumberOfRoughStepOver >1 & not(drillcyc$), pbld, no_spc$, no_spc$, "(", *NumberOfRoughStepOver, no_spc$, "X", " SEMI-FINISHES, ", *MultiPassesRoughStepOver, "EACH)", e$
       if NumberOfRoughStepOver = 1 & not(drillcyc$), pbld, no_spc$, no_spc$, "(", *NumberOfRoughStepOver, no_spc$, "X", "SEMI-FINISH, ", *MultiPassesRoughStepOver, "EACH)", e$
      ]

     if CircleMillEnableFinishPasses = 1 & CircleMillEnableSemiFinishPasses = 1,
      [
       if NumberOfMultiPassesFinish = 1 & not(drillcyc$), "(", *NumberOfMultiPassesFinish, no_spc$, "X FINAL FINISH, ", *MultiPassesFinishStepOver, no_spc$, "EACH)", e$
       if NumberOfMultiPassesFinish > 1 & not(drillcyc$), "(", *NumberOfMultiPassesFinish, no_spc$, "X FINAL FINISHES, ", *MultiPassesFinishStepOver, no_spc$, "EACH)", e$
      ]
         CircleMillStepover = 0
         CircleMillStepoverPercent = 0
         CircleMillRoughIO = 0
	  
         NumberOfMultiPassesFinish = 0
         MultiPassesFinishStepOver = 0
         CircleMillEnableFinishPasses = 0
         CircleMillEnableSemiFinishPasses = 0
	  
	 NumberOfRoughStepOver = 0
	 MultiPassesRoughStepOver = 0
	 MultiPasses = 0	  
	  
	 CircleMillMinimumRadius = 0
     CircleMillMaximumRadius = 0
  	 CircleMillEnableHelicalEntry = 0
	 CircleMillRoughIO = 0
	  
#EndRegion

Jeff.D,
   How did you define the "PARAM12207"?  I got ZERO, I think I must be doing something wrong.

 

 

Thanks.

Link to comment
Share on other sites
On 6/6/2018 at 3:12 PM, C^Millman said:

Need to get a hold of Serria CAD/CAM and ask them to get you the 2019. Things change constantly.

 

Hi Millman,
   I got the 2019 pdf file and it is the same parameter, I have ZERO instead of a value.  Honestly I don't know why, tried to check, double check, triple check and still got the issue.  Would you please tell what I've done wrong?  


Thank you.

Link to comment
Share on other sites
On 6/6/2018 at 12:09 PM, jeff.D said:

The parameter number you're using should not work, as it's the op_id$ value.  Have you tested this thoroughly?  Is there a chance that you happened to post op_id$ 6 when testing?

image.thumb.png.056b49549bc0b3773a2cf2238e6e10ea.png

Hi Jeff,
  Would you please educate me how did you define the "param12207"?

 

Thank you.

Link to comment
Share on other sites

Steven,

This only works if you drive "Point" entities as your geometry to cut, and enter an actual "diameter value" in the dialog box.

If you select "arcs" as your geometry, then Mastercam will show the diameter in the dialog box inside Mastercam, but the value will be "grayed out", and non-editable. If that is the case, then parameter 12207 will only output 0.

The reason for this is simple:

When you use a Circle Mill Toolpath, with "circles" as the driving geometry, you are allowed to select multiple arcs, that vary in size. For example, you could select 3 arcs, one at 1" dia, the second at 3.5" dia, and the third at 1.045 dia, and the Circle Mill path will rough and finish all three arcs of different size. There is no requirement from the software that all arcs must be the same diameter. In fact, the opposite is true. The arcs can be any diameter that will allow the tool you are using to fit, and Mastercam will machine each one using the same strategy, but with different sizes.

If you are using "Circles" to drive your path, you will not be able to get the circle diameter. This only works if you drive the path with "Points" and type in the diameter by hand into the dialog box.

  • Thanks 1
  • Like 1
Link to comment
Share on other sites
41 minutes ago, Colin Gilchrist said:

Steven,

This only works if you drive "Point" entities as your geometry to cut, and enter an actual "diameter value" in the dialog box.

If you select "arcs" as your geometry, then Mastercam will show the diameter in the dialog box inside Mastercam, but the value will be "grayed out", and non-editable. If that is the case, then parameter 12207 will only output 0.

The reason for this is simple:

When you use a Circle Mill Toolpath, with "circles" as the driving geometry, you are allowed to select multiple arcs, that vary in size. For example, you could select 3 arcs, one at 1" dia, the second at 3.5" dia, and the third at 1.045 dia, and the Circle Mill path will rough and finish all three arcs of different size. There is no requirement from the software that all arcs must be the same diameter. In fact, the opposite is true. The arcs can be any diameter that will allow the tool you are using to fit, and Mastercam will machine each one using the same strategy, but with different sizes.

If you are using "Circles" to drive your path, you will not be able to get the circle diameter. This only works if you drive the path with "Points" and type in the diameter by hand into the dialog box.

Hi Colin,
   Thank you for your valuable time since you are very busy for the day.  Most of the time that I USE CIRCLE MILL, HELIXBORE... I only use one same diameter as my habit.  It seems very hard to define this parameter as 12207.  Would you please give me a hint how could I define it?  

   Once again, thank you for your time and I truly appreciate it.

 

 

S.Luong

Link to comment
Share on other sites

12207 only works when you select a Point Entity in Mastercam.

You select "Points", you enter the Diameter, and 12207 gets a value. If you select an "Arc", 12207 doesn't work.

It is as simple as that.

It doesn't matter that you only use a single diameter arc in your toolpath.

If you are driving Arc geometry, 12207 is output as 0.

That's just how Mastercam's Circle Mill toolpath works. I'm pretty sure what you are asking for just won't work, unless you are willing to change the geometry selection type.

I can't "make" Mastercam change the way it is coded internally. You could maybe do this with a C-Hook. But that is a lot of work to go through, to be able to read a Parameter that Mastercam just doesn't output. And coding a C-Hook to do this isn't something that I know how to do.

  • Like 1
Link to comment
Share on other sites
9 hours ago, Colin Gilchrist said:

12207 only works when you select a Point Entity in Mastercam.

You select "Points", you enter the Diameter, and 12207 gets a value. If you select an "Arc", 12207 doesn't work.

It is as simple as that.

It doesn't matter that you only use a single diameter arc in your toolpath.

If you are driving Arc geometry, 12207 is output as 0.

That's just how Mastercam's Circle Mill toolpath works. I'm pretty sure what you are asking for just won't work, unless you are willing to change the geometry selection type.

I can't "make" Mastercam change the way it is coded internally. You could maybe do this with a C-Hook. But that is a lot of work to go through, to be able to read a Parameter that Mastercam just doesn't output. And coding a C-Hook to do this isn't something that I know how to do.


Good morning Colin,
   I used CIRCLE MILL and I believe it allowed me to select the ARC as SINGLE POINT.  I believe this is one of the trickiest question that I ever ask since the PARAMETER 12207 is the right number but it shows ZERO.  I wish there is a book for how to make C-HOOK so I can start with.  I guess with the only way is to ask people in this forum to educate me how to make the post spits out the POINT as like you said.


Once again, thank you for your help.

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

BUt how do you do it  :D

Hi JParis,
   I think it's pretty tough to make the code does like the way we want as certain issue.  In my mind, not very many people can do that.  I also saw how Jeff did his output successfully making the post reads out the ARC as PARAM12207.  I wonder how that could be done and how did he define as the PARAM12207 (please see the image below) .   His way is a brand new way for me to define PARAMETER, I hope I can learn his way so I can have extra knowledge how to make the post works around just in case the way I already learned didn't work in this certain issue.


Thank you. 

JEFF.png

Link to comment
Share on other sites

param12207 is initialized the same way you would initialize any non-global variable in MP;  "(left margin)param12207 : 0"

Try this; 

  1. Open a new file and load your machine - DO NOT create any geometry 
  2. Press the F9 key to display the axis lines
  3. Create a circle mill toolpath, and select the origin point for the geometry 
  4. Under the toolpath's cut parameters, enter a diameter in the "Circle diameter" text box
  5. Post the file and see if the diameter entered in step 4  is present in the posted file.

 

  • Thanks 1
  • Like 1
Link to comment
Share on other sites
1 hour ago, jeff.D said:

param12207 is initialized the same way you would initialize any non-global variable in MP;  "(left margin)param12207 : 0"

Try this; 

  1. Open a new file and load your machine - DO NOT create any geometry 
  2. Press the F9 key to display the axis lines
  3. Create a circle mill toolpath, and select the origin point for the geometry 
  4. Under the toolpath's cut parameters, enter a diameter in the "Circle diameter" text box
  5. Post the file and see if the diameter entered in step 4  is present in the posted file.

 

Hi Jeff,
   Yes, it works.  Now, I know what I've done wrong.  

 

 

Thanks a million,
   S,Luong

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