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:

Sequence numbers at tool change


Recommended Posts

37 minutes ago, crazy^millman said:

Something has to define the pfn logic. In MPLMASTER there is this switch:

tseqno       : 2     #Output sequence number at toolchanges when omitseq = yes
                     #0=off, 1=seq numbers match toolchange number, 2=seq numbers match tool number

We then search the post to find where and how it was used:

ltlchg$          #Toolchange, lathe
. section not shown
. section not shown
. section not shown
. section not shown
      if not(synch_flg & tool_op$ = 67),     #Suppress tool output if cutoff during part xfer
        [
        if omitseq$ = 1 & tseqno > 0,
          [
          if tseqno = 2, n$ = t$
          pbld, *n$, [if home_type = -1, *sgcode], *toolno, e$
          ]
        else, pbld, n$, [if home_type = -1, *sgcode], *toolno, e$
        ]
mtlchg$          #Toolchange, mill
. section not shown
. section not shown
. section not shown
. section not shown 
      if omitseq$ = 1 & tseqno > 0,
        [
        if tseqno = 2, n$ = t$
        pbld, *n$, [if home_type = -1, *sgcode], *toolno, e$
        ]
pheader$         #Start of file
      pheader_custom
      if tseqno = 1 & omitseq$ = 1,
        [
        seqno$ = 1
        seqinc$ = 1
        n$ = seqno$
        ]

Then from there we can see what variables where defined and how we want to adapt it to the post we are using.

 

 

 

I am find  this in my post 

 


# --------------------------------------------------------------------------
# Motion NC output
# --------------------------------------------------------------------------

ptool_insp      #Tool inspection point
      #Modify following lines to customize output for tool inspection points
      if posttype$ = two, #Lathe tool inspection point
        [
        pcool_off #Coolant off before tool inspection
        pbld, n$, pnullstop, e$
        pbld, n$, scoolant, e$
        if prmcode$ = 29999, #Only output tool insp comment if one was entered with this insp point
          [
          sparameter$ = ucase(sparameter$)
          pbld, n$, *sm00, sopen_prn, sparameter$, sclose_prn, e$
          ]
        else, pbld, n$, *sm00, "(INSPECT TOOL)", e$ #Output just the stop if no comment
        pbld, n$, *sgcode, *toolno, e$              #Restate tool number
        pbld, n$, pfsgplane,                        #Restate plane code
        if css_actv$, #Restart Spindle
          [
          if css_start_rpm, prpm, pcssg50, pcss   #Direct RPM startup for programmed CSS
          else, pcssg50, pcss  #NO RPM start - just output the CSS
          ]
        else, prpm  #Direct RPM was programmed
        result = force(feed)           #Force output of feed next time it's called for output
        prv_gcode$ = c9k
        prv_workofs$ = c9k
        pinsp_cool_on #Coolant on after tool inspection
        pbld, n$, scoolant, e$
        ]
      else,#Mill tool inspection point
        [
        pcool_off #Coolant off before tool inspection
        pbld, n$, scoolant, e$
        pbld, n$, pnullstop, e$
        pbld, n$, sm00,"(CAUTION POST GENERATING MOTION FOR TOOL INSPECTION)", e$
        pbld, n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.", e$
        pbld, n$, sm00, "(INSPECT TOOL)", e$
        pbld, n$, *sgcode, *toolno, e$ #Restate tool number
        pbld, n$, pfsgplane, e$        #Restate plane code
        pspindle
        prpm #Restart Spindle
        pinsp_cool_on #Coolant on after tool inspection
        pbld, n$, scoolant, e$
        pbld, n$, *sgcode, pwcs, pfxout, [if y_axis_mch, pfyout], pfzout, e$
        ]

prapidout       #Output to NC, linear movement - rapid
      if lathecc = zero,
        [
        if millcc_flag & (abs(cuttype) = four | abs(cuttype) = two) & cutpos2$ = zero,  #Polar interpolation is active & Y-axis subs or Right face or Left face & before start point of operation geometry
          [
          if abs(cuttype) = four,  #Y-axis substitution, output C first on separate line
            [
            pcan1, pbld, n$, pexct, psgcode, pcout, e$
            pbld, n$, pexct, pxout, pyout, pzout, pscool, strcantext, e$
            ]
          else,  #Right or Left face cut, output Z last on separate line
            [
            pcan1, pbld, n$, pexct, psgcode, pxout, pyout, pcout, pscool, strcantext, e$
            pbld, n$, pexct, psgcode, pzout, e$
            ]
          ]
        else,
          [
          pcan1, pbld, n$, psgplane, pexct, psgcode, psccomp, pwcs, pxout, pyout,
          pzout, pcout, pscool, strcantext, e$
          ]
        ]
      else,  #Lathe canned turning cycle
        [
        pcan1, pbld, n$, pexct, psgcode, psccomp, pxout, pyout, pzout, pcout, pscool, strcantext, e$
        ]
      if force_feed, result = force(feed)  # Force output of feed next time it's called for output
      if rpd_typ$ = 7, ptool_insp      #Tool inspection point

