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:

Alfred Salzmann

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Alfred Salzmann

  1. This may help ? These X8 routines store the min max of each tool into a buffer. Will work for older versions.

    See the subroutine headers where to place the text below.

    I hope I haven't forgoten anything. I don't check the forum often.

     

     

    output_z : yes$  #Output Z Min and Z Max values (yes or no)


    tool_info    : 3     #Output tooltable information?
                         #0 = Off - Do not output any tool comments or tooltable
                         #1 = Tool comments only
                         #2 = Tooltable in header - no tool comments at T/C
                         #3 = Tooltable in header - with tool comments at T/C




    # --------------------------------------------------------------------------
    # Buffer 1 Files for NEW Sequence Number routine
    # --------------------------------------------------------------------------
    #      "Nxxyy    xx = tool number   yy = repeat counter"
    rc1          : 1
    wc1          : 1
    tlcount      : 0
    fbuf 1 0 1 0 0
    tlusage      : 0
    fmt N 7 tlusage

    # --------------------------------------------------------------------------
    # Buffer 4 - Holds the variable 't' for each toolpath segment
    # ------------------------------------------------------------------------
    rc4 : 1                                                            #  
    wc4 : 1                                                            #  
    fbuf 4 0 1 0 0  # Buffer 4                                         #  
    # ------------------------------------------------------------------------
    # Buffer 5 - Min / Max                                             #  
    # ------------------------------------------------------------------------
    b5_gcode : 0                                                       #  
    b5_zmin  : 0                                                       #  
    b5_zmax  : 0                                                       #  
    rc5      : 2                                                       #  
    wc5      : 1                                                       #  
    size5    : 0                                                       #  
    fbuf 5 0 3 0 0          #Min / Max                                 #  


    # ------------------------------------------------------------------------
    fmt  "X" 2  x_tmin      #Total x_min                               #
    fmt  "X" 2  x_tmax      #Total x_max                               #
    fmt  "Y" 2  y_tmin      #Total y_min                               #
    fmt  "Y" 2  y_tmax      #Total y_max                               #
    fmt  "Z" 2  z_tmin      #Total z_min                               #
    fmt  "Z" 2  z_tmax      #Total z_max                               #
    fmt  "Z" 2  min_depth   #Tool z_min                                #
    fmt  "Z" 2  max_depth   #Tool z_max                                #
    #-------------------------------------------------------------------------

     

     

    #Call this in pwrtt$
    pinittlcount  #Initialize tool count
         if t$ > 0,
           [
           wc1 = t$
           tlcount = wbuf(1, wc1) #Write tool usage counter to buffer file. Initial counter is zero.
           ]

    #Call in tool change post block and start of file post block if it is mill 4 axis post
    ptoolcounter  #Buffer tool usage count
           rc1 = t$
           tlcount = rbuf(1, rc1)  #Read tool usage counter for current tool
           tlcount = tlcount + 1   #Tool usage counter
           wc1 = t$
           tlcount = wbuf(1, wc1)  #Save tool usage counter to buffer file

    ptlusageout #Output tool usage
           tlusage = t$ * 100 + tlcount
           tlusage




    # --------------------------------------------------------------------------
    ptoolcomment    #Comment for tool
          tnote = t$, toffnote = tloffno$, tlngnote = tlngno$
          if tool_info = 1 | tool_info = 3,
               sopen_prn, ~t$, "= ",pstrtool,  sclose_prn, e$
    # --------------------------------------------------------------------------




    psof$            #Place this in psof . Start of file for non-zero tool number             
          ptoolcounter  #Calculate tool usage counter
    #----------------------------------------------------------------------
          ptravel                                                   #  
          pwritbuf5                                                 #  
          if output_z = yes$ & tcnt > 0,                            #  
            [                                                       #  
            sav_spc = spaces$                                       #  
            spaces$ = 0                                             #  
            "(", "OVERALL MAX = ", *z_tmax, ")", e$                 #  
            "(", "OVERALL MIN = ", *z_tmin, ")", e$                 #  
            spaces$ = sav_spc                                       #          
            ]                                                       #  
    #----------------------------------------------------------------------





    psof$            #Place this in Psof and Tool Change
    ptlchg$          #Tool change
    #-----------------------------------------------------------------------      
          if output_z = yes$,                                        #  
            [                                                        #  
            preadbuf5                                                #  
            if (opcode$ > 0 & opcode$ < 16) | opcode$ = 19,          #  
              [                                                      #  
              #sav_spc = spaces$                                     #  
              spaces$ = 0                                            #  
              "(", "MAX = ", *max_depth, ")", e$                     #  
              "(", "MIN = ", *min_depth, ")", e$                     #  
              spaces$ = sav_spc                                      #  
              ]                                                      #  
            ]                                                        #  
    #-----------------------------------------------------------------------




    #-------------------------------------------------------------------------
    ptravel    # Tool travel limit calculation                         #
               if x_min$ < x_tmin, x_tmin = x_min$                     #
               if x_max$ > x_tmax, x_tmax = x_max$                     #
               if y_min$ < y_tmin, y_tmin = y_min$                     #
               if y_max$ > y_tmax, y_tmax = y_max$                     #
               if z_min$ < z_tmin, z_tmin = z_min$                     #
               if z_max$ > z_tmax, z_tmax = z_max$                     #

    # ------------------------------------------------------------------------
    # Buffer 5  Read / Write Routines                               
    # ------------------------------------------------------------------------
    pwritbuf5   # Write Buffer 5                                       #
                b5_gcode = gcode$                                      #
                b5_zmin = z_min$                                       #
                b5_zmax = z_max$                                       #
                b5_gcode = wbuf(5, wc5)                                #
    # ------------------------------------------------------------------------
    preadbuf5   # Read Buffer 5                                        #
                size5 = rbuf(5,0)                                      #
                b5_gcode = 1000                                        #
                min_depth = 99999                                      #
                max_depth = -99999                                     #
                while rc5 <= size5 & b5_gcode = 1000,                  #
                  [                                                    #
                  if rc5 <= size5, b5_gcode = rbuf(5,rc5)              #
                  if b5_zmin < min_depth, min_depth = b5_zmin          #
                  if b5_zmax > max_depth, max_depth = b5_zmax          #
                  ]                                                    #
    # ------------------------------------------------------------------------
    pwrtt$          #Pre-read NCI file
          if tool_info > 1 & t$ > 0 & gcode$ <> 1003, ptooltable
          pinittlcount                                            #Initialize tool usage counter
          if t$ > 0, tcnt=tcnt+1                                  #
          ptravel                                                 #
          pwritbuf5                                               #
          #if t$ <> prv_t$ & t$ > 0, pwritebuf7                    #Buffer 7
    # ------------------------------------------------------------------------


     

    • Like 1
  2. Hello.

    I am the Mastercam Re-seller that sold this operator's company the V9 Upgrade.

    With the order, I said I would tailor the Post for their old Agie W/C machines. Over a period of several weeks, I spent over 1.5 weeks of my time at NO COST to alter the Post to the W/C Operators satisfaction. They did not pay the account until this was signed off. (It had to output exactly like the Lama system in every detail.)

     

    With the new Agie, I was told this was not an issue, as it was supplied with an ISO converter, that would automatically convert into it's new format.

    After a couple of months, there emerged 2 bugs, one starting on arcs, which I set another post as a work around, and the other bug was not outputting all D or T registers when changed. All other aspects of the Post including multiple cavities, multiple angles, etc are working fine.

     

    Yes, I have had another large project on that I could not leave, and I have not been back.

     

    Perhaps a work order would be a good incentive!

     

    If work is required to setup the new machine, this is a new matter.

     

    Sometimes when you give time (with results) away, it is definitely not appreciated.

     

    Alfred Salzmann

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