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:

TOOL MATERIAL TYPE CALL OUT TO POST


Recommended Posts

Hello everyone,

    I think I asked this question before (not sure), I tried to call out TOOL MATERIAL.  TOOL MATERIAL which listed CARBIDE, HSS, TICOATED, USER DEFINE 1, USER DEFINE 2.

 

    I would like to call out this TOOL MATERIAL whenever a user chooses CARBIDE, HSS, TICOATED OR USER DEFINE.

 

    I think I have to call out the PARAMETER NUMBER and I couldn't find it although I tried to look on the PDF parameter from my DEALER provided.

 

 

 

 

Thanks for your help.

  • Like 1
Link to comment
Share on other sites

Do you know how to parse a parameter?

 

if prmcode$ = 20004,  tool_material = rparsngl(sparameter$, 3)
 
The 3 at the end of the (sparameter$, 3) is telling it to parse out bit 3 in parameter 20004
Link to comment
Share on other sites

 

Do you know how to parse a parameter?

 

if prmcode$ = 20004,  tool_material = rparsngl(sparameter$, 3)
 
The 3 at the end of the (sparameter$, 3) is telling it to parse out bit 3 in parameter 20004

 

Hi JParis,

   I didn't know how to parse a parameter and now I do after you just pointed out.

 

Thanks a bunch JParis.

Link to comment
Share on other sites
  • 4 weeks later...

Hi JParis,

  I did as you directed and I think I didn't do it right, would you please point it out of which I did wrong?  Thank you for your help.

 

I got the error message as, "11 Apr 2015 12:47:22 PM - PST LINE (2489) - The left side of the formula must be a real variable"

 

 

At....

# --------------------------------------------------------------------------
# Misc strings
# --------------------------------------------------------------------------
stool_material: ""      #20004 - Tool Material
 
Then....
pparameter$ # Run parameter table
           if prmcode$ = 20004, stool_material = rparsngl(sparameter$, 3)
 
Then... at...
ptlchg_com      #Tool change common blocks
      spaces$ = 0, pbld, *ToolSequenceNumber, scomm_str, *tldia_meta, ", ", ptoolcomm, stool_material, ", ", *flute_meta, "LOC, ", *n_flutes1, "Flt", ", ", *oa_meta, "LAH", scomm_end, spaces$=sav_spc, e$
      
Link to comment
Share on other sites

Hi JParis,

  I did as you directed and I think I didn't do it right, would you please point it out of which I did wrong?  Thank you for your help.

 

I got the error message as, "11 Apr 2015 12:47:22 PM - PST LINE (2489) - The left side of the formula must be a real variable"

 

 

At....

# --------------------------------------------------------------------------
# Misc strings
# --------------------------------------------------------------------------
stool_material: ""      #20004 - Tool Material
 
Then....
pparameter$ # Run parameter table
           if prmcode$ = 20004, stool_material = rparsngl(sparameter$, 3)
 
Then... at...
ptlchg_com      #Tool change common blocks
      spaces$ = 0, pbld, *ToolSequenceNumber, scomm_str, *tldia_meta, ", ", ptoolcomm, stool_material, ", ", *flute_meta, "LOC, ", *n_flutes1, "Flt", ", ", *oa_meta, "LAH", scomm_end, spaces$=sav_spc, e$
      
Link to comment
Share on other sites

YOu cannot use a string variable as you are trying to do......the parameter that you are pulling is a number value

 

 

As the pic points out about, pulling out bit 3, will give you a 0-6 value....... 

 

When I pull it out I get this

N100 G20
N102 G0 G17 G40 G49 G80 G90
N104 T1 M6
tool_material 2.   <-------
N106 G0 G90 G54 X-.1545 Y1.4476 S6500 M3
N108 G43 H1 Z2.
N110 Z.05 

You are then going to have to build a string select table to run the number and set it to a string value that will output the material name

if prmcode$ = 20004, tool_material = rparsngl(sparameter$, 3)

tool_material     :  0    #Tool material

tool_material, e$

If you don't know how to build a string select table, maybe someone else will be kind enough to take the time.....but ALL of the info that you need is in the post bundle, you might have to actually read it

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