plinout         #Output to NC, linear movement - feed
      pcan1, pbld, n$, psgplane, sgfeed, pexct, psgcode, psccomp, pwcs, pxout,
        pyout, pzout, pcout, pfr, pscool, strcantext, e$
      if rpd_typ$ = 7, ptool_insp      #Tool inspection point

pcirout         #Output to NC, circular interpolation
      pcan1, pbld, n$, psgplane, sgfeed, pexct, psgcode, psccomp, pxout,
        pyout, pzout, pcout, parc, pfr, pscool, strcantext, e$

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites
19 minutes ago, mirek1017 said:

 

 

 

I am find  this in my post 

 


# --------------------------------------------------------------------------
# Motion NC output
# --------------------------------------------------------------------------

ptool_insp      #Tool inspection point
      #Modify following lines to customize output for tool inspection points
      if posttype$ = two, #Lathe tool inspection point
        [
        pcool_off #Coolant off before tool inspection
        pbld, n$, pnullstop, e$
        pbld, n$, scoolant, e$
        if prmcode$ = 29999, #Only output tool insp comment if one was entered with this insp point
          [
          sparameter$ = ucase(sparameter$)
          pbld, n$, *sm00, sopen_prn, sparameter$, sclose_prn, e$
          ]
        else, pbld, n$, *sm00, "(INSPECT TOOL)", e$ #Output just the stop if no comment
        pbld, n$, *sgcode, *toolno, e$              #Restate tool number
        pbld, n$, pfsgplane,                        #Restate plane code
        if css_actv$, #Restart Spindle
          [
          if css_start_rpm, prpm, pcssg50, pcss   #Direct RPM startup for programmed CSS
          else, pcssg50, pcss  #NO RPM start - just output the CSS
          ]
        else, prpm  #Direct RPM was programmed
        result = force(feed)           #Force output of feed next time it's called for output
        prv_gcode$ = c9k
        prv_workofs$ = c9k
        pinsp_cool_on #Coolant on after tool inspection
        pbld, n$, scoolant, e$
        ]
      else,#Mill tool inspection point
        [
        pcool_off #Coolant off before tool inspection
        pbld, n$, scoolant, e$
        pbld, n$, pnullstop, e$
        pbld, n$, sm00,"(CAUTION POST GENERATING MOTION FOR TOOL INSPECTION)", e$
        pbld, n$, *sg28ref, "U0.", [if y_axis_mch, "V0."], "W0.", e$
        pbld, n$, sm00, "(INSPECT TOOL)", e$
        pbld, n$, *sgcode, *toolno, e$ #Restate tool number
        pbld, n$, pfsgplane, e$        #Restate plane code
        pspindle
        prpm #Restart Spindle
        pinsp_cool_on #Coolant on after tool inspection
        pbld, n$, scoolant, e$
        pbld, n$, *sgcode, pwcs, pfxout, [if y_axis_mch, pfyout], pfzout, e$
        ]

prapidout       #Output to NC, linear movement - rapid
      if lathecc = zero,
        [
        if millcc_flag & (abs(cuttype) = four | abs(cuttype) = two) & cutpos2$ = zero,  #Polar interpolation is active & Y-axis subs or Right face or Left face & before start point of operation geometry
          [
          if abs(cuttype) = four,  #Y-axis substitution, output C first on separate line
            [
            pcan1, pbld, n$, pexct, psgcode, pcout, e$
            pbld, n$, pexct, pxout, pyout, pzout, pscool, strcantext, e$
            ]
          else,  #Right or Left face cut, output Z last on separate line
            [
            pcan1, pbld, n$, pexct, psgcode, pxout, pyout, pcout, pscool, strcantext, e$
            pbld, n$, pexct, psgcode, pzout, e$
            ]
          ]
        else,
          [
          pcan1, pbld, n$, psgplane, pexct, psgcode, psccomp, pwcs, pxout, pyout,
          pzout, pcout, pscool, strcantext, e$
          ]
        ]
      else,  #Lathe canned turning cycle
        [
        pcan1, pbld, n$, pexct, psgcode, psccomp, pxout, pyout, pzout, pcout, pscool, strcantext, e$
        ]
      if force_feed, result = force(feed)  # Force output of feed next time it's called for output
      if rpd_typ$ = 7, ptool_insp      #Tool inspection point

plinout         #Output to NC, linear movement - feed
      pcan1, pbld, n$, psgplane, sgfeed, pexct, psgcode, psccomp, pwcs, pxout,
        pyout, pzout, pcout, pfr, pscool, strcantext, e$
      if rpd_typ$ = 7, ptool_insp      #Tool inspection point

pcirout         #Output to NC, circular interpolation
      pcan1, pbld, n$, psgplane, sgfeed, pexct, psgcode, psccomp, pxout,
        pyout, pzout, pcout, parc, pfr, pscool, strcantext, e$

 

That has nothing to do with what you're trying to accomplish. It will be in the toolchange logic for the lathe tools is only a lathe post. If it is a mill and lathe post combined then it will be in both sections like I showed in what I posted up. I suggest watching Colin's youtube videos on Post editing. You have many things to learn and understand about MP post and how the process works and what it does.

  • Thanks 1
Link to comment
Share on other sites
  • 2 weeks later...

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