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:

david3709

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by david3709

  1. Colin G. My friend.

    you are so smart. I checked my NC code. Before tool change there is the sequence number which is same with Tool number.

    I do not know how to upload my post. Just paste some of post which are related with tool change. Please help me check and find where I am wrong. Thanks a lot.

    -----------------------------------------------------------------------

    # Tool Comment / Manual Entry Section
    # --------------------------------------------------------------------------
    ptoolcomment    #Comment for tool
          tnote = t$
          toffnote = tloffno$
          tlngnote = tlngno$
          pbld, n$, "(", pstrtool, *tnote, *toffnote, *tlngnote, *tldia$, ")", e$

    pstrtool        #Comment for tool
          if strtool$ <> sblank,
            [
            strtool$ = ucase(strtool$)
            pbld, n$, *strtool$, " "
            ]

    pcomment$        #Comment from manual entry
          scomm$ = ucase (scomm$)
          if gcode$ = 1007, "(", scomm$, ")",e$
          else, pbld, n$, "(", scomm$, ")", e$

    # --------------------------------------------------------------------------
    # Start of File and Toolchange Setup
    # --------------------------------------------------------------------------
    psof0$           #Start of file for tool zero                       
          psof$

    psof$            #Start of file for non-zero tool number            
          pcuttype
          toolchng = one
          if ntools$ = one,
            [
            #skip single tool outputs, stagetool must be on
            stagetool = m_one
            !next_tool$
            ]
          if progno$ = zero, progno$ = one
          sav_progno = progno$
          *progno$, "(PROGRAM - ", sprogname$, ")", e$
          pbld, n$, "(DATE - ", date$, " TIME - ", time$, ")", e$
          *tseqno, e$    --------------------------------------------------------------delete this line?
          pbld, n$, *smetric, e$
          pbld, n$, "G0", sgplane, "G40", pg49, "G80", "G90", *sgfeed, "G98", e$
          sav_absinc = absinc$
          absinc$ = one
          prefreturn
          absinc$ = sav_absinc
          if mi1$ <= one, pfbld, n$, "G92", *xh$, *yh$, *zh$, e$
          pcom_moveb
          c_mmlt$ #Multiple tool subprogram call
          ptoolcomment
          comment$
          pcan
          if stagetool = zero, pbld, n$, *t$, "M6", e$
          if stagetool = one,
            [
            if r2100bitde, pbld, n$, *t$, "M6", e$
            else,  pbld, n$, *t$, *next_tool$, "M6", e$
            ]
          pindex
          if mi1$ > one, absinc$ = zero
          pcan1, pbld, n$, *sgcode, pwcs, *sgabsinc, pfxout, pfyout,
            pfcout, *speed, *spindle, pgear, strcantext, e$
          if stagetool = one & r2100bitde, pbld, n$, *next_tool$, e$
          pbld, n$, "G43", ptlngno, pfzout, scoolant, e$
          absinc$ = sav_absinc
          pcom_movea
          toolchng = zero
          c_msng$ #Single tool subprogram call

    ptlchg0$         #Call from NCI null tool change (tool number repeats)                       
          pcuttype
          pcom_moveb
          c_mmlt$ #Multiple tool subprogram call
          comment$
          pcan
          pbld, n$, sgplane, e$
          pspindchng
          pbld, n$, scoolant, e$
          if mi1$ > one & workofs$ <> prv_workofs$,
            [
            sav_absinc = absinc$
            absinc$ = zero
            pbld, n$, pwcs, sgabsinc, pfxout, pfyout, pfzout, pfcout, e$
            pe_inc_calc
            ps_inc_calc
            absinc$ = sav_absinc
            ]
          if cuttype = zero, ppos_cax_lin
          if gcode$ = one, plinout
          else, prapidout
          pcom_movea
          c_msng$ #Single tool subprogram call

    ptlchg$          #Tool change                                       
          pcuttype
          toolchng = two
          pbld, n$, "M01", e$
          *tseqno, e$
          pbld, n$, "G0", sgplane, "G40", pg49, "G80", "G90", *sgfeed, "G98", e$
          sav_absinc = absinc$
          absinc$ = one
          prefreturn
          absinc$ = sav_absinc
          if mi1$ = one, pfbld, n$, "G92", *xh$, *yh$, *zh$, e$
          pcom_moveb
          c_mmlt$ #Multiple tool subprogram call
          ptoolcomment
          comment$
          pcan
          if stagetool = zero, pbld, n$, *t$, "M6", e$
          if stagetool = one,
            [
            if r2100bitde, pbld, n$, *t$, "M6", e$
            else,  pbld, n$, *t$, *next_tool$, "M6", e$
            ]
          pindex
          sav_absinc = absinc$
          if mi1$ > one, absinc$ = zero
          pcan1, pbld, n$, *sgcode, pwcs, *sgabsinc, pfxout, pfyout, pfzout,
            pfcout, *speed, *spindle, pgear, strcantext, e$
          if stagetool = one & r2100bitde, pbld, n$, *next_tool$, e$
          pbld, n$, "G43", ptlngno, pfzout, scoolant, e$
          absinc$ = sav_absinc
          pcom_movea
          toolchng = zero
          c_msng$ #Single tool subprogram call

    pretract        #End of tool path, toolchange             
          sav_absinc = absinc$
          absinc$ = one
          sav_coolant = coolant$
          coolant$ = zero
          cc_pos$ = zero
          gcode$ = zero
          pbld, n$, scoolant, e$
          pbld, n$, sccomp, *sm05, psub_end_mny, e$
          if f93bit3, pbld, n$, sccomp, pg49, e$
          prefreturn
          if rot_on_x, pbld, n$, *sgcode, *sg28, protretinc, e$
          absinc$ = sav_absinc
          coolant$ = sav_coolant

  2. Hell, everyone.

    I am a starter on mastercam post file editing. I updated Mazak Post file from V9 to X5, and redefined control and machine file. Most of CNC code created by these new files look right, but the sequence number has problem. please see the red mark.

    ----------------------------------------------------------------

    N100 (DATE -  02-07-15  TIME -  20:04 )
    N20
    N110 G20
    N120 G0 G40 G80 G90 G94 G98
    N130 G0 G28 G91 Z0.
    N140 G0 G28 X0. Y0.
    N150 ( N150 3" FACE MILL   TOOL - 20  DIA. OFF. - 20  LEN. - 20  DIA. - 3. )
    N160 T20 M6
    N170 G0 G54 G90 X-3.3 Y3.7499 S1500 M3 M41
    N180 G43 H20 Z2.
    N190 Z.6
    N200 G1 Z.45 F20.
    N210 X6.3
    N220 Y2.75
    N230 X-1.8
    N240 Y1.75
    N250 X6.3
    N260 Y.7501
    N270 X-3.3
    N280 G0 Z2.
    N290 M5
    N300 G0 G28 G91 Z0.
    N310 M01
    N8
    N320 G0 G40 G80 G90 G94 G98
    N330 G0 G28 G91 Z0

     

    ------------------------------------------------------------------

    In the post file, I have

    omitseq$     : no$   #Omit sequence numbers?
    seqmax$      : 9999  #Max. sequence number.

    ----------------------------------------------------------------

    I do not know where I am wrong. Please help me this problem.

    Thanks for help.

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