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:

Recommended Posts

Haas Lathe.

 

I'm relatively new to this, but my post is just about exactly what I want. With one exception. I do NOT want to tool to nullify itself after a toolpath is finished. Does anyone know where this is in the post processor? The original file is the MPLFAN post.....

 

 

20230705_095803.jpg

Link to comment
Share on other sites

Yes.

The value gets assigned "zero" in 'ptoolend$'. The output then occurs in 'pl_retract' or 'pm_retract'.

ptoolend$        #Read from buffer 1 for prv_, current and next tool info
                 #end tool here, current and next valid
      if toolend_flag,
        [
        sav_rev = rev #Axis Sub does not update to rev
        pcan
        if n1_gcode <> 1000,
          [
          toolno = t$ * 100 + zero   #### < Value get assigned here.
          if millcc,
            [
            pmillcca  #End mill conversion
            ]
          sav_gcode = gcode$
          gcode$ = zero
          pcool_off
          if posttype$ = two, pl_retract
          else, pm_retract

 

Then, is output here:

 

pl_retract      #Retract tool based on next tool gcode, lathe (see ptoolend)
      cc_pos$ = zero
      if home_type = one,
        [
        pmap_home   #Get home position, xabs
        ps_inc_calc #Set inc.
        pbld, n$, psccomp, e$
        pcan1, pbld, n$, *sgcode, pfxout, pfyout, pfzout, *toolno, e$   ##### Either here, if home_type is 1
        pbld, n$, pnullstop, strcantext, e$
        ]
      else,
        [
        #Retract to reference return
        pbld, n$, `sgcode, psccomp, e$
        if home_type = m_one, pbld, n$, *toolno, e$    #### < This is probably where the output occurs. This line is outputting a Tool Offset Cancel.
        pcan1, pbld, n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.",
          pnullstop, strcantext, e$
        cutoff_proc = zero  #Reset flag if we are retracted
        if home_type > m_one, pbld, n$, *toolno, e$        ############ Or output here, if home_type is any another value.
        ]

This would fix it:

 

pl_retract      #Retract tool based on next tool gcode, lathe (see ptoolend)
      cc_pos$ = zero
      if home_type = one,
        [
        pmap_home   #Get home position, xabs
        ps_inc_calc #Set inc.
        pbld, n$, psccomp, e$
        pcan1, pbld, n$, *sgcode, pfxout, pfyout, pfzout, *toolno, e$
        pbld, n$, pnullstop, strcantext, e$
        ]
      else,
        [
        #Retract to reference return
        pbld, n$, `sgcode, psccomp, e$
        #if home_type = m_one, pbld, n$, *toolno, e$   ##### DEBUG < Commented Out toolno output!
        pcan1, pbld, n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.",
          pnullstop, strcantext, e$
        cutoff_proc = zero  #Reset flag if we are retracted
        if home_type > m_one, pbld, n$, *toolno, e$
        ]

You will also need to edit 'pm_retract':

 

pm_retract      #Retract tool based on next tool gcode, mill (see ptoolend)
      if home_type = one,
        [
        pmap_home   #Get home position, xabs
        if frc_cinit, cabs = zero
        ps_inc_calc #Set inc.
        pbld, n$, psccomp, e$
        pcan1, pbld, n$, *sgcode, pfxout, pfyout, pfzout, protretinc,
          *toolno, strcantext, e$
        pbld, n$, pnullstop, e$
        ]
      else,
        [
        #Retract to reference return
        pbld, n$, `sgcode, psccomp, e$
        #if home_type = m_one, pbld, n$, *toolno, e$     ####### < Removed Tool Offset Cancel
        pcan1, pbld, n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.",
          protretinc, pnullstop, strcantext, e$
        if home_type > m_one, pbld, n$, *toolno, e$
        ]

  • Thanks 1
Link to comment
Share on other sites

Check and test the output.

Always, Always, make a couple backup copies of your Post, and save them in different folders to be sure you can always restore to a safe point.

The output is coming from a variable called 'toolno'.

The asterisk in front (*toolno) means the variable is "forced" to output.

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