Bama

LAST TOOL IN TOOL TABLE

Recommended Posts

Got another post question. In my tool table after I post. My first tool that is called up the tool description matches the last tool in the tool table. If you look at T28 its a facemill but in the description of that tool it says 1/4 reamer. Not sure if this has been answered before or not.

( T28 2.625 FACE MILL / SHELL MILL   )
( T1 1/2 1-1/4 FLUTE E2033    )
( T2 1/2 6 FLUTE EM E3105   )
( T9 3/16 ENDMILL E2010   )
( T4 #2 CENTER DRILL E2502   )
( T15 LETTER "C" DRILL E1202   )
( T17 1/4 CHAMFER TOOL   )
( T16 1/4 REAMER E4512   )
 
 
 
 
 
N2800
( 1/4 REAMER E4512   )
T28 T00 M6
G0 G90 G54 X-5.8875 Y.8437 A0. S655 M3
G43 H28 Z2. M8
Z.2
G1 Z0. F25.
X4.575 F15.
Y-.8437
X-5.8875
G0 Z2.
M9
M5
G91 G28 Z0.
M01
 

 

Share this post


Link to post
Share on other sites

Without seeing the post, I'll take a stab in the dark and say that you're using strtool$ to output the tool description. 

Assuming that I'm correct, this is due to how the legacy tool table processing in MP works; many predefined variables get populated during the tool table processing, including strtool$.  

As for a fix, I won't be much help.  I've moved on from the legacy tool table and I've forgotten the little I knew about it.

Share this post


Link to post
Share on other sites

Yes this is one of our older post and yes it is using strtool$. I will snapshot that part of the post when I get to work. Thanks 

Share this post


Link to post
Share on other sites
ptoolcomment    #Comment for tool
      tnote = t$
      toffnote = tloffno$
      tlngnote = tlngno$
     "(  ",  pstrtool, ")",e$

pstrtool        #Comment for tool
      if strtool$ <> sblank,
        [
        strtool$ = ucase(strtool$)
          *strtool$, " "
        ]
		
ptooltable$  # Tooltable output
   if tool_info > 1 & tt_count$ = 1,
     [
     # Copy prefix string
     #s_t_pre_tt = s_t_pre$, s_d_pre_tt = s_d_pre$, 
     #s_h_pre_tt = s_h_pre$             
     # Get the data from parameter lookup
     result = fprm (101, 0, 0)        
     # Tool diameter from 1013 string
     tldia$ = rparsngl (sparameter$, 2)   
     # Output tool table line
     "( ", *tt_tool$ ,       "      -  ",  pstrtool, 
     if tt_drlcycle$ < 0, #= -1,  # No stock with drill
        [
        if comp_type > 0 & comp_type < 4, 
          [
                 ]
        #if xy_stock <> 0 | z_stock <> 0, 
        #  [
        #  *xy_stock, *z_stock
        # ]
        ]
      ")", e$
      ]

 

Share this post


Link to post
Share on other sites

Ah! you are using the enhanced tool table!  I can't reproduce this issue, so I'd need to see the whole post.  I do see a few things in the code you posted that I don't like, but nothing that would be causing your issue.

I'd kick it up to you're reseller, they'll be able to sort you out.

Share this post


Link to post
Share on other sites

that was my next move just hoping it was something simple. Thank you for your help

Share this post


Link to post
Share on other sites

It seems that the latest CNC post handle this a bit differently.  Below is a postblock from the Techno Titan that was recently uploaded to the tech exchange.

ptool_name        #Comment for tool
      stool_name = opinfo(10094, zero)
      if stool_name <> sblank | stool_name <> squery_invalid,
        [
        stool_name = regex("^\s+", sblank, two)  #Remove leading whitespace
        stool_name = ucase(stool_name)
        *stool_name
        ]

It might be worth adding it to your post and seeing if it works differently than pstrtool.

It's also worth noting that the Techno post in the link appers to be using much of the new post technology introduced in Mastercam 2017.

Share this post


Link to post
Share on other sites

Yeah I appreciate it but it didn't like the code. Kept giving me a label has not been defined, illegal character, and label not found alarm and would post with no description at all. I looked and the last time this post was edited was in 2007. besides the edits I have done. 

Share this post


Link to post
Share on other sites

What version of Mastercam are you using?  It's likely the regex thats holding you up.  Try the modified version below.

stool_name     :  ""
squery_invalid := "-99999"
sempty_string  := ""

ptool_name        #Comment for tool
      stool_name = opinfo(10094, 0)
      if stool_name <> sempty_string | stool_name <> squery_invalid,
        [
        stool_name = ucase(stool_name)
        *stool_name
        ]

 

Share this post


Link to post
Share on other sites

MC 2019  That's what its doing now.

O0000
( MASTERCAM  - 2019 )
( PRGRM NAME -   17056-01-RA-MM3X-0020-BWC.EIA )
( DATE       -  09 - 10 - 19  TIME- 20:28 )
( POST       - ems-mazak-stand-alone ),
( MATERIAL   -  ALUMINUM inch - 2024 )
( BWC , REV  - **** )
 
(  T28       -   )
(  T1       -   )
 
 
 
N2800
T28 T00 M6
G0 G90 G54 X-6.915 Y0. A0. S873 M3
G43 H28 Z1. M8
Z.25
G1 Z0. F25.
X-4.29 F19.99
X4.29
X6.915
Z.25 F50.
G0 Z1.
M9
M5
G91 G28 Z0.
M01
 
10 Sep 2019 08:28:33 PM - Report created.
10 Sep 2019 08:28:33 PM - Initialize posting log file
10 Sep 2019 08:28:33 PM - Using MP run version 21.00 and post components version 21.00
10 Sep 2019 08:28:33 PM - Initiate opening the post processor file(s).
10 Sep 2019 08:28:33 PM - C:\MY MASTERCAM\mill\Posts\ems-mazak-stand-alone.PST
10 Sep 2019 08:28:33 PM - The post processor file has been successfully opened.
10 Sep 2019 08:28:34 PM - Initialization of pre-defined post variables, strings, postblocks was successful.
10 Sep 2019 08:28:34 PM - Search for defined post variables, strings, postblocks was successful.
10 Sep 2019 08:28:37 PM - PST LINE (621) - The post block output type processing has failed!, , Label has not been defined[44]
10 Sep 2019 08:28:37 PM - PST LINE (701) - The post block output type processing has failed!, , Label has not been defined[7]
10 Sep 2019 08:28:37 PM - PST LINE (784) - The post block output type processing has failed!, , Label has not been defined[7]
10 Sep 2019 08:28:37 PM - Successful completion of posting process!

 

Share this post


Link to post
Share on other sites

Do I need to just add it or delete what I have and replace it with that?

Share this post


Link to post
Share on other sites

You have uninitialized variables on lines 621, 701, and 784.  The number in brackets is the column position of the start of the uninitialized variable, so that should help you track it down.

Once you have that sorted, I would try calling ptool_name where you were calling pstrtool.

Share this post


Link to post
Share on other sites
On ‎9‎/‎4‎/‎2019 at 12:38 PM, jeff.D said:

Ah! you are using the enhanced tool table!  I can't reproduce this issue, so I'd need to see the whole post.  I do see a few things in the code you posted that I don't like, but nothing that would be causing your issue.

I'd kick it up to you're reseller, they'll be able to sort you out.

What were the things you didn't like so I can get them to look at it as well?

Share this post


Link to post
Share on other sites
45 minutes ago, jeff.D said:

You have uninitialized variables on lines 621, 701, and 784.  The number in brackets is the column position of the start of the uninitialized variable, so that should help you track it down.

Once you have that sorted, I would try calling ptool_name where you were calling pstrtool.

That's what it started doing when I put the part of the post that you gave me in there

Share this post


Link to post
Share on other sites

I'm not an MP expert but I know a little bit and I'll do my best to help.

Have you initialized the following variables in your post?

stool_name     :  ""
squery_invalid := "-99999"
sempty_string  := ""

In order to initialize a variable, it must be placed up against the left margin of the file, as shown above.

Share this post


Link to post
Share on other sites

and man I appreciate all the help! im wanting to learn this stuff so I don't have to lean on my reseller but I know there are things that are past my limits also.

Share this post


Link to post
Share on other sites

got it Bud figured out where and how to put it and it worked thank you for you help it is much appreciated for sure

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 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