View Full Version : Manufacturer's Tool Code


stampman
03-29-2005, 09:39 PM
I am having a problem gettng the Manufacturer's Tool Code to post, could someone please help.

Thanks,
ED

Rekd
03-29-2005, 10:26 PM
I'm posting it from my setup sheet post, I'll look in the morning.

Rekd
03-31-2005, 09:40 AM
Back up your post! ;)

First you have to Set the switch to Yes. If this switch isn't in your post, add it somewhere in the "General Output Settings" section of the post.


show_tool_mfg : yes #Output the tool definition - 'manufacturer' data?


Then look for this and add the "stl_mfg_com" line if it's not there


# --------------------------------------------------------------------------
# Access tool data strings from NCI '20000' series parameters
# --------------------------------------------------------------------------
stl_mfg_com # 'tool mfg comment' from tool


Then add this to "pparameter" function


pparameter # Read in the 20000 series 'additional parameters' from OPS file ()

# 20002 = tool definition - 'manufacturer' data
if (prmcode = 20002),
stl_mfg_com = sparameter #Save string for output later


Now you have to add the call to where you want it in the program. This example is from a setup sheet post formatted to be read from a database, and will be very different from what you'll have, but you should be able to figure out where it goes. Note the logic to test if that field has been defined in the tool page. If it hasn't, "Un-defined" is posted.


# ===================================================================
# Output all tool data on one line. ";" as delimiter
# ===================================================================
if stl_mfg_com = "", stl_mfg_com = "Un-defined"
if opcode <> 3, # If drill cycle, insert "00" for tloffn
[
*t, ";", *tldia, ";", *tl_num_flutes, ";", *tlngno, ";", *tloffno, ";", tl_overall_len, ";", tl_flute_len, ";", min_depth, ";", *strtool, ";", stl_mfg_com, E
]
else,
[
*t, ";", *tldia, ";", *tl_num_flutes, ";", *tlngno, ";", "00", ";", tl_overall_len, ";", tl_flute_len, ";", min_depth, ";", *strtool, ";", stl_mfg_com, E
]


HTH

stampman
03-31-2005, 10:59 AM
Thanks Matt, I'll give it a try.
Just one question.

Are the "show_tool_mfg" and "tl_mfg_com" Mastercam variables?

Ed

Rekd
03-31-2005, 11:49 AM
You're welcome, Ed.

"show_tool_mfg" is a switch, (On/Off) and "stl_mfg_com" is the variable that holds the current value.

(note that the latter begins with an "s", which indicates a "string" variable)

Let me know how if it works out. Did you back up your post?? :D

stampman
03-31-2005, 05:25 PM
Yes I backed up my post, I'm still learning.

This worked great! :cheers:

How do you know that "show_tool_mfg" is a switch, for Manufacturers Tool Code and "stl_mfg_com" is the variable for the same. Is there as list or table that references this information, I do have the post help CD from my dealer but haven't got that far yet.

Once again, Thanks a million

Ed

Rekd
03-31-2005, 10:17 PM
The way things are used tells you what they are, (usually). The "YES" after the name told me it was a boolean switch. (It's been a couple years and I don't remember where I found it).

I use "s" in front of any variables to tell me it's a string variable. (Might be mandatory in MP language, not sure.)

I don't have the CD so I don't know if there's a full list. I would guess there is.

Do you know how to use debugging? It posts out after each line in the NC file where in the post that particular line was created. It will help you greatly in learning to edit posts.

If you have more ?'s or !'s, let me know.