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:

How to export multiple Tool length offset and Diameter offset for one tool in tool table


Recommended Posts

Hi everyone,

I am trying to figure how to to export multiple Tool length offset and Diameter offset for one tool in tool table.

Sometime I use one tool to finish the slot and the hole to locate a dowel pin or following some feature that drawing call out. I want to use a good tool to finish couple feature but for easy to control I may use multiple Tool length offset/Diameter offset. My question is how to notice difference H/D in tool table for set up guy to catch up!

Ex: 

(PRG. ON  NOV - 06 - 22 - 20:50   BY ....  )
(T20 * 1/2 FLAT EM, 3 FLT, .500 LOC, 1.00 OFH | H20 | D20 | D0.5000" | CONTOUR)
(WARNING T20 | D40 - OPERATION 15 - FINISH .500 HOLE | D60 - OPERATION 16 - FINISH .500 SLOT)
(T2 * 3/8 SPOTDRILL             | H2  | D2  | D0.3750" | DRILL/CBORE)
(T15 * 1/4-20 ROLL TAP           | H15 | D15 | D0.2500" | TAP........)
(OVERALL MAX | Z2.)
(OVERALL MIN | Z-1.02)
 

Any help is greatly appreciated!

 

Link to comment
Share on other sites

Buffer was the old way with the new tool table not sure what the process is.

Here is something I tired to get working with MPLMASTER back in X7.

You are welcome to try to work out what I could never get to work. It always seemed to lose one place no matter how many ways I tried to define the variables with plast using last_tloffno = tloffno$ #added for sending turret home when changing tooloffset numbers. I used a ntooltrack for numbering purposes.

fmt  "N" 24  ntooltrack #Sequence Number Process for N Tracking back to Tool Number on Fanuc Lathe

ltlchg$          #Toolchange, lathe
      toolchng = one
      gcode$ = zero
      copy_x = vequ(x$)
      pcc_capture   #Capture LCC ends, stop output RLCC
      c_rcc_setup$   #Save original in sav_xa and shift copy_x for LCC comp.
      pcom_moveb    #Get machine position, set inc. from c1_xh
      c_mmlt$        #Position multi-tool sub, sets inc. current if G54...
      [if spindle_no$ = 0, ntooltrack = t$],[if spindle_no$ = 1, ntooltrack = t$ + 1000]
      *ntooltrack, ptoolcomment

mtlchg$          #Toolchange, mill
      toolchng = one
      gcode$ = zero
      copy_x = vequ(x$)
      pcom_moveb    #Get machine position, set inc. from c1_xh
      c_mmlt$        #Position multi-tool sub, sets inc. current if G54...
      [if spindle_no$ = 0, ntooltrack = t$],[if spindle_no$ = 1, ntooltrack = t$ + 1000]
      *ntooltrack, ptoolcomment

pwrtt$           #Buffer toolchange information, tooltable = 3 calls on 1003
      if gcode$ = 1001, psetup
      pcut_cctyp
      if opcode$=104 | opcode$=105 | opcode$=three | opcode$=16, cc_pos$ = zero
      if gcode$ <> 1001, plast_recd
      pcur_recd
      if gcode$ <> 1003, cc_pos$ = zero
      !opcode$, !tool_op$
      if gcode$ = 1003,
        [
        size1 = rbuf (one, zero)
        rc1 = one
        if rc1 < size1, preadcur_nxt
        if cc_1013$ = zero, cc_pos$ = zero
        ]
      #if you want repetitive tool output, keep the abs( ) in ptooltable and remove the >= t$ from the pwrtt call to this block        
      #if (tool_info = 2 | tool_info = 3) & gcode$ <> 1003 & op_id$ <> last_op_id & last_tloffno <> tloffno$ & t$ >= 0, ptooltable
      if (tool_info = 2 | tool_info = 3) & gcode$ <> 1003 & op_id$ <> last_op_id & last_tloffno <> tloffno$, ptooltable #This allows us to see the same tool with different offset
      last_tloffno = tloffno$ #This controls the different offset tracking not to duplicate it when they are used in the operations
      last_op_id = op_id$
      last_t = t$ #Trying to save the tool to keep subtraction from happening in the tool list when the same tool is called

ptooltable # Write tool table, scans entire file, null tools are negative
           #if you want repetitive tool output, keep the abs( ) in ptooltable and remove the >= t$ from the pwrtt call to this block
           toolno = t$ * 100 + tloffno$
           tnote = abs(toolno) #use to be this abs(t$), but we want it to look different so we changed
           tldianote = abs(tldia$) #Oct-20-08 AEH
           [if spindle_no$ = 0, ntooltrack = t$],[if spindle_no$ = 1, ntooltrack = t$ + 1000]
           ntooltrack = abs(ntooltrack) #See it used else where Figure why not
           if opcode$ = 3 | opcode$ = 16, toffnote = tlngno$
           else, toffnote = tloffno$
           stinsert2 = ucase(stinsert2)
           !spaces$
           spaces$ = zero
           if posttype$ = 2,    #lathe tools
             [
             scomm_str, *tnote, " - ", *ntooltrack, " - ", plistcomm, " - ", *toffnote, pdspace, " - ", *stinsert, *stinsert2, " - ", *stholder, *stholder2, scomm_end, e$
             #scomm_str, *tnote, ptspace, " - ", *toffnote, pdspace, " - ", *stinsert, *stinsert2, " - ", *stholder, *stholder2, scomm_end, e$
             ]
           else,                  #mill tools
             [
             if opcode$ = 3 | opcode$ = 16,
               [
               if tcr$ = 0, scomm_str, *tnote, " - ", *ntooltrack, " - ", plistcomm, " - ", *tldianote, punit, pdiamspc, scomm_end, e$
               ]
             else,
               [
               if tcr$ > 0, scomm_str, *tnote, " - ", *ntooltrack, " - ", plistcomm, " - ", *toffnote, pdspace, " - ", *tldianote, punit, pdiamspc, " - ", *tcr$,  punit, scomm_end, e$
               if tcr$ = 0, scomm_str, *tnote, " - ", *ntooltrack, " - ", plistcomm, " - ", *toffnote, pdspace, " - ", *tldianote, punit, pdiamspc,  scomm_end, e$
               ]
             ]
           spaces$ = prv_spaces$

Happy Coding

  • Like 1
Link to comment
Share on other sites
9 hours ago, HOANG VU ANH NGUYEN said:

Thanks crazy^millman.

I have no experience with buffer. I try to input your code into my my post but when I posted the code out and it get bunch of error.

I am using mastercam 2023 and I may ask my reseller for help.

Not as simple as putting that into your post. Many moving pieces to that post since it was for a Turn/Mill and not only a milling machine. There was no information about the machine so I took the example I had which will not work in a lot of posts.

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