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:

post comp type to tooltable


Recommended Posts

Why write everything to buffer one?  It would be much more efficient to handle all the output in the ptooltable$ post block.

A few other notes that may be helpful...

  • Using opinfo to query an NCI line should only be used as a last resort.  This is because when opinfo is used to read an NCI line, it searches the NCI file rather then using the table built during the binary to text NCI conversion.
            #sparameter$ = opinfo(1013, 0)
            #b1_ToolDia = rparsngl(sparameter$, 2)
            #b1_ToolCornerRad = rparsngl(sparameter$, 3)
            
            #The ^^^ above ^^^ is slow, it's faster to use parameters when they are available.
            b1_ToolDia = opinfo(10005, 0)
            b1_ToolCornerRad = opinfo(10006, 0)
            

     

  • The below comparison shouldn't work.  When opinfo is used on parameters that are strings, it returns a string, even if the return is invalid.
            #if opinfo(20001, 0) <> -99999, s_ToolName = opinfo(20001, zero)
              
            # The ^^^ above ^^^ Should not work  
            if opinfo(20001, 0) <> "-99999", s_ToolName = opinfo(20001, zero)

    For the same reason as described above,  it's faster to use parameter 10094 as shown below.

            if opinfo(10094, 0) <> "-99999", s_ToolName = opinfo(10094, zero)

     

  • I wouldn't expect zmin$ and zmax$ to be calculated during the enhanced tool table processing , it would be better to use parameters 16 and 19 as shown below.
            b1_Zmax = opinfo(16, 0)
            b1_Zmin = opinfo(19, 0)

     

  • You can use tt_count$ to determine if a tool has been output
    ptooltable$
          if tt_count$ = 1,
            [
            result = fprm(101, zero)
            sopen_prn, *tt_tool$, sdelimiter, ptool_name, sdelimiter, *tt_tlngno$,
              [if comp_type > 0 & comp_type < 4, sdelimiter, *tt_offset$, sdelimiter, *scomp_type, sdelimiter, *tool_dia],
                [if not(drilling_op), pget_stock_to_leave_tt(tt_tool$)], sdelimiter, pget_tool_z_min(tt_tool$), sclose_prn, e$
            ]

     

  • Rather than using opinfo multiple times, consider using a parameter table and populating it with fprm.
    # Enhanced Tool Table Parameters
    fprmtbl 101     2    #Table Number, Size
    #       Param   Variable to load value into
            10005   tool_dia
            15346   comp_type

     

Hope that helps!

Link to comment
Share on other sites
27 minutes ago, jeff.D said:

Why write everything to buffer one?  It would be much more efficient to handle all the output in the ptooltable$ post block.

I'm outputting all "D" and "H" values for each tool (if more than 1 D/H value used, like  T1 - D1, D51, H1, H51), that's one of the reasons. ;) ptooltable$ is limited for me, it "runs" only once.

At the end of your post I've got lost :) So what should I use to achieve the same? Parameter table, opinfo query or parameter read?

What's the difference between opinfo(20001, 0) and opinfo(10094, 0)? The "invalid" return has been tested (also for string return), it returns "-99999" if something goes wrong.

z_min$ and z_max$ works well, I dunno' why you wouldn't expect that. I use this tooltable setup more than 70 posts, zero issue until now.

 

Thank you for your notes and all input,

Peter

Link to comment
Share on other sites
42 minutes ago, Peter - NCS Ltd. said:

I'm outputting all "D" and "H" values for each tool (if more than 1 D/H value used, like  T1 - D1, D51, H1, H51), that's one of the reasons. ;) ptooltable$ is limited for me, it "runs" only once.

At the end of your post I've got lost :) So what should I use to achieve the same? Parameter table, opinfo query or parameter read?

What's the difference between opinfo(20001, 0) and opinfo(10094, 0)? The "invalid" return has been tested (also for string return), it returns "-99999" if something goes wrong.

z_min$ and z_max$ works well, I dunno' why you wouldn't expect that. I use this tooltable setup more than 70 posts, zero issue until now.

 

Thank you for your notes and all input,

Peter

Peter, it is good to see you around. I hope your doing well. Thanks for getting Jeff to share more information.

Jeff, thank for coming and and filling in more blanks. Now if I can ever find time to decipher all of this then that would be great. 🙄

  • Thanks 1
Link to comment
Share on other sites
31 minutes ago, Peter - NCS Ltd. said:

I'm outputting all "D" and "H" values for each tool (if more than 1 D/H value used, like  T1 - D1, D51, H1, H51), that's one of the reasons. ;) ptooltable$ is limited for me, it "runs" only once. 

That makes sense.

31 minutes ago, Peter - NCS Ltd. said:

At the end of your post I've got lost :) So what should I use to achieve the same? Parameter table, opinfo query or parameter read?

What's the difference between opinfo(20001, 0) and opinfo(10094, 0)? The "invalid" return has been tested (also for string return), it returns "-99999" if something goes wrong.

Under some circumstances (the enhanced tool table being one of them) populating a parameter table uses opinfo; so rather then typing opinfo a bunch of times, you can use a parameter table to minimize typing.

The NCI line should be your last resort.  The parameters are stored in a table and that makes it very quick to obtain the data.  When you query an NCI line you are starting the the top of the file and reading every line until the data is found.  On top of searching the NCI file, in most cases you need to parse the resulting string, adding more overhead to the process.

Though it may work, -99999 is not "-99999"

31 minutes ago, Peter - NCS Ltd. said:

z_min$ and z_max$ works well, I dunno' why you wouldn't expect that. I use this tooltable setup more than 70 posts, zero issue until now.

I'm surprised that they work.  The enhanced tool table works much differently then pwrtt$ and I didn't expect it to write that data.

  • Like 1
Link to comment
Share on other sites
9 minutes ago, 5th Axis CGI said:

Peter, it is good to see you around. I hope your doing well. Thanks for getting Jeff to share more information.

Jeff, thank for coming and and filling in more blanks. Now if I can every find time to decipher all of this then that would be great. 🙄

Thank you Ron ;) I would hangin' around more here, but... :S 

 

5 minutes ago, jeff.D said:

Under some circumstances (the enhanced tool table being one of them) populating a parameter table uses opinfo; so rather then typing opinfo a bunch of times, you can use a parameter table to minimize typing.

The NCI line should be your last resort.  The parameters are stored in a table and that makes it very quick to obtain the data.  When you query an NCI line you are starting the the top of the file and reading every line until the data is found.  On top of searching the NCI file, in most cases you need to parse the resulting string, adding more overhead to the process.

Thank you Jeff, great added infos. Well, you know, I would expect that CNC doing some improvements and new functions for a (good) reason, like speed up posting :) As we both see, it not always the case ;)

Processing time is on the second place for me, very close right after the first place :) 

  • Like 1
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...