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:

Zaffin_D

Verified Members
  • Posts

    374
  • Joined

  • Days Won

    1

Posts posted by Zaffin_D

  1. 57 minutes ago, PcRobotic said:

    Hi Jeff,
       Thank you for your valuable respond.  I am using MasterCam2018 and how can I use the ""groupinfo" function in this case for the string? 

     

    Thank you.

    Below is an example of how to use the groupinfo function.

    smaterialTextbox : ""
    
    pheader$
           smaterialTextbox = groupinfo(19123)
           n$, smaterialTextbox, e$

     

  2. I dumped all the machine group parameters and that string wasn't in there, so I don't think you can capture data from that combo box. 

    Parameter 19123 returns the string from the material textbox, so it won't work with a string select table(also, your table is defined incorrectly).  If you are in Mastercam 2017+ you can (and should) use the groupinfo function to capture that string, but in X9 you'll have to use the pmachineinfo$ post block.

  3. 47 minutes ago, nickbe10 said:

    Hey Colin,

    This is for my Mill posts. Just playing with my Header a bit.

    I want to output the Machine Group Name (which always contains the p/n and rev) and the Toolpath Group Name (on which I normally have the operation description) on 2 adjacent lines, so output would look like this:

    
    (PROGRAM  - 526W2514-16_REV_)
    (OPERATION  - HEX AND WIRELOCK HOLES)

    I have everything except the p/n and rev outputting correctly........can I use the "rd_mch_ent_no$=-1" and then use the parameter 19970? I take it that having extracted it here I don't need to extract it in the pparameter post block? Just declare the string.....?

     

    If you are in MasterCAM2017+, you should be able to use the groupinfo function.

          sMachineGroupName = groupinfo(19248)
          sMachineGroupName, e$

     

  4. On 3/29/2018 at 9:30 AM, PcRobotic said:

     

    Hi Jeff,
       Appreciate your input and I did something similar, not sure which is best.  Would you please explain more?



     

    
    #Region pTotalHoles
    
    
    #Region pTotalHoles
    pTotalHoles
        if TotalHoles = 1 & (tool_typ$ > 2 & tool_typ$ < 10 | tool_typ$ = 20 | tool_typ$ = 22 | tool_op$ = 106 | tool_op$ = 18 | tool_op$ = 100), no_spc$, "(", *TotalHoles, no_spc$, "X HOLE)", e$
        if TotalHoles > 1 & (tool_typ$ > 2 & tool_typ$ < 10 | tool_typ$ = 20 | tool_typ$ = 22 | tool_op$ = 106 | tool_op$ = 18 | tool_op$ = 100), no_spc$, "(", *TotalHoles, no_spc$, "X HOLES)", e$
    
        if TotalHoles = 1 & (drillcyc$ = 0 | drillcyc$ = 1) & (tool_typ$ = 1 | tool_typ$ = 2 | tool_op$ = 2), no_spc$, "(", *TotalHoles, no_spc$, "X SPOT)", e$
        if TotalHoles > 1 & (drillcyc$ = 0 | drillcyc$ = 1) & (tool_typ$ = 1 | tool_typ$ = 2 | tool_op$ = 2), no_spc$, "(", *TotalHoles, no_spc$, "X SPOTS)", e$
        TotalHoles = 0
    	!TotalHoles
    #EndRegion pTotalHoles
    
    pparameter$ # Run parameter table
               if prmcode$ = 15083, TotalHoles = rpar(sparameter$, 1)
    
    
    
    
    TotalHoles: 0
    fmt "" 4 TotalHoles
    
    
    
    
    #Region Tool change common blocks
    ptlchg_com      #Tool change common blocks
        pTotalHoles
    
    ptlchg0$         #Call from NCI null tool change (tool number repeats)
        pTotalHoles

    If that's the only thing in pparameter$ you're introducing quite a bit of overhead.  You can simply add the following line to pTotalHoles;

    pTotalholes
         TotalHoles = opinfo(15083, 0) #Get the number of points in the current op.

    You can also loop through the posted ops with opinfo to build a table of selected points at the top of your file.

    • Haha 1
  5. 1 hour ago, Colin Gilchrist said:

    Jeff/Steven,

    The "new" 'opinfo' functions are not compatible with the "Pre-Read" functionality. ('pwrtt$').

    You can't use "both" the new logic, and the "old" logic in the same Post. It is only one, or the other.

    Steven,

    To implement this new style of logic in your Post, means you have to completely throw away all the old 'pparameter$' logic.

    If you want to use the "new" stuff, you must start over with a "fresh" Post, and delete the "pparameter$ and pwrtt$' logic.

    Good luck, but I don't think this is something you should try.

    That's not exactly true.  You can use opinfo with the old preread post block, you just won't get the efficiently benefits of opinfo.  This is because the preread postblocks will still loop.

    So yes, it is better and you should move your post to use the new opinfo functions, but the post should still work with opinfo and preread postblocks. 

    • Like 1
  6. If you are using Mastercam 2017+ you should try the opinfo function;  opinfo provides a much more efficient way to get parameter information than pparameter$.

    Below is a very simple post block/snippet showing opinfo in use for this application.

     

    hasDepthCuts  : 0
    roughStep     : 0
    toolpathDepth : 0
    numberOfCuts  : 0
    currentCut    : 1
    
    fmt 4 currentCut
    fmt 4 numberOfCuts
          
    pDepthCutCount
          if prv_op_id$ = op_id$,
          [
            hasDepthCuts = opinfo(15211, 0)
            if hasDepthCuts = yes$,
            [
              roughStep = opinfo(10065, 0)
              toolpathDepth = opinfo(10029, 0)
              numberOfCuts = abs(toolpathDepth)/abs(roughStep)
              n$, "( Depth Cut ", *currentCut, "of ", *numberOfCuts, " )", e$        
              if numberOfCuts = currentCut, currentCut = 1
              else, currentCut = currentCut + 1
            ]
          ]

     

    • Thanks 1
    • Like 1

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