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:

Outpotting tool length


Recommended Posts

I'm updating a post from X6 to X9. Generic Fanuc 5X Router.pst. Using G10 L10 to set tool length and I'm missing something. Please help.

 

 

 

I'm trying to call from nci 20007 line, parameters 12 and 13. For the first tool change the nci is:

 

 

 

 

20007

0. 2.65 2.65 2.65 0.261 1.055 0.9 0 100. 26. 0 2.65 4.45

 

 

Posted code is:

 

 

(T5 .261 DAGGER DRILL)

(TOOL HEIGHT = 3.55) ---------------- should be 7.1--from holders parameters NCI 20007 12 & 13

 

 

 

(T1 3/16 OSG BNC)

(TOOL HEIGHT = 2.) ---------------- should be 5.873

 

 

G90

G10L2P1X85.662Y16.653Z-65.634B0C0

G10 L10 P5 R3.55 (.261 DAGGER DRILL) ----------------should be R7.1

G10 L10 P1 R2. (3/16 OSG BNC) ---------------- should be 5.873

 

 

From the post:

 

 

# Parameter Data

 

# --------------------------------------------------------------------------

 

tmp1 : 0 # Holder and Overall Tool Length Values

 

tmp2 : 0

 

tmp3 : 0 # Overall Value

 

tmp4 : 0

 

tmp5 : 0

 

tmp6 : 0

 

tmp7 : 0 # Holder Value

 

fmt "" 2 set_length # Tool Set Length Holder + tool overall

 

pwrtt$ #Pre-read NCI file

 

if t$ > zero & t$ <> prv_t$,

 

[

 

t_n = t$

 

spaces$ = zero

 

sopen_prn, *t_n, 32, *strtool$, sclose_prn, e$

 

if str_mfgcode <> sblank,

 

[

 

str_mfgcode = ucase(str_mfgcode)

 

sopen_prn, *str_mfgcode, sclose_prn, e$

 

str_mfgcode = sblank

 

]

 

if str_chuck <> sblank,

 

[

 

str_chuck = ucase(str_chuck)

 

sopen_prn, *str_chuck, sclose_prn, e$

 

str_chuck = sblank

 

]

 

set_length = (tmp3 + tmp7)

 

subout$ = three

 

g10_p = tempf10

 

g10_r = set_length + tool_set

 

"G10 L10", 32, *g10_p, 32, *g10_r, 32, sopen_prn, *strtool$, sclose_prn, e$

 

subout$ = zero

 

sopen_prn, "TOOL HEIGHT = ", *set_length, sclose_prn, e$

 

*e$

 

spaces$ = prv_spaces$

 

!t$

 

]

 

pwrttparam$ #Pre-read parameter data

 

#"pwrttparam", ~prmcode$, ~sparameter$, e$

 

if prmcode$ = 20007 & use_tl_hldr, tmp1 = rpar(sparameter$, 13)

 

if prmcode$ = 20002, str_mfgcode = sparameter$

 

if prmcode$ = 20003, str_chuck = sparameter$

 

if prmcode$ = 20007, tempf1 = rpar(sparameter$, 12)

 

pparameter$ #Parameter Read

 

if prmcode$ = 20007, tempf1 = rpar(sparameter$, 12)

 

if prmcode$ = 20007 & use_tlength = one, temp1 = rpar(sparameter$, 3)

 

if prmcode$ = 20007 & use_tl_hldr, tmp1 = rpar(sparameter$, 13)

 

if prmcode$ = 20002, str_mfgcode = sparameter$

 

if prmcode$ = 20003, str_chuck = sparameter$

Link to comment
Share on other sites

The 'rpar' function is setup to grab a range of variables and put them into an implied array. You are trying to grab individual parameters.

 

You either need to have a single line of code reading the 20007 parameter number, and setup 13 numeric variables to get all the values, or you need to use the 'rparsngl' function to grab just the individual parameter you are looking for. You aren't getting the data you think you are getting, because of the way the 'rpar' function works.

Link to comment
Share on other sites

Thanks Colin. I changed the rpar to rparsngl the output values are all 0. now.

 

pwrttparam$ #Pre-read parameter data

#"pwrttparam", ~prmcode$, ~sparameter$, e$

if prmcode$ = 20007 & use_tl_hldr, tmp1 = rparsngl(sparameter$, 13)

if prmcode$ = 20002, str_mfgcode = sparameter$

if prmcode$ = 20003, str_chuck = sparameter$

if prmcode$ = 20004, tempf1 = rparsngl(sparameter$, 12)

 

pparameter$ #Parameter Read

if prmcode$ = 20004, tempf1 = rparsngl(sparameter$, 12)

if prmcode$ = 20007 & use_tlength = one, temp1 = rparsngl(sparameter$, 3)

if prmcode$ = 20007 & use_tl_hldr, tmp1 = rparsngl(sparameter$, 13)

if prmcode$ = 20002, str_mfgcode = sparameter$

if prmcode$ = 20003, str_chuck = sparameter$

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