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:

Output # of points to drill (MPMaster)


Recommended Posts

How involved would it be to post out Number of points drilled like min and max values??

 

Example:

 

M01

N72 T72 M06 ( 1/4 SPOTDRILL)

(MAX - Z2.)

(MIN - Z-.56)

(26 PLACES) *****ADD TO POST*****

M11 (UNLOCK)

G00 G17 G90 G54.1 P59 X-.81 Y9.5 B0. S12000 M03

M10 (LOCK)

G43 H72 Z2. M08 T75

G94

G98 G81 Z-.56 R.1 F20.

X0. Y10.31

X.81 Y9.5

ETC....

Link to comment
Share on other sites

How involved would it be to post out Number of points drilled like min and max values??

 

Example:

 

M01

N72 T72 M06 ( 1/4 SPOTDRILL)

(MAX - Z2.)

(MIN - Z-.56)

(26 PLACES) *****ADD TO POST*****

M11 (UNLOCK)

G00 G17 G90 G54.1 P59 X-.81 Y9.5 B0. S12000 M03

M10 (LOCK)

G43 H72 Z2. M08 T75

G94

G98 G81 Z-.56 R.1 F20.

X0. Y10.31

X.81 Y9.5

ETC....

 

I don't think this would be trivial. You are saying you would like a comment stating the number of drill points prior to the drill operation. The NCI file is linear and so the only way to find out that piece of information is to suspend all code output until after all the points are drilled while counting the number of points. Then the number of points could be output, and then release all the "buffered" code. It would be a bit of a pain to set up, but I doubt it would be impossible. You should contact your reseller and see what they suggest.

 

M30

Link to comment
Share on other sites

Very easy. Just add the desired comment into the comment box of the corresponding drill toolpath. See attached.DRILL.pdf

 

That works, and I have done it that way, But I was talking about modifying the post so it would post out all the drill type opps with the number of points in that operation in (). I know that I would like to put a switch in the post and build the variables, but just curios if it's an easy add to the post.

Link to comment
Share on other sites

I don't think this would be trivial. You are saying you would like a comment stating the number of drill points prior to the drill operation. The NCI file is linear and so the only way to find out that piece of information is to suspend all code output until after all the points are drilled while counting the number of points. Then the number of points could be output, and then release all the "buffered" code. It would be a bit of a pain to set up, but I doubt it would be impossible. You should contact your reseller and see what they suggest.

 

M30

 

 

Would it be possible to pull the variable # from the opps manager in that operation instead of using a buffer. I could call my reseller and have him do it, but I like the challenge of making it work and being able to do it my self.

Link to comment
Share on other sites

Would it be possible to pull the variable # from the opps manager in that operation instead of using a buffer. I could call my reseller and have him do it, but I like the challenge of making it work and being able to do it my self.

Only certain information is passed to the NCI via paramaters. The number of points or chains is not included in the parametric data. The only information that is accessible to the post is contained in the toolpath parameter tab.

 

A buffer is the only way to do what you are trying to do. I have some examples of buffer code, if you are unfamiliar with how to set one up.

Link to comment
Share on other sites

Only certain information is passed to the NCI via paramaters. The number of points or chains is not included in the parametric data. The only information that is accessible to the post is contained in the toolpath parameter tab.

Parameter number 15083 outputs the number of points in a drilling op for me. (X5 MU1)

Let me know if you need help setting it up.

Link to comment
Share on other sites

Here is what it takes.

 

first, initialize the new variable....

 

# Common User-defined Variable Initializations (not switches!)
# --------------------------------------------------------------------------
drillnum : 0 #number of points

 

Then format it with your custom prefix....(last one below...)

 

# Toolchange / NC output Variable Formats
# --------------------------------------------------------------------------
fmt T 4 t$ #Tool No
fmt T 4 first_tool$ #First Tool Used
fmt T 4 next_tool$ #Next Tool Used
fmt D 4 tloffno$ #Diameter Offset No
fmt H 4 tlngno$ #Length Offset No
fmt G 4 g_wcs #WCS G address
fmt P 4 p_wcs #WCS P address
fmt S 4 speed #Spindle Speed
fmt M 4 gear #Gear range
fmt "HOLE COUNT = " 4 drillnum #

 

Then you need to have the NCI give your new variable (drillnum) a value...

 

pparameter$ # Run parameter table
if prmcode$ = 15083, drillnum = rpar(sparameter$,1)

 

Now output it wherever you want... (I chose right at the top of the toolchange common postblock)

 

ptlchg_com #Tool change common blocks
if opcode$ = 3, pbld, n$, "(", *drillnum, ")", e$
if force_output | sof,
[
result = force(ipr_type,ipr_type)
result = force(absinc$,absinc$)
result = force(plane$,plane$)
]

 

Here is what I get for code....

 

N232 G91 G00 G28 Z0.
N234 M00
N236 ( HOLE COUNT = 17 )
N238 ( LOAD T2 M06 )
N240 M00
N242 M11 (UNLOCK C)
N244 M13 (UNLOCK 
N246 G00 G17 G90 G54 C30. B0. X5.4218 Y0. S983 M03
N248 M12 (LOCK 
N250 G43 H2 Z8.419
N252 M08
N254 G94
N256 G98 G81 Z6.169 R6.519 F4.25

For some reason I cant get the indentation to work correctly here.... just follow along with the lines of code in your post.

HTH!

Link to comment
Share on other sites

Here is what it takes.

 

first, initialize the new variable....

 

# Common User-defined Variable Initializations (not switches!)
# --------------------------------------------------------------------------
drillnum : 0 #number of points

 

Then format it with your custom prefix....(last one below...)

 

# Toolchange / NC output Variable Formats
# --------------------------------------------------------------------------
fmt T 4 t$ #Tool No
fmt T 4 first_tool$ #First Tool Used
fmt T 4 next_tool$ #Next Tool Used
fmt D 4 tloffno$ #Diameter Offset No
fmt H 4 tlngno$ #Length Offset No
fmt G 4 g_wcs #WCS G address
fmt P 4 p_wcs #WCS P address
fmt S 4 speed #Spindle Speed
fmt M 4 gear #Gear range
fmt "HOLE COUNT = " 4 drillnum #

 

Then you need to have the NCI give your new variable (drillnum) a value...

 

pparameter$ # Run parameter table
if prmcode$ = 15083, drillnum = rpar(sparameter$,1)

 

Now output it wherever you want... (I chose right at the top of the toolchange common postblock)

 

ptlchg_com #Tool change common blocks
if opcode$ = 3, pbld, n$, "(", *drillnum, ")", e$
if force_output | sof,
[
result = force(ipr_type,ipr_type)
result = force(absinc$,absinc$)
result = force(plane$,plane$)
]

 

Here is what I get for code....

 

N232 G91 G00 G28 Z0.
N234 M00
N236 ( HOLE COUNT = 17 )
N238 ( LOAD T2 M06 )
N240 M00
N242 M11 (UNLOCK C)
N244 M13 (UNLOCK 
N246 G00 G17 G90 G54 C30. B0. X5.4218 Y0. S983 M03
N248 M12 (LOCK 
N250 G43 H2 Z8.419
N252 M08
N254 G94
N256 G98 G81 Z6.169 R6.519 F4.25

For some reason I cant get the indentation to work correctly here.... just follow along with the lines of code in your post.

HTH!

I was starting to go about it with a switch, but I like how you have done it. I have added it and it works awesome! Thanks a ton. The new syntax highlighting and format on the forum is nice for the post editing section!!
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...