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:

fmt T 4 t


ThRaSH
 Share

Recommended Posts

Here's the deal. We started using a MPMASTER post for our Mazak for alot of reasons. One of them being the tooltable output in the program. Our Mazak has a Mazatrol M32 control, and when searching for a tool "T3" it searches within the comments and finds "T3" in the tooltable. Not a big deal, but a bit of a bother because about 5 keys have to be pressed to search for "T3" again. It becomes a real pain when our operators are constantly doing a tool search for a restart during a shift.

 

I thought I would change the format assignment so instead of T1 being output in ptooltable it would output TL1 so that a tool search wouldn't trip it up. I changed it, but then Tools are also output with that assignment - DOH! - no good.

 

Ended up using nwadrs within ptooltable to change the prefix string so that ptooltable would output TL1, TL2, etc. Then used nwadrs again to change the prefix back to the original so T1, T2, etc. would be output in the rest of the program.

 

Seems to work, not sure if this the best way to handle it though...any comments?

 

code:

#Tool Table format prefix string

sttfprenew "TL"

sttfpreold "T"

 

 

ptooltable # Write tool table, scans entire file, null tools are negative

tnote = t

toffnote = tloffno

tlngnote = tlngno

spaces=0

if t >= zero,

[

#_BE: Added a prefix change just for Tool Table output.

#_BE: For example T1 is now output as TL1

result = nwadrs(sttfprenew, t)

if tcr>0, "(", *t, " | ", plistcomm, " | ", *tldia, ")"

if tcr=0, "(", *t, " | ", plistcomm, " | ", *tldia, ")"

]

#_BE: Changed prefix for tool back to original for Tool output.

result = nwadrs(sttfpreold, t)

spaces=sav_spc

Link to comment
Share on other sites

nothing wrong with that method. This example is exactly why us post guys requested a down and dirty function like nwadrs and newfs.

 

There are other ways to do this, like create a new variable say like tool_number and format it accordingly with a FMT statement and then make an assigment like tool_number = t in ptooltable and then output *tool_number instead of *t. Whew..I'm tired just writing that.

 

nwadrs is much easier!!! smile.gif

Link to comment
Share on other sites

Hey guys thanks for the feedback. Just wanted to see if I was in the ballpark with my thinking on this.

 

Jim this other method has got me wondering, when you assign tool_number = t only the number is assigned and not the formatted variable? So when *t or *tool_number is used to force output...only then is the formatting applied?

 

I'll play around with it. wink.gif

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