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:

Trying to post stock to leave at each toolpath


Recommended Posts

I'm trying to get my post to show the stock to leave amount in xy and z is for each toolpath. Not having much luck though. I've used rpar before to get the tool radius before so I'm not sure what I am missing.
 
Below is my defined variables

xystockwdg : 0
zstockwdg : 0

fmt "XY STOCK" 4 xystockwdg
fmt "Z STOCK" 4 zstockwdg
 
 
 
My pparameter looks like this
 
 
pparameter$ #Parameter Read

if prmcode$ = 10010, xystockwdg = rpar(sparameter$, 1) #Capture stock to leave (XY)
if prmcode$ = 10068, zstockwdg = rpar(sparameter$, 1) #Capture stock to leave (Z)

 

 

 

Then i'm using

*xystockwdg, e$

*zstockwdg, e$

 

 

To post out the variables. But the numbers don't match up with the stock to leave in Mastercam. Not sure what I'm missing.

Any help is greatly appreciated.

 

Link to comment
Share on other sites

Glad you got it. Format Statement #4 is Integer, so that's exactly why you weren't getting what you needed.

 

Typically, FS2 #2 is "decimal, 4,3 place". Meaning you'll get 4 place decimal for Inch, and 3 place decimal for Metric values.

 

Is there are reason you are using Format Statement #3? That output is set to "Delta", which is not really the correct option to use here, unless you've changed the default 'fs2' format statement numbers. Depending on how you use it, it may work, but I'd recommend using #2 for all "normal" Inch output. #2 will output up to 4 decimal places, and "less" decimals if the number entered into the dialog isn't a 4 place value. So you get ".1" if that is what you enter, ".02" if that is your value, ect.

 

As a test, try entering ".1234" in all of your operations and post out say 3 contours in a row. I'm going to bet that FS #3 will not give you the results you are expecting. (It may, but it is always worth testing more than one scenario when developing a post...)

Link to comment
Share on other sites

Glad you got it. Format Statement #4 is Integer, so that's exactly why you weren't getting what you needed.

 

Typically, FS2 #2 is "decimal, 4,3 place". Meaning you'll get 4 place decimal for Inch, and 3 place decimal for Metric values.

 

Is there are reason you are using Format Statement #3? That output is set to "Delta", which is not really the correct option to use here, unless you've changed the default 'fs2' format statement numbers. Depending on how you use it, it may work, but I'd recommend using #2 for all "normal" Inch output. #2 will output up to 4 decimal places, and "less" decimals if the number entered into the dialog isn't a 4 place value. So you get ".1" if that is what you enter, ".02" if that is your value, ect.

 

As a test, try entering ".1234" in all of your operations and post out say 3 contours in a row. I'm going to bet that FS #3 will not give you the results you are expecting. (It may, but it is always worth testing more than one scenario when developing a post...)

Ya, I fat fingered a 3 instead of a 2. Thanks for the help though. 

 

I'm programming for a 5 axis machine and I thought there was some way to setup up a safe boundary to retract tools to before positioning the rotary. I'm having trouble finding any option though that allows for that.

I'm using the generic 5 axis post.

Link to comment
Share on other sites

Yes, it is built into the 5X Post.

#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 origin
use_stck_typ : 0     #0=Off, 1=Stock def., 2=Limits
up_x_lin_lim : 250.  #X axis limit in positive direction
up_y_lin_lim : 250.  #Y axis limit in positive direction
up_z_lin_lim : 250.  #Z axis limit in positive direction
lw_x_lin_lim : -250. #X axis limit in negative direction
lw_y_lin_lim : -250. #Y axis limit in negative direction
lw_z_lin_lim : -5.   #Z axis limit in negative direction

clear_stck   : 0.    #Add inc. offset to stock definition for transition boundary
retract_on_rpd : 1   #This control allows retract on rapids too (don't assume rapid is safe)

To get the 'safety moves', you've got to enable the safe zone "type" inside the post variables. You then control the retract behavior by setting 'mi8$' in the individual toolpaths:

# mi8 - Safe retract/approach at toolchange.
#       The tool retracts/approachs to limits from last path to current
#       path or after/before a toolchange
#       (limits must be enabled, see 'use_stck_typ')
#        0 = Disable all toolchange retract/approach
#        1 = Enable null toolchange retract/approach only
#        2 = Enable toolchange retract/approach only
#        3 = Enable both toolchange retract/approach
#        4 = Enable retract/approach between 5 axis chains (cutpos) in
#            toolpath or sign 1 to 3 negative with toolchange options

You turn it on with the 'use_stck_typ' variable. There are a couple different ways to utilize the function. It really depends on the type of 5X machine you have.

 

  1. If you have a Gantry Style machine, then you can set 'use_stck_typ' to either '1' or '2'. With a setting of '1', the post will use your Stock Definition inside the Machine Group Properties tab as the "safe retract zone". When using '1', you also can set the "clear_stck" variable for an "incremental clearance value" that gets added to the Stock Definition, and the post will retract to that "zone" when re-positioning around the part.
  2. If you set it to '2', then the post will use the numeric values held in the 6 variables that give you min/max values for XYZ. This can be a good option, but I think the setting of '1' in conjunction with the 'clear_stck' value is more flexible.
  3. If you have a Trunnion style machine, with both rotaries on the "part side", then you can use a "Absolute safe height Retract in Z" with "mr6$".
# mr6 - Absolute Safe height in Z for unwinds and toolchanges 
#       (limits must be enabled and mi8, see 'use_stck_typ')
#       (set the limits to zero to ignore limits and use this safe height)
#       0 = Off

For that option, 'use_stck_typ' needs to be set to '2' and the limits inside the post should all be set to '0.0'. The 'mi8$' switch needs to be enabled. When these conditions are met, you can use 'mr6$' and enter a Z height. The 'mi8$' switch controls when the Safe Height move is output, and the 'mr6$' allows you to change the value on a "per toolpath" basis.

 

